How ishaan-bhalla/insaaf-insight-labour-laws-handbook works
Insaaf Insight is a Streamlit legal-question assistant grounded in a labour-law handbook. A user submits a question in the chat UI, which calls the RAG pipeline; the pipeline retrieves handbook passages, generates a grounded answer, and returns the pages used for display. The map also shows the handbook viewer and the optional Groq/Ollama model backends. Relationships are based on the excerpts and README; unsampled UI text files are not treated as runtime components.
Main entry points: main.py RAG pipeline · app.py Chat interface · A Handbook on Employee Relations and Labour Laws in India.pdf Labour handbook
Components 15
User interface
- Chat interface
app.py - Handbook viewer
app.py
Handbook retrieval
- Labour handbook
A Handbook on Employee Relations and Labour Laws in India.pdf - PDF loading
main.py - Chunking
main.py - Text embeddings
main.py - FAISS index
main.py - Passage retrieval
main.py
Answer generation
- RAG pipeline
main.py - Grounded prompt
main.py - Model selection
main.py - Answer and pages
main.py
Other components
- Questioner
- Groq Llama
- Ollama Llama
Connections 17
- Questioner → Chat interface: asks
README.md - Chat interface → RAG pipeline: calls
app.py - Labour handbook → PDF loading: loads
main.py - PDF loading → Chunking: splits
main.py - Chunking → Text embeddings: embeds
README.md - Text embeddings → FAISS index: indexes
README.md - RAG pipeline → Passage retrieval: requests passages
main.py - Passage retrieval → FAISS index: searches
main.py - Passage retrieval → Grounded prompt: supplies passages
main.py - RAG pipeline → Grounded prompt: builds
main.py - Grounded prompt → Model selection: invokes
main.py - Model selection → Groq Llama: selects with key
main.py - Model selection → Ollama Llama: otherwise selects
main.py - Model selection → Answer and pages: returns response
main.py - RAG pipeline → Answer and pages: adds page numbers
main.py - Answer and pages → Chat interface: displays
app.py - Handbook viewer → Labour handbook: displays
app.py