Agentic RAG · Guardrails · CI drift gate

Documentation answers
you can trust in CI.

DocDrift serves grounded, cited answers from your markdown docs — then keeps them honest. Every deploy is scored with Ragas, and the build fails when a doc, prompt, or config change measurably degrades answer quality.

5
Ragas metrics
3-layer
Prompt guardrails
100%
Answers cited
CI
Drift-gated deploys
Platform

Everything between your docs and a trusted answer

A serving path with production safeguards, and a quality gate that treats answer quality like a test suite.

Drift gate in CI

Every change is scored against a committed baseline. Regressions fail the build.

5Ragas metrics per push
<0.05drift tolerance vs baseline
0silent regressions shipped

Agentic retrieval

The model decides when to search. Multi-hop questions get a second pass.

Layered guardrails

Injection filter in, grounding checks out. Every answer gets a verdict.

Citation audit

Citations verified against retrieval. Miscites auto-corrected.

Multi-LLM benchmark

Models scored head-to-head on your docs. The champion serves.

Full observability

Per-request traces, verdicts, latency — durable in Postgres.

Pipeline

From markdown to a gated deploy

Five stages. The last one is the point: quality regressions never reach production silently.

01

Ingest

Markdown chunked, embedded, indexed in Qdrant.

02

Retrieve

Dense search + MMR, optional BM25 hybrid and rerank.

03

Answer

Agent loop writes a grounded, source-cited answer.

04

Evaluate

Synthetic QA scored with five Ragas metrics.

05 · GATE

Drift gate

Regression vs baseline fails the build — bad answers never ship.

ci · llmops-eval.yml
# every push touching docs, prompts, or config
$ python pipeline.py
Running RAG evaluation… 5 metrics × synthetic QA set
faithfulness       0.91   
answer_relevancy   0.88   
answer_correctness 0.84   
Drift check passed. baseline unchanged → deploy continues
Stack

Boring where it should be, sharp where it counts

Python service with pluggable model providers — local Ollama to any OpenAI-compatible endpoint — and optional Postgres/Redis/Qdrant Cloud for stateless deploys.

FastAPIQdrantRagas OllamaHF InferencePostgres RedisBM25Pydantic GitHub ActionsDocker
Docs

Up and running in three commands

Ingest your markdown, ask a question, or call the API. Everything runs locally with zero cloud setup.

Point DocDrift at a folder of markdown, then ask questions grounded in it — from the CLI or the browser.

1Install & configure
# Python 3.11
pip install -r requirements.txt
cp .env.example .env
2Ingest your docs
python -m src.ingestion.cli --all
3Ask a question
python -m src.agentic.cli "How long do auth tokens last?"

Prefer the browser?

Run the service and open the playground — same pipeline, live.

uvicorn src.api.app:app --port 8000   # then open http://localhost:8000

Ask your docs something.

The live playground runs the full pipeline — retrieval, guardrails, citations, and the current champion model.