How annampaul27/nyayasetu works
NyayaSetu’s represented product is a legal-query understanding agent: a citizen message is classified, normalized into a legal question and jurisdiction, enriched with domain-specific facts, then assessed for intake readiness and PII safety. The agent returns a structured, traceable result with follow-up or escalation guidance. The README describes this narrow module; source excerpts are partial, so internal stage wiring beyond the documented orchestration is shown only at the agent level.
Main entry points: query_understanding_agent.py Query Agent · llm_client.py LLM Client · models.py Query Result · query_understanding_prompts.py Prompt Suite
Components 15
Query Workflow
- Query Agent
src/query_understanding_agent.py - Domain Detection
src/query_understanding_agent.py - Question Extraction
src/query_understanding_agent.py - Jurisdiction Extraction
src/query_understanding_agent.py - Fact Extraction
src/query_understanding_agent.py - Readiness Check
src/query_understanding_agent.py - PII Safety Check
src/query_understanding_agent.py - Query Result
src/models.py
Agent Support
- Prompt Suite
src/query_understanding_prompts.py - Domain Checklists
src/domain_checklists.py - PII Redactor
src/pii_redaction.py
LLM Provider
- LLM Configuration
src/config.py - LLM Client
src/llm_client.py
Other components
- Citizen
- Google Gemini
Connections 18
- Citizen → Query Agent: submits query
- Query Agent → Domain Detection: runs stage
- Query Agent → Question Extraction: runs stage
- Query Agent → Jurisdiction Extraction: runs stage
- Query Agent → Fact Extraction: runs stage
- Query Agent → Readiness Check: runs stage
- Query Agent → PII Safety Check: runs stage
- Query Agent → Prompt Suite: uses prompts
- Query Agent → Domain Checklists: checks requirements
- Query Agent → Query Result: constructs result
- Domain Detection → LLM Client: requests completion
- Question Extraction → LLM Client: requests completion
- Jurisdiction Extraction → LLM Client: requests completion
- Fact Extraction → LLM Client: requests completion
- Readiness Check → LLM Client: requests completion
- PII Safety Check → LLM Client: requests completion
- LLM Client → LLM Configuration: reads settings
- LLM Client → Google Gemini: calls API