How ajanm007/jevrag works
JevRAG is a decision and calibration layer for RAG systems. Its documented end-to-end path makes chunking decisions during ingestion, filters retrieved context, loops on evidence sufficiency, generates an answer, then checks grounding; cache trust provides a separate short-circuit. The graph also includes the swappable decision backends and calibration, cost, and conformal-risk evaluation capabilities. Pipeline-to-stage links are supported by the pipeline excerpt and README; some evaluation and optional integration details are documented or indexed rather than fully sampled.
Main entry points: decision.py Decision interface · sufficiency.py Evidence sufficiency · answer_abstain.py Answer abstain · cache_trust.py Cache trust
Components 25
RAG workflow
- Document ingestion
- Search index
- User query
- Retrieval
- Answer generation
- Grounded answer
- Cache lookup
- Suppressed answer
Decision primitives
- Chunk boundary
jevrag/primitives/chunk_boundary.py - Context selection
jevrag/primitives/context_selection.py - Evidence sufficiency
jevrag/primitives/sufficiency.py - Answer abstain
jevrag/primitives/answer_abstain.py - Cache trust
jevrag/primitives/cache_trust.py
Decision backends
- Decision interface
jevrag/decision.py - Jev backend
jevrag/decision.py - Logprob backend
jevrag/backends/logprob_decision.py - Shadow backend
jevrag/backends/shadow.py
Evaluation and calibration
- Confidence calibration
jevrag/eval/calibration.py - Cost accounting
jevrag/eval/cost.py - CRC thresholds
jevrag/eval/crc.py - Risk coverage
jevrag/_vendor/selective.py - Vendor bridge
jevrag/_rag_gate.py - Vendored CRC
jevrag/_vendor/crc.py - Answer evaluator
jevrag/_vendor/evaluator.py
Other components
- Jev service
Connections 28
- Document ingestion → Chunk boundary: submits text
README.md - Chunk boundary → Search index: split or merge
README.md - User query → Retrieval: requests evidence
README.md - Search index → Retrieval: supplies passages
README.md - Retrieval → Context selection: filters passages
README.md - Context selection → Evidence sufficiency: provides context
README.md - Evidence sufficiency → Retrieval: requests another round
README.md - Evidence sufficiency → Answer generation: permits generation
README.md - Answer generation → Answer abstain: checks answer
README.md - Answer abstain → Grounded answer: returns grounded
README.md - Answer abstain → Suppressed answer: suppresses ungrounded
README.md - User query → Cache lookup: checks cache
README.md - Cache lookup → Cache trust: assesses entry
- Cache trust → Grounded answer: serves if safe
- Cache trust → Retrieval: falls back if unsafe
README.md - Chunk boundary → Decision interface: asks
jevrag/primitives/chunk_boundary.py - Context selection → Decision interface: asks
jevrag/primitives/context_selection.py - Evidence sufficiency → Decision interface: asks
jevrag/primitives/sufficiency.py - Answer abstain → Decision interface: asks
jevrag/primitives/answer_abstain.py - Cache trust → Decision interface: asks
jevrag/primitives/cache_trust.py - Jev backend → Jev service: calls
jevrag/decision.py - Logprob backend → Decision interface: implements
jevrag/backends/logprob_decision.py - Shadow backend → Decision interface: wraps
jevrag/backends/shadow.py - Confidence calibration → Risk coverage: uses risk metrics
jevrag/eval/calibration.py - CRC thresholds → Vendor bridge: loads CRC core
jevrag/eval/crc.py - Vendor bridge → Vendored CRC: exposes
jevrag/_rag_gate.py - Vendor bridge → Risk coverage: exposes
jevrag/_rag_gate.py - Vendor bridge → Answer evaluator: exposes
jevrag/_rag_gate.py