How gittaboina1-ops/agriculture works
AgriGraph serves farmers through a web UI and terminal assistant: questions are classified, matched to agricultural entities, traversed against a knowledge graph, enriched with provenance, conflict and sensor-quality checks, then answered with grounded language-model output. Admins upload resources that pass through extraction, indexing, normalization and validation before graph updates. The web UI also exposes multilingual answers and admin views for graph, sources, conflicts and data quality. Backend excerpts and the README support the main pipeline; some ingestion steps and UI links are documented but their implementation details were not sampled.
Main entry points: document_service.py Ingestion Orchestrator · service.py Query Retrieval · main.py HTTP API · api.js API Client
Components 29
User Interfaces
- Web App
frontend/src/App.jsx - Farmer Experience
frontend/src/pages/FarmerHome.jsx - Query and Voice
frontend/src/components/QueryBox.jsx - Answer and Evidence
frontend/src/components/AnswerCard.jsx - Admin Console
frontend/src/pages/AdminHome.jsx - Resource Upload
frontend/src/pages/AdminUpload.jsx - API Client
frontend/src/api/api.js - Session Context
frontend/src/auth/AuthContext.jsx
Backend API
- HTTP API
backend/main.py - Authentication
backend/services/auth_service.py - Terminal Assistant
backend/cli.py
Knowledge Pipeline
- Ingestion Orchestrator
backend/ingestion/document_service.py - Document Extraction
backend/ingestion/pdf_extractor.py - Chunking and Index
backend/ingestion/semantic_index.py - Entity Extraction
backend/ingestion/entity_extractor.py - Entity Normalization
backend/ingestion/normalizer.py - Schema Validation
backend/ingestion/validator.py
Domain Services
- Query Retrieval
backend/retrieval/service.py - Intent Detection
backend/retrieval/intent.py - Graph Traversal
backend/graph/service.py - Knowledge Graph
backend/graph/service.py - Source Provenance
backend/provenance/tracker.py - Conflict Detection
backend/conflict/engine.py - Sensor Guardrails
backend/validation/validator.py - Grounded Answer
backend/services/llm_service.py - Translation
backend/services/translation_service.py - Query History
backend/services/mongo_service.py
Other components
- Farmer
- Admin
Connections 33
- Farmer → Web App: uses
README.md - Admin → Web App: uses
README.md - Web App → Farmer Experience: routes to
frontend/src/App.jsx - Web App → Admin Console: routes to
frontend/src/App.jsx - Farmer Experience → Query and Voice: renders
frontend/src/pages/FarmerHome.jsx - Farmer Experience → Answer and Evidence: renders
frontend/src/pages/FarmerHome.jsx - Admin Console → Resource Upload: links to
frontend/src/App.jsx - Query and Voice → API Client: submits query
- Farmer Experience → API Client: requests answers
frontend/src/pages/FarmerHome.jsx - Resource Upload → API Client: uploads resources
frontend/src/pages/AdminUpload.jsx - API Client → HTTP API: calls API
README.md - Session Context → API Client: calls auth endpoints
frontend/src/auth/AuthContext.jsx - HTTP API → Query Retrieval: routes query
backend/main.py - HTTP API → Authentication: checks identity
backend/main.py - HTTP API → Ingestion Orchestrator: handles uploads
backend/main.py - Terminal Assistant → Query Retrieval: runs queries
backend/cli.py - Query Retrieval → Intent Detection: classifies query
backend/retrieval/service.py - Query Retrieval → Graph Traversal: requests traversal
backend/retrieval/service.py - Graph Traversal → Knowledge Graph: reads and updates
backend/graph/service.py - Query Retrieval → Source Provenance: resolves sources
backend/retrieval/service.py - Query Retrieval → Conflict Detection: checks claims
backend/retrieval/service.py - Query Retrieval → Sensor Guardrails: checks telemetry
backend/retrieval/service.py - Query Retrieval → Grounded Answer: builds answer
backend/retrieval/service.py - Query Retrieval → Query History: logs query
backend/retrieval/service.py - HTTP API → Translation: translates text
backend/main.py - Ingestion Orchestrator → Document Extraction: extracts text
backend/ingestion/document_service.py - Ingestion Orchestrator → Chunking and Index: chunks and indexes
backend/ingestion/document_service.py - Ingestion Orchestrator → Entity Extraction: extracts entities
backend/ingestion/document_service.py - Ingestion Orchestrator → Entity Normalization: normalizes entities
backend/ingestion/document_service.py - Ingestion Orchestrator → Schema Validation: validates relations
backend/ingestion/document_service.py - Ingestion Orchestrator → Source Provenance: attaches provenance
README.md - Ingestion Orchestrator → Conflict Detection: audits claims
README.md - Ingestion Orchestrator → Graph Traversal: updates graph
README.md