How sainihal1500/veritrust-ai works
VeriTrust AI is a customer-service API that routes a customer query, gathers policy and authorized account evidence, drafts an answer, and verifies it before returning a decision and response. The documented verification stages include claim extraction, claim and policy checks, judging, correction, and a final judge. Major capabilities also include structured commerce data, session-based access control, policy RAG, and auditing. The README describes the complete workflow; source excerpts confirm selected calls, while unsampled implementation details are represented only where documented.
Main entry points: veritrust_graph.py VeriTrust Workflow · account_service.py Account Service · main.py FastAPI Service · access_control.py Access Control
Components 23
Customer API
- FastAPI Service
backend/app/api/main.py - VeriTrust Workflow
backend/app/workflows/veritrust_graph.py - Query Router
backend/app/agents/query_router.py - Account Router
backend/app/agents/account_router.py - Audit and Metrics
backend/app/audit.py
Evidence and Access
- Access Control
backend/app/security/access_control.py - Session Registry
backend/app/security/session.py - Account Service
backend/app/database/account_service.py - Policy Retriever
backend/app/rag/retriever.py - Knowledge Ingestion
backend/app/rag/ingest.py - Policy Knowledge Base
backend/data/knowledge_base
Answer Verification
- Maker Agent
backend/app/agents/maker.py - Claim Extractor
backend/app/agents/claim_extractor.py - Claim Verifier
backend/app/agents/claim_verifier.py - Policy Checker
backend/app/agents/policy_checker.py - Judge Agent
backend/app/agents/judge.py - Corrector Agent
backend/app/agents/corrector.py - LLM Utilities
backend/app/agents/llm_utils.py
Commerce Data
- Catalog Data
backend/app/database/catalog_data.py - Customer and Order Data
backend/app/database/customer_data.py - Transaction Data
backend/app/database/transaction_data.py - Support Case Data
backend/app/database/support_data.py
Other components
- Customer
Connections 27
- Customer → FastAPI Service: submits query
README.md - FastAPI Service → VeriTrust Workflow: invokes workflow
backend/app/api/main.py - VeriTrust Workflow → Query Router: routes query
backend/app/workflows/veritrust_graph.py - VeriTrust Workflow → Account Router: routes account query
backend/app/workflows/veritrust_graph.py - VeriTrust Workflow → Access Control: checks access
backend/app/workflows/veritrust_graph.py - Access Control → Session Registry: checks session
backend/app/security/access_control.py - VeriTrust Workflow → Account Service: loads account evidence
backend/app/workflows/veritrust_graph.py - Account Service → Access Control: authorizes records
backend/app/database/account_service.py - Account Service → Catalog Data: reads catalog
backend/app/database/account_service.py - Account Service → Customer and Order Data: reads account records
backend/app/database/account_service.py - Account Service → Support Case Data: reads case records
backend/app/database/account_service.py - Account Service → Transaction Data: loads transaction summary
backend/app/database/account_service.py - VeriTrust Workflow → Policy Retriever: retrieves policy evidence
backend/app/workflows/veritrust_graph.py - Policy Retriever → Policy Knowledge Base: searches policies
README.md - Knowledge Ingestion → Policy Knowledge Base: ingests documents
- VeriTrust Workflow → Maker Agent: generates draft
README.md - VeriTrust Workflow → Claim Extractor: extracts claims
README.md - VeriTrust Workflow → Claim Verifier: verifies claims
README.md - VeriTrust Workflow → Policy Checker: checks policies
README.md - VeriTrust Workflow → Judge Agent: judges response
README.md - VeriTrust Workflow → Corrector Agent: corrects response
README.md - VeriTrust Workflow → Judge Agent: rechecks correction
README.md - Query Router → LLM Utilities: checks model availability
backend/app/agents/query_router.py - Maker Agent → LLM Utilities: sanitizes model output
backend/app/agents/maker.py - VeriTrust Workflow → FastAPI Service: returns result
backend/app/api/main.py - FastAPI Service → Audit and Metrics: records workflow
backend/app/api/main.py - Knowledge Ingestion → Policy Retriever: prepares retrieval index