How deeptensor-3070/hr-policy-bot works
This is a Streamlit HR policy assistant. Users configure Groq models and a key, ask a question in the chat tab, and receive either a guardrail response or an answer grounded in retrieved policy excerpts; the chat also displays sources and execution diagnostics. A separate tab browses the policy corpus. The pipeline’s orchestration and safety branches are visible in the sampled source; model-provider behavior is represented at the API boundary.
Main entry points: app.py App entry · pipeline.py Request pipeline · rag.py Policy retrieval · tab_chat.py Chat tab
Components 14
Streamlit interface
- App entry
app.py - Model settings
src/ui/sidebar.py - Landing page
src/ui/landing.py - Chat tab
src/ui/tab_chat.py - Policy browser
src/ui/tab_docs.py
Answer workflow
- Request pipeline
src/pipeline.py
Policy knowledge
- Policy retrieval
src/rag.py - FAISS index
src/rag.py - HR policy corpus
src/hr_docs.py
Safety and configuration
- NeMo rails
src/guards.py - PII action
src/guards.py - Prompt and output rules
src/config.py
Other components
- Employee
- Groq API
Connections 16
- Employee → App entry: uses
README.md - App entry → Model settings: renders
app.py - App entry → Landing page: renders
app.py - App entry → Chat tab: renders
app.py - App entry → Policy browser: renders
app.py - App entry → Policy retrieval: builds index
app.py - Chat tab → Request pipeline: submits question
src/ui/tab_chat.py - Request pipeline → Chat tab: returns answer and trace
src/ui/tab_chat.py - Request pipeline → NeMo rails: runs safety check
src/pipeline.py - Request pipeline → Policy retrieval: retrieves excerpts
src/pipeline.py - Request pipeline → Prompt and output rules: uses prompt and patterns
src/pipeline.py - Request pipeline → Groq API: calls models
src/pipeline.py - NeMo rails → PII action: registers action
src/guards.py - Policy retrieval → HR policy corpus: chunks documents
src/rag.py - Policy retrieval → FAISS index: builds and searches
src/rag.py - Policy browser → HR policy corpus: displays documents
src/ui/tab_docs.py