Varagity¶
Varagity is a self-hosted, GPU-accelerated Retrieval-Augmented Generation (RAG)
system implementing Anthropic-style Contextual Retrieval: documents are parsed,
chunked, situated with LLM-generated context blurbs, then indexed for hybrid
(semantic + BM25) retrieval with cross-encoder reranking and grounded, cited
answers. The primary surface is the web GUI at :3000 — streaming chat whose
evidence panel shows how each answer was built, chunk by chunk — with the
terminal CLI as a peer front-end over the same Prefect flows, and a
Prometheus/Grafana pair watching the whole pipeline.
This site is the as-built documentation of the system (v1 + v2):
-
Architecture
Service topology, the two pipelines, the
(doc_id, original_index)identity thread, and why Contextual Retrieval. -
Codebase map
The whole system as one interactive graph — the web GUI's
/map, built into this site: click a card to trace its downstream flow. -
Data model
The chunk metadata record, PostgreSQL schema, Elasticsearch mapping, and idempotency semantics.
-
Pipelines
The ingest/query/eval Prefect task graphs and their retry/caching posture.
-
Runbook
Clean clone to answered question, plus every operational gotcha — healthchecks, volumes, GPUs, OCR, Elasticsearch.
-
HTTP API
The wire contract, auto-rendered from the checked-in OpenAPI snapshot, plus the two SSE event protocols and the error-envelope conventions.
-
ADRs
The decisions with lasting consequences and their why — from pgvector-over-Qdrant to document page previews.
-
API reference
Every public module, class, and function, rendered from the package's Google-style docstrings via mkdocstrings.
-
Specs & plans
spec.mdandspec_v2.mdat the repository root are the forward-looking designs this system was built from;thoughts/shared/plans/holds the vertical slices each build followed.
Naming caution
docs/ in this repository is the gitignored ingest corpus (the documents the
RAG system indexes), not project documentation. Project documentation — what you
are reading — lives in golden-docs/.