How parmesh214/verdictai works
VerdictAI is a web-based Indian legal research and advisory platform. Its principal workflow takes a user query through the frontend and API, searches legal acts, judgments, and reports, then uses retrieved context to generate a response with sources. A separate ingestion branch prepares those legal collections for search. The README documents the broad workflow and capabilities; sampled excerpts confirm selected route, search, RAG, ingestion, and storage relationships. Some unsampled integrations and frontend wiring are therefore left unconnected.
Main entry points: vector_store.py HNSW vector store · routes.py API query handler · acts_ingest.py Acts ingestion · enhanced_legal_search.py Cross-source search
Components 21
User experience
- Web interface
frontend/app - Web entry page
frontend/pages/index.tsx
Query API
- Enhanced query routes
backend/app/routes/enhanced_query.py - NLP query routes
backend/app/routes/nlp_query.py - Query routes
backend/app/routes/query.py - API query handler
backend/app/api/routes.py
Legal research
- RAG pipeline
backend/app/services/enhanced_rag_pipeline.py - Cross-source search
backend/app/services/enhanced_legal_search.py - Conversational responses
backend/app/services/conversational_layer.py - LLM service
backend/app/services/llm_service.py
Legal corpus
- Acts ingestion
backend/app/ingestion/acts_ingest.py - Judgment ingestion
backend/app/ingestion/judgments_ingest.py - Reports ingestion
backend/app/ingestion/reports_ingest.py - Unified ingestion
backend/app/ingestion/unified_legal_ingest.py - Document processing
backend/app/ingestion/common.py - Acts catalog
backend/app/ingestion/acts_collection.py - Legal datasets
backend/app/ingestion/legal_datasets_loader.py
Data and models
- HNSW vector store
backend/app/db/vector_store.py - PostgreSQL
Other components
- Legal researcher
- Legal documents
Connections 24
- Legal researcher → Web interface: submits query
README.md - Web interface → Enhanced query routes: sends query
README.md - Enhanced query routes → Cross-source search: searches sources
backend/app/routes/enhanced_query.py - Enhanced query routes → Conversational responses: requests response
backend/app/routes/enhanced_query.py - RAG pipeline → Cross-source search: runs search
backend/app/services/enhanced_rag_pipeline.py - RAG pipeline → Conversational responses: generates answer
backend/app/services/enhanced_rag_pipeline.py - Cross-source search → HNSW vector store: queries indexes
backend/app/services/enhanced_legal_search.py - API query handler → HNSW vector store: retrieves matches
backend/app/api/routes.py - API query handler → PostgreSQL: stores query data
backend/app/api/routes.py - API query handler → API query handler: stores response data
backend/app/api/routes.py - Acts ingestion → Document processing: processes documents
backend/app/ingestion/acts_ingest.py - Acts ingestion → Acts catalog: reads catalog
backend/app/ingestion/acts_ingest.py - Acts ingestion → HNSW vector store: writes chunks
backend/app/ingestion/acts_ingest.py - Judgment ingestion → Document processing: processes judgments
backend/app/ingestion/judgments_ingest.py - Judgment ingestion → HNSW vector store: writes chunks
backend/app/ingestion/judgments_ingest.py - Reports ingestion → Document processing: processes reports
backend/app/ingestion/reports_ingest.py - Reports ingestion → HNSW vector store: writes chunks
backend/app/ingestion/reports_ingest.py - Unified ingestion → Acts ingestion: dispatches ingestion
backend/app/ingestion/unified_legal_ingest.py - Unified ingestion → Reports ingestion: dispatches ingestion
backend/app/ingestion/unified_legal_ingest.py - Unified ingestion → Legal datasets: loads datasets
backend/app/ingestion/unified_legal_ingest.py - HNSW vector store → Legal documents: indexes documents
README.md - NLP query routes → RAG pipeline: invokes pipeline
backend/app/routes/nlp_query.py - Query routes → Cross-source search: uses search
backend/app/routes/query.py - Query routes → Conversational responses: uses responses
backend/app/routes/query.py