Confident answers. Zero proof.

INTRODUCING · PYTHON

Agentic RAG & Knowledge System

A knowledge assistant that proves its answers: hybrid vector + graph retrieval, self-grading, and a human instead of a guess.

livePythonLangGraphFastAPIPineconeChroma
Agentic RAG & Knowledge System console answering with sources
The problem

Your company runs on documents nobody has time to read. Ask a plain AI and it sounds sure of itself, but it makes things up and can't show where the answer came from.

Zero proof
The solution

The system retrieves from a vector store and a knowledge graph, grades its own evidence, rewrites the question when evidence is weak, and hands off to a person when retries run out. Every answer shows its sources, and quality is a number gated in CI.

How it works

01
Ask
A question arrives and passes the input guardrail.
02
Retrieve
Vector search and graph relationships are fused.
03
Grade
The agent grades the retrieved context.
04
Rewrite or escalate
Weak evidence triggers a query rewrite; exhausted retries escalate to a human.
05
Answer with sources
The answer is generated from the graded context, with its sources attached.
Watch the Agentic RAG & Knowledge System film

English subtitles burned in · Spanish CC on YouTube

Features

Every answer shows its sources.

Vector search and a knowledge graph are fused, and every answer cites the passages it used. On multi-hop questions hybrid retrieval recalls 0.92 of the needed context vs 0.83 for vector-only.

It checks its own evidence.

Before it answers, the agent grades what it retrieved. Too weak? It rephrases the question and tries again.

Still nothing? It won't guess.

When retries run out, the run stops and a person decides in the review queue. Off-topic questions are refused instead of answered.

Quality you can measure.

A RAGAS-style scorecard with its provenance is versioned in git and gated in CI. A regression in faithfulness fails the build.

Prompts ship only when they win.

Prompts are versioned with a hash-chained audit log and promoted only after a measured A/B run. The answer prompt went v1 to v2 that way: judge 4.76 to 4.86.

A fraction of a cent per query.

Token usage is tracked per query against a one-cent budget, live in the dashboard. The committed run measured $0.0004 per query.

Architecture

Architecture of the Agentic RAG system: input guardrail, budget gate, hybrid vector and graph retrieval, document grading loop, human review and output guardrail, with a versioned prompt registry feeding every model step
Source: project README
Text description of the diagram

START enters the guardrail: blocked input goes to error_output and END; safe input continues to the budget_gate — an exhausted budget ends the run, ok reaches hybrid retrieve (vector · Pinecone/Chroma plus graph · Neo4j/NetworkX) then grade_documents. With enough docs the flow goes to generate; with retry available it rewrites via transform_query and retrieves again; retries exhausted escalates to human_review — approve generates, retry retrieves again, override goes straight to output_guardrail. Generated answers always pass the output_guardrail before END. Dotted edges are prompts injected from the prompt_registry, which holds the promoted version of each prompt: grade_documents, transform_query and generate resolve theirs at call time, and the output_guardrail reads the same protected texts to catch prompt leakage. New versions reach the registry only through the A/B gate and its hash-chained audit chain, which promote or roll back a version without a restart.

Measured. Not claimed.

0
Faithfulness
Live scorecard, 18 typed cases, Pinecone + Neo4j; gate 0.85
0
Answer relevancy
Same run; gate 0.85
0
Context recall
Same run; context precision 0.98; gate 0.75
0
Cost per query
Same run; budget $0.01
0
Automated tests
Plus 27 browser e2e; 95% coverage on app/
Faithfulness — hybrid retrieval vs no retrieval, same 18 cases
0
this system
vs
0
baseline

The retrieval layer, not the prompt, is what grounds the answers

KNOWN LIMITATIONS
  • Latency misses its targets on the cloud-backed path: p50 3.6 s / p95 7.2 s vs 3 s / 6 s.
  • Neo4j Aura free tier sleeps after inactivity: the system degrades to vector-only and the first query after idle can be slow.
  • The Prompt Registry is a single-writer, file-based store.
  • 18 evaluation cases are a regression gate, not a benchmark.

Stack

PythonLangGraphFastAPIPineconeChromaNeo4jLangfuseDocker
NEED AGENTS YOU CAN TRUST IN PRODUCTION?

Point it at your documents.

Policies, contracts, manuals: I adapt it to your knowledge base on request.