How mahyarrk/project-veritas works
project-veritas audits published statistics against supplied raw data and also provides cited RAG chat about the paper. The principal audit flow is paper/data input through ingestion, LLM-proposed statistics with deterministic validation, then a deterministic recomputation and human-resolvable verdict report. The separate chat flow retrieves provenance-bearing excerpts and answers questions about the paper. Edges reflect README statements, shown calls, or SOURCE INDEX references; some GUI and ingestion internals were only partially excerpted.
Main entry points: ingest.py Document ingestion · main.py CLI workflow · chat.py Grounded answer · extract.py Statistic extraction
Components 20
User entry points
- Streamlit UI
gui.py - CLI workflow
main.py
Statistics audit
- Statistic extraction
extract.py - Extraction LLM
- Proposal validation
extract.py - Statistic battery
verify.py - Match and resolve
verify.py - Audit report
verify.py
Paper RAG chat
- Question and rewrite
chat.py - Provenance retrieval
retrieve.py - Grounded answer
chat.py - Chat LLM
- Chat history
chat.py
Shared services
- Endpoint setup
setup.py - Document ingestion
ingest.py - Embedding service
ingest.py - Chunk and dataset store
ingest.py
Other components
- Researcher
- Paper input
- Raw data
Connections 29
- Researcher → Streamlit UI: uses
README.md - Researcher → CLI workflow: runs
README.md - Researcher → Paper input: provides
README.md - Researcher → Raw data: provides
README.md - CLI workflow → Endpoint setup: configures
main.py - CLI workflow → Document ingestion: processes inputs
main.py - Paper input → Document ingestion: loads text
README.md - Raw data → Document ingestion: loads schema
README.md - Document ingestion → Embedding service: embeds chunks
ingest.py - Document ingestion → Chunk and dataset store: writes
ingest.py - CLI workflow → Statistic extraction: runs extraction
main.py - Statistic extraction → Extraction LLM: requests proposals
extract.py - Statistic extraction → Document ingestion: loads paper
extract.py - Statistic extraction → Proposal validation: validates proposals
extract.py - CLI workflow → Statistic battery: runs audit
main.py - Statistic battery → Match and resolve: matches values
verify.py - Match and resolve → Audit report: records verdicts
verify.py - Statistic battery → Raw data: recomputes from
README.md - Streamlit UI → Statistic extraction: invokes
gui.py - Streamlit UI → Statistic battery: invokes
gui.py - Streamlit UI → Grounded answer: requests answers
gui.py - Researcher → Question and rewrite: asks
README.md - Question and rewrite → Provenance retrieval: searches
chat.py - Provenance retrieval → Chunk and dataset store: reads chunks
retrieve.py - Provenance retrieval → Embedding service: embeds query
retrieve.py - Grounded answer → Provenance retrieval: uses excerpts
chat.py - Grounded answer → Chat LLM: generates answer
chat.py - Grounded answer → Chat history: persists turns
chat.py - Grounded answer → Researcher: returns cited answer
README.md