A comprehensive research assistant that combines RAG (Retrieval-Augmented Generation) with web search to provide well-sourced, in-depth research reports.
- Research Planning: Automatically breaks down complex questions into focused sub-questions
- Multi-Query Search: Generates multiple search query variations for comprehensive coverage
- Structured Reports: Produces well-organized research reports with:
- Executive Summary
- Key Findings
- Detailed Analysis
- Conclusion
- Upload PDF or text files to build a knowledge base
- Semantic search across uploaded documents
- Automatic document chunking and vector storage
- Inline Citations: Every claim is backed by source citations
[1],[2], or[Web Search] - Source Tracking: Only shows sources that were actually cited in the response
- Transparent Attribution: Clear distinction between uploaded documents and web search results
- Automatic web search when uploaded documents don't contain answers
- Multi-query strategy for diverse information gathering
- Seamless integration with RAG results
- LangChain: Agent framework and RAG implementation
- LangGraph: Multi-step research workflow
- ChromaDB: Vector store for document embeddings
- Streamlit: Web interface
- OpenRouter: LLM API access (supports multiple models)
- DuckDuckGo: Web search capabilities
- Install dependencies:
cd backend
pip install -r requirements.txt- Set up environment variables in
.env:
OPENROUTER_API_KEY=your_api_key_here
- Run the application:
streamlit run backend/app.py- Upload Documents (optional): Add PDF or text files to build your knowledge base
- Select Model: Choose your preferred model provider (Gemini or OpenRouter)
- Ask Questions: The agent will:
- Plan the research approach
- Search your documents and the web
- Generate a comprehensive research report with citations
The agent generates structured research reports with proper citations:
# Research Report
## Executive Summary
[Overview with citations]
## Key Findings
[Main points with inline citations [1], [2], [Web Search]]
## Detailed Analysis
[In-depth exploration with sources]
## Conclusion
[Summary]
## Sources
[1] File: document.pdf (page 1)
[Web Search] Web Search
- Planning: Breaks down complex questions into sub-questions
- Query Generation: Creates multiple search query variations
- Retrieval: Searches uploaded documents (RAG) and the web
- Synthesis: Combines information into a structured report
- Citation: Tracks and displays only sources actually used