How poojithdevan4d/munshi works
Munshi is an on-premise assistant for CA firms. Staff ask questions through the Streamlit UI and receive answers grounded in client PDFs, with source citations. The main document workflow detects typed versus scanned PDFs, extracts text or OCR, indexes client-tagged content in Qdrant, then retrieves context for local LLM answer generation. The UI also supports live PDF uploads. The graph includes both indexed ingestion and documented query capabilities; several UI details and the local model server are described in the README but not fully shown in sampled code.
Main entry points: sharma_associates Client PDFs · munshi_ui.py RAG query engine · ingest_all_clients.py Chunk and embed · query_full_firm.py Firm query CLI
Components 18
Staff interface
- Streamlit UI
app/munshi_ui.py - Earlier UI
app/munshi_ui_v1_complete.py - PDF upload
app/munshi_ui.py - Chat and citations
app/munshi_ui.py - Cited answer
app/munshi_ui.py
Document processing
- Typed PDF extraction
code/ingest_all_clients.py - Scanned PDF OCR
code/ingest_all_clients.py - Chunk and embed
code/ingest_all_clients.py
Retrieval and answers
- Local embeddings
code/ingest_all_clients.py - Qdrant index
- RAG query engine
app/munshi_ui.py - Local LLM server
- Firm query CLI
code/query_full_firm.py - Initial RAG demo
code/rag_first_query.py
Client data
- Client PDFs
data/sharma_associates - Synthetic firm data
code/generate_full_dataset.py - Acme sample data
code/generate_data_part1.py
Other components
- CA staff
Connections 21
- CA staff → Streamlit UI: uses
README.md - Streamlit UI → Chat and citations: offers chat
README.md - CA staff → PDF upload: uploads PDFs
README.md - PDF upload → Client PDFs: saves PDFs
app/munshi_ui.py - Client PDFs → Typed PDF extraction: reads PDFs
code/ingest_all_clients.py - Typed PDF extraction → Chunk and embed: extracts text
code/ingest_all_clients.py - Client PDFs → Scanned PDF OCR: reads scanned PDFs
code/ingest_all_clients.py - Scanned PDF OCR → Chunk and embed: supplies OCR text
code/ingest_all_clients.py - Chunk and embed → Local embeddings: embeds chunks
code/ingest_all_clients.py - Chunk and embed → Qdrant index: stores vectors
code/ingest_all_clients.py - Chat and citations → RAG query engine: submits questions
README.md - RAG query engine → Qdrant index: retrieves context
README.md - RAG query engine → Local LLM server: generates answer
README.md - RAG query engine → Cited answer: returns sources
app/munshi_ui.py - Cited answer → Chat and citations: renders citations
app/munshi_ui.py - Firm query CLI → Qdrant index: queries index
code/query_full_firm.py - Firm query CLI → Local LLM server: requests generation
code/query_full_firm.py - Initial RAG demo → Qdrant index: indexes and queries
code/rag_first_query.py - Initial RAG demo → Local LLM server: requests generation
code/rag_first_query.py - Synthetic firm data → Client PDFs: generates documents
- Acme sample data → Client PDFs: generates documents