Skip to content

Latest commit

 

History

History
43 lines (35 loc) · 2.98 KB

README.md

File metadata and controls

43 lines (35 loc) · 2.98 KB

rag-cpp documentation

Task- and subsystem-oriented guides for rag-cpp — a type-theoretic, production-grade retrieval (RAG) engine in modern C++23.

New here? Read Getting Started first, then reach for the guide that matches what you're building.

Guides

Guide What it covers
Getting Started Install, build, first index, first query — both the CLI and the C++ library.
Retrieval Hybrid BM25 + dense, HNSW ANN, score fusion, metadata filtering, quantization. The scoring core.
Vector store Using rag-cpp as a plain vector database: you own the ids and vectors, no text pipeline.
The Pipeline Composable retrieval stages, the standard / quality / context factories, and writing your own stage.
Embedders Every embedding backend, the retry/fallback decorators, the HttpTransport seam, and the in-process ONNX / GGUF paths.
Formats and languages Office documents with no dependency, the extractor registry for in-house formats, and chunking languages nobody has a parser for.
Advanced Retrieval SPLADE, ColBERT, RAPTOR, HyDE / multi-query, Corrective RAG, and GraphRAG.
Configuration Every tunable: CorpusConfig, HnswConfig, chunking, contextual retrieval, thresholds.
The CLI Full ragcpp command reference — index, query, eval, info, serve.
Serving over RCP Turning an Engine into a conformant RCP/1 server; capability advertisement and conformance.
Persistence The .ragdb container, the write-ahead log, and the durability model.
The C API & bindings The flat C ABI and how to drive the engine from Python, Rust, or Go.
GPU acceleration The optional Metal batch-scoring backend: when it engages and what it buys.

Reference docs (repository root)

  • ARCHITECTURE.md — the layer diagram, seams, and design invariants.
  • PLUGINS.md — the three extension axes (concepts, AnyX, the load-time registry).
  • FORMAT.md — the byte-level .ragdb on-disk contract.

The shape of the library in one paragraph

You build an Engine, attach an optional embedder, add() documents, build() the indexes, and search(). Under the facade sits a Corpus (ground truth + BM25

  • HNSW + dense vectors) and a Pipeline of composable stages. Everything fallible returns Result<T> = std::expected<T, Error> — there are no exceptions for expected failure. Every extension point is a concept, so you plug in a backend by matching a shape, not by inheriting. The whole thing persists to a single versioned file and can be served over RCP with no glue code.