How shivanetha1/ai-doc-analyser works
AI Doc Analyzer is a Streamlit application for indexing PDF/text collections and answering conversational questions using semantic search. Its documented workflow moves from document upload through loading, embedding, and vector storage, then from user questions through routing, retrieval or calculation, and answer validation. The repository also includes query-history condensation and source-grounded prompts. The app source was not sampled, so UI orchestration links are based on README descriptions; links from the app to particular runtime modules are shown as unverified rather than asserted as inspected calls.
Main entry points: app.py Streamlit app · prompts.py Prompt templates · router_agent.py Query router · retrieval_agent.py Retrieval agent
Components 15
Document ingestion
- PDF loader
utils/pdf_loader.py - Text loader
utils/text_loader.py - Text chunking
utils/helpers.py
Search and context
- Embeddings
core/embeddings.py - Vector store
core/vectorstore.py
Question agents
- Query router
agents/router_agent.py - Retrieval agent
agents/retrieval_agent.py - Calculator agent
agents/calculator_agent.py - Structured validator
agents/validator_agent.py - Prompt validator
agents/validator_agent0.py
Shared reasoning
- Query memory
core/memory.py - Prompt templates
core/prompts.py
Other components
- User
- Streamlit app
app.py - Groq API
Connections 20
- User → Streamlit app: uses
README.md - Streamlit app → PDF loader: ingests PDFs
- Streamlit app → Text loader: ingests text
- Streamlit app → Embeddings: creates embeddings
- Streamlit app → Vector store: stores vectors
- Streamlit app → Query memory: condenses queries
- Streamlit app → Query router: routes questions
- Streamlit app → Retrieval agent: requests answers
- Streamlit app → Calculator agent: handles calculations
- Streamlit app → Structured validator: checks answers
- Streamlit app → Prompt validator: checks answers
- Query router → Prompt templates: uses prompt
agents/router_agent.py - Retrieval agent → Prompt templates: uses prompt
agents/retrieval_agent.py - Query memory → Prompt templates: uses prompt
core/memory.py - Prompt validator → Prompt templates: uses prompt
agents/validator_agent0.py - Query router → Groq API: calls chat
agents/router_agent.py - Retrieval agent → Groq API: calls chat
agents/retrieval_agent.py - Query memory → Groq API: calls chat
core/memory.py - Structured validator → Groq API: calls chat
agents/validator_agent.py - Prompt validator → Groq API: calls chat
agents/validator_agent0.py