examples/

directory
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: MIT

README

Reliquary Examples and Demos

Run any example from the repository root:

GOWORK=off go run ./examples/<example-dir>
High-Level Facade
  • quickstart-rag: Zero-config in-memory hybrid retrieval facade (documents -> Ingest -> Search).
  • metadata-filtering: Structured metadata filtering (WithFilter) by JSON scalars and reserved fields (filename, document_id).
  • search-pipeline: Full search pipeline with RRF fusion, external reranking, MMR diversification, and typed explanations.
  • rag-ingest-retrieve: Manual hybrid retrieval pipeline with BM25, vector search, and MMR reranking.
  • retrieval-calibration-tune: Retrieval evaluation and hybrid weight calibration against gold relevance sets.
Index Providers (Storage Backends)
  • sqlite-index: SQLite index adapter (adapter/sqlite) with FTS5 lexical BM25 matching, vector cosine distance, and schema migration.
  • postgres-index: PostgreSQL index adapter (adapter/postgres) with pgvector and caller-owned pgxpool connection management.
Embedder Providers & Caching
  • provider-openai-wiring: OpenAI embedding adapter (adapter/openai) configuration with dimension bounds.
  • provider-ollama-wiring: Ollama embedding adapter (adapter/ollama) with native /api/embed batch vectors and endpoint fallback.
  • embed-server-quickstart: Local embeddings server adapter with nomic task prefixes and Matryoshka dimensions.
  • embedding-cache: Transparent embedding cache decorator (embedding/cache + inmem.Store) eliminating redundant provider calls.
Judgment Providers (Evaluation & Reasoning)
  • judgment-quickstart: Typed Choice/Score/Noul evaluation core with TTL memory cache and reflex-to-deliberate escalation.
  • judgment-semantic-quickstart: Semantic judgment memory scanning cosine similarity over vectors with local embedding models.
  • provider-jev-judge: Jev typed evaluation adapter (adapter/jev) mapping Choice, Score, and Noul primitives.
  • provider-structjudge-wiring: Schema-forced structured LLM judge adapter (adapter/structjudge) with JSON schema completion validation.
Retrieval, Chunking, & Ingest Pipelines
  • filesystem-ingest: Batch directory tree scanner (pipeline/ingest/fs) with file filtering and pipeline streaming into Reliquary.
  • chunking-strategies: HeadingAware, SentenceBoundary, SmartBoundary, and Recursive text chunking strategies.
  • dedup-pipeline: Ingestion deduplication using NormalizedHash (exact/whitespace) and SimHash (near-duplicate clustering).
  • vector-clustering-pq: K-Means vector clustering (vector/clustering) and Product Quantization (vector/pq) vector compression.

Directories

Path Synopsis
Command chunking-strategies demonstrates Reliquary's chunking strategies (HeadingAware, SentenceBoundary, SmartBoundary, and Recursive).
Command chunking-strategies demonstrates Reliquary's chunking strategies (HeadingAware, SentenceBoundary, SmartBoundary, and Recursive).
Command dedup-pipeline demonstrates Reliquary's near-duplicate detection and canonical text normalization primitives.
Command dedup-pipeline demonstrates Reliquary's near-duplicate detection and canonical text normalization primitives.
Command embed-server-quickstart wires a local OpenAI-compatible embedding server into the reliquary facade.
Command embed-server-quickstart wires a local OpenAI-compatible embedding server into the reliquary facade.
Command embedding-cache demonstrates decorating an embedding.Embedder with Reliquary's transparent embedding cache (embedding/cache + inmem.Store).
Command embedding-cache demonstrates decorating an embedding.Embedder with Reliquary's transparent embedding cache (embedding/cache + inmem.Store).
Command filesystem-ingest demonstrates scanning and ingesting a directory tree of documents into Reliquary using pipeline/ingest/fs.
Command filesystem-ingest demonstrates scanning and ingesting a directory tree of documents into Reliquary using pipeline/ingest/fs.
internal
examplekit
Package examplekit holds demo-only helpers for examples.
Package examplekit holds demo-only helpers for examples.
Command judgment-quickstart wires the Embed→Judge stack end to end.
Command judgment-quickstart wires the Embed→Judge stack end to end.
Command judgment-semantic-quickstart wires semantic judgment memory over a local OpenAI-compatible embedding server.
Command judgment-semantic-quickstart wires semantic judgment memory over a local OpenAI-compatible embedding server.
Command metadata-filtering demonstrates Reliquary's structured metadata filtering during hybrid search.
Command metadata-filtering demonstrates Reliquary's structured metadata filtering during hybrid search.
Command provider-jev-judge demonstrates adapting a typed Jev evaluation client to Reliquary's judgment contracts (Choice, Score, and Noul).
Command provider-jev-judge demonstrates adapting a typed Jev evaluation client to Reliquary's judgment contracts (Choice, Score, and Noul).
Command provider-ollama-wiring demonstrates configuring and wiring the Ollama embedding adapter into Reliquary.
Command provider-ollama-wiring demonstrates configuring and wiring the Ollama embedding adapter into Reliquary.
Command provider-structjudge-wiring demonstrates adapting a structured-output LLM completion client (e.g.
Command provider-structjudge-wiring demonstrates adapting a structured-output LLM completion client (e.g.
Command quickstart-rag is the short, copyable retrieval path.
Command quickstart-rag is the short, copyable retrieval path.
Command rag-ingest-retrieve demonstrates an end-to-end retrieval pipeline assembled from reliquary packages the way a real consumer would:
Command rag-ingest-retrieve demonstrates an end-to-end retrieval pipeline assembled from reliquary packages the way a real consumer would:
Command retrieval-calibration-tune demonstrates the retrieval quality-control layer: captured runs, threshold checks, score-reference calibration, and deterministic weight tuning.
Command retrieval-calibration-tune demonstrates the retrieval quality-control layer: captured runs, threshold checks, score-reference calibration, and deterministic weight tuning.
Command sqlite-index demonstrates Reliquary's SQLite candidate index adapter.
Command sqlite-index demonstrates Reliquary's SQLite candidate index adapter.
Command vector-clustering-pq demonstrates Reliquary's vector clustering and Product Quantization (PQ) compression primitives.
Command vector-clustering-pq demonstrates Reliquary's vector clustering and Product Quantization (PQ) compression primitives.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL