How nbhatia1710/research-pilot works
AI Research Assistant is a document-grounded chat product. Users upload supported files, which the API parses and indexes, then ask questions across selected documents; the multi-agent path retrieves evidence, summarizes it, critiques gaps, and returns an answer with conversation context. The frontend also exposes session history and a simple-RAG mode. The graph follows README-documented capabilities and indexed source references; several route and UI implementations were only partially excerpted, so those links rely on README evidence.
Main entry points: main.py HTTP API · langgraph_nodes.py Workflow nodes · research_agent.py Research retrieval · ChatBox.tsx Chat and upload
Components 19
Chat interface
- Chat and upload
frontend/components/ChatBox.tsx - Session history
frontend/pages/history.tsx
API and ingestion
- HTTP API
backend/main.py - Parse and chunk
backend/utils/document_parser.py
Document retrieval
- Embeddings and LLM
backend/utils/embeddings.py - Shared FAISS index
backend/db/faiss_store.py - Per-document FAISS
backend/db/multi_doc_store.py
Answer workflow
- Research retrieval
backend/agents/research_agent.py - Workflow entry
backend/agents/orchestrator.py - LangGraph routing
backend/agents/langgraph_workflow.py - Workflow nodes
backend/agents/langgraph_nodes.py - Agent state
backend/agents/agent_state.py - Summarizer
backend/agents/summarizer_agent.py - Critic
backend/agents/critic_agent.py - Editor
backend/agents/editor_agent.py
Session memory
- Conversation memory
backend/db/postgres_memory.py - SQLite session memory
backend/db/sqlite_memory.py
Other components
- User
- Ollama service
Connections 22
- User → Chat and upload: asks and uploads
README.md - Chat and upload → HTTP API: calls API
README.md - HTTP API → Parse and chunk: parses uploads
README.md - HTTP API → Per-document FAISS: indexes documents
README.md - HTTP API → Shared FAISS index: serves simple RAG
backend/main.py - HTTP API → Workflow entry: starts workflow
backend/main.py - Workflow entry → LangGraph routing: runs graph
backend/agents/orchestrator.py - LangGraph routing → Workflow nodes: routes nodes
backend/agents/langgraph_workflow.py - Workflow nodes → Agent state: updates state
backend/agents/langgraph_nodes.py - Workflow nodes → Research retrieval: invokes retrieval
backend/agents/langgraph_nodes.py - Workflow nodes → Summarizer: invokes summary
backend/agents/langgraph_nodes.py - Workflow nodes → Critic: invokes critique
backend/agents/langgraph_nodes.py - Workflow nodes → Editor: invokes editing
backend/agents/langgraph_nodes.py - Research retrieval → Shared FAISS index: searches index
backend/agents/research_agent.py - Research retrieval → Per-document FAISS: searches documents
backend/agents/research_agent.py - Research retrieval → Embeddings and LLM: embeds query
backend/agents/research_agent.py - Summarizer → Ollama service: generates summary
- Critic → Ollama service: evaluates answer
- Editor → Ollama service: polishes answer
- HTTP API → Conversation memory: stores sessions
backend/main.py - Session history → HTTP API: browses sessions
README.md - HTTP API → SQLite session memory: supports session history
README.md