How pranithapindi/development-of-ai-response-validation-system-with-hallucination-detection-assistance- works
This is a full-stack AI-response validation product. A user submits an AI answer and optional reference through the React interface; the FastAPI validation route runs claim-level evidence and hallucination checks plus multi-dimensional judges, then returns a report that can be viewed, stored, and exported. Separate branches support CSV batch evaluation, history, and analytics. The README documents the API and major capabilities; some backend service relationships are supported by the source index, but unsampled implementations and frontend request wiring are not asserted beyond documented architecture.
Main entry points: validation_engine.py Validation orchestrator · App.jsx React application · main.py FastAPI application · validate.py Validation routes
Components 25
User experience
- React application
src/App.jsx - Single validation
src/pages/Validate.jsx - Batch evaluation UI
src/pages/BatchEvaluation.jsx - Evaluation results
src/pages/EvaluationDashboard.jsx - Evaluation history
src/pages/History.jsx - Analytics dashboard
src/pages/Analytics.jsx - API client
src/services/api.js
API and workflows
- FastAPI application
backend/main.py - Validation routes
backend/routers/validate.py - Batch routes
backend/routers/batch.py - History routes
backend/routers/history.py - Analytics routes
backend/routers/analytics.py - API schemas
backend/models/schemas.py - CSV batch evaluator
backend/services/batch_evaluator.py
Validation services
- Validation orchestrator
backend/services/validation_engine.py - Claim extraction
backend/services/claim_extractor.py - RAG evidence retrieval
backend/services/rag_pipeline.py - TF-IDF evidence matching
backend/services/nlp_validator.py - Evaluation judges
backend/services/accuracy_judge.py - Hallucination detection
backend/services/hallucination_detector.py - Verdict aggregation
backend/services/verdict_judge.py
Reports and storage
- Evaluation database
backend/database/db.py - PDF report export
backend/services/pdf_generator.py - Batch PDF export
backend/services/batch_pdf_generator.py
Other components
- Browser user
Connections 29
- Browser user → React application: uses
README.md - React application → Single validation: routes to
src/App.jsx - React application → Batch evaluation UI: routes to
src/App.jsx - React application → Evaluation results: routes to
src/App.jsx - React application → Evaluation history: routes to
src/App.jsx - React application → Analytics dashboard: routes to
src/App.jsx - Single validation → API client: submits via
- Batch evaluation UI → API client: submits via
src/pages/BatchEvaluation.jsx - API client → FastAPI application: sends HTTP
README.md - FastAPI application → Validation routes: registers
backend/main.py - FastAPI application → Batch routes: registers
backend/main.py - FastAPI application → History routes: registers
backend/main.py - FastAPI application → Analytics routes: registers
backend/main.py - Validation routes → Validation orchestrator: runs validation
backend/routers/validate.py - Validation routes → Evaluation database: persists result
backend/routers/validate.py - Validation routes → PDF report export: generates report
backend/routers/validate.py - Validation routes → API schemas: validates payload
backend/routers/validate.py - Validation orchestrator → Claim extraction: extracts claims
backend/services/validation_engine.py - Validation orchestrator → RAG evidence retrieval: retrieves evidence
backend/services/validation_engine.py - RAG evidence retrieval → TF-IDF evidence matching: matches evidence
backend/services/rag_pipeline.py - Validation orchestrator → Evaluation judges: evaluates dimensions
backend/services/validation_engine.py - Validation orchestrator → Hallucination detection: checks contradictions
backend/services/validation_engine.py - Validation orchestrator → Verdict aggregation: aggregates verdict
backend/services/validation_engine.py - Batch routes → CSV batch evaluator: evaluates CSV
backend/routers/batch.py - Batch routes → Batch PDF export: exports batch
backend/routers/batch.py - CSV batch evaluator → Validation orchestrator: validates rows
backend/services/batch_evaluator.py - History routes → Evaluation database: reads history
backend/routers/history.py - Analytics routes → Evaluation database: aggregates metrics
- Validation orchestrator → Evaluation database: stores result