Biblicus

Make your documents usable by your assistant, then decide later how you will search and retrieve them.

Adding a Retrieval Backend

Backends are pluggable engines that implement a small, stable interface. The goal is to make new retrieval ideas easy to test without reshaping the corpus.

For user documentation on available backends, see the Backend Reference.

Backend contract

Backends implement two operations:

Run artifacts

Backends store artifacts and manifests under:

retrieval/<backend_id>/<snapshot_id>/
  manifest.json
  <backend artifacts>

The manifest is the reproducible contract. Artifacts are backend-specific and listed in artifact_paths.

Implementation checklist

  1. Define a Pydantic configuration model for your backend configuration.
  2. Implement RetrievalBackend:
    • build_run(corpus, configuration_name, config)
    • query(corpus, run, query_text, budget)
  3. Emit Evidence with required fields:
    • item_id, source_uri, media_type, score, rank, stage, configuration_id, snapshot_id
    • text or content_ref
  4. Register the backend in biblicus.backends.available_backends.
  5. Add behavior-driven development specifications before implementation and make them pass with 100% coverage.

Design notes

Reproducibility checklist

Common pitfalls

Examples

See: