How hit93/ai-research-assistant works
The product is a Streamlit AI research assistant that turns a topic into a sourced, verified report. Its documented lifecycle plans sub-queries, retrieves academic and web evidence, synthesizes findings, audits claims, and revises weak results before export. The LangGraph nodes are the internal workflow layer; retrieval also uses hybrid passage search. README documents semantic caching, layered memory, and gateway failover, but several implementations were not sampled, so those links reflect documented capabilities rather than inspected calls. No visual-analysis or security implementation is evident in the supplied tree.
Main entry points: nodes.py Graph Nodes · app.py Streamlit UI · graph.py Research Graph · llm.py LLM Chain
Components 27
User Interface
- Streamlit UI
app.py
Research Workflow
- Research Graph
src/graphs/graph.py - Workflow State
src/graphs/state.py - Graph Nodes
src/graphs/nodes.py - Query Planner
src/chains/planner.py - Synthesis Chain
src/chains/synthesizer.py - Claim Verifier
src/chains/verifier.py - Report Refiner
src/chains/refiner.py - Prompt Templates
src/prompts/synthesizer.py
Evidence Retrieval
- ArXiv Search
src/tools/arxiv_tool.py - Web Search
src/tools/web_search_tool.py - Full-Text Fetch
src/tools/full_text_fetcher.py - Hybrid Retrieval
src/tools/hybrid_rag.py - Text Normalizer
src/tools/text_cleaner.py
Models and Memory
- LLM Chain
src/chains/llm.py - LLM Gateway
src/chains/gateway.py - Semantic Cache
src/memory/semantic_cache.py - Short-Term Memory
src/memory/stm.py - Long-Term Memory
src/memory/ltm.py
Report Delivery
- Report Exporter
src/utils/exporter.py - Research Report
src/models/schemas.py
Other components
- Researcher
- Groq LLM
- Gemini LLM
- Tavily Search
- DuckDuckGo
- ArXiv API
Connections 32
- Researcher → Streamlit UI: enters topic
- Streamlit UI → Semantic Cache: checks query
- Semantic Cache → Streamlit UI: returns hit
- Streamlit UI → Research Graph: starts research
- Research Graph → Graph Nodes: dispatches stages
- Research Graph → Workflow State: tracks state
- Graph Nodes → Query Planner: plans queries
- Query Planner → LLM Chain: generates plan
- Graph Nodes → ArXiv Search: searches papers
- Graph Nodes → Web Search: searches web
- Web Search → Tavily Search: queries first
- Web Search → DuckDuckGo: falls back
- ArXiv Search → ArXiv API: queries API
- Graph Nodes → Full-Text Fetch: fetches text
- Graph Nodes → Hybrid Retrieval: indexes and retrieves
- Full-Text Fetch → Text Normalizer: normalizes text
- Graph Nodes → Synthesis Chain: synthesizes evidence
- Synthesis Chain → Prompt Templates: uses template
- Synthesis Chain → LLM Gateway: requests generation
- Graph Nodes → Claim Verifier: audits claims
- Claim Verifier → LLM Gateway: requests judgment
- Graph Nodes → Report Refiner: revises weak result
- Report Refiner → LLM Gateway: requests revision
- LLM Gateway → LLM Chain: routes requests
- LLM Chain → Groq LLM: calls model
- LLM Chain → Gemini LLM: calls model
- Graph Nodes → Short-Term Memory: tracks session
- Graph Nodes → Long-Term Memory: archives run
- Research Graph → Research Report: produces result
- Streamlit UI → Report Exporter: exports report
- Report Exporter → Research Report: formats report
- Streamlit UI → Researcher: shows downloads