An interactive AI-powered assistant built with LangChain and Streamlit, designed to help you:
- 🔍 Ask questions about PDF documents
- 🧰 Use tools like a calculator, file tools, and web search
- ✍️ Summarize documents in natural language
Upload a PDF and ask natural language questions about its content. The system uses document chunking, embeddings, and retrieval-augmented generation (RAG) to answer accurately.
Interact with an AI agent that can:
- Perform calculations
- Search the web (DuckDuckGo)
- Interact with the local file system (via FileManagementToolkit)
Generate concise summaries of entire PDF files using custom prompt templates and an LLM chain.
.
├── README.md
├── app
│ ├── agents
│ │ ├── __init__.py
│ │ └── tool_agent.py
│ ├── chains
│ │ ├── __init__.py
│ │ ├── qa_chain.py
│ │ └── summarizer_chain.py
│ ├── main.py # Main Streamlit app
│ └── utils
│ ├── __init__.py
│ ├── document_loader.py
│ └── vector_store.py
├── pyproject.toml
└── requirements.lock
- Clone the repo
git clone https://github.com/your-username/ai_research_assistant.git
cd ai_research_assistant
- Install dependencies
pip install -r requirements.lock
- Set environment variables
Create a.env
file or export your OpenAI API key:
export OPENAI_API_KEY=your-key-here
- Run the app
streamlit run app/main.py
langchain
langchain-community
langchain-openai
openai
streamlit
faiss-cpu
orchromadb
PyPDF2
,pdfminer.six
, or similar for PDF reading
- Chat history with memory
- Support for multiple PDFs at once
- Export summaries and chat logs
- UI polish with user authentication
Thanks to the LangChain, OpenAI, and Streamlit communities for their powerful open-source tools.