How mohammedsunoqrot/healdar works
Healdar is a bilingual regulatory-question assistant. Its user workflow runs from the Streamlit interface through query planning and hybrid retrieval to a cited, coverage-aware answer, with references rendered in the UI or exported. The repository also includes a corpus-preparation path from regulatory PDFs to chunk data and a searchable vector index, plus private usage analytics. The README documents comparison, follow-up, jurisdiction balancing, and refusal behavior; some detailed wiring is not visible in the sampled excerpts, so those relationships are cited to the README rather than inferred from module names.
Main entry points: app.py Streamlit app · rag_pipeline.py RAG orchestration · retrieval.py Hybrid retrieval · vectorstore.py Vector store lifecycle
Components 19
User experience
- Streamlit app
src/app.py - Conversation and comparison
src/app.py
Question answering
- RAG orchestration
src/rag_pipeline.py - Query planning
src/rag_pipeline.py - Language translation
src/rag_pipeline.py - Hybrid retrieval
src/retrieval.py - Cited answer
src/rag_pipeline.py
Regulatory corpus
- PDF ingestion
src/ingest.py - Passage corpus
data/processed/chunks.json - Index builder
src/embed.py - Vector store lifecycle
src/vectorstore.py - Chroma index
data/processed/vectorstore
Output and operations
- Answer formatting
src/formatting.py - PDF and Word export
src/export.py - Usage analytics
src/analytics.py - Analytics database
src/analytics.py
Other components
- Visitor
- Groq models
- Regulatory PDFs
Connections 24
- Visitor → Streamlit app: asks question
README.md - Streamlit app → RAG orchestration: submits query
src/app.py - Streamlit app → Conversation and comparison: manages sessions
README.md - Conversation and comparison → RAG orchestration: runs queries
README.md - RAG orchestration → Language translation: translates Arabic
README.md - RAG orchestration → Query planning: plans searches
README.md - Query planning → Groq models: requests plan
README.md - Language translation → Groq models: requests translation
README.md - RAG orchestration → Hybrid retrieval: searches passages
src/rag_pipeline.py - Hybrid retrieval → Chroma index: dense search
src/retrieval.py - RAG orchestration → Cited answer: generates response
README.md - Cited answer → Groq models: generates answer
README.md - RAG orchestration → Streamlit app: returns answer
README.md - Regulatory PDFs → PDF ingestion: provides documents
README.md - PDF ingestion → Passage corpus: writes chunks
README.md - Index builder → Passage corpus: loads chunks
src/embed.py - Index builder → Vector store lifecycle: builds index
src/embed.py - Vector store lifecycle → Chroma index: writes and opens
src/vectorstore.py - Hybrid retrieval → Vector store lifecycle: uses index helpers
src/retrieval.py - Streamlit app → Answer formatting: renders answers
src/app.py - PDF and Word export → Answer formatting: parses answer
src/export.py - Streamlit app → PDF and Word export: exports reports
src/app.py - Streamlit app → Usage analytics: records usage
src/app.py - Usage analytics → Analytics database: stores and queries
src/analytics.py