bifrost-rag
Production RAG pipeline with vector retrieval, configurable chunking, and evaluation harness.
Features
- Chunking strategies — Fixed-size, sentence-based, and recursive splitting
- Vector stores — ChromaDB (local) with pluggable store interface
- Retrieval — Top-K retrieval with score thresholds
- Evaluation harness — Precision@K, Recall@K, F1, MRR metrics
- Pipeline orchestrator — Ingest, retrieve, and query in one interface
Architecture
┌─────────────┐ ┌──────────────┐ ┌──────────────┐
│ Chunking │───▶│ Embeddings │───▶│ Vector Store │
│ strategies │ │ (Voyage) │ │ (ChromaDB) │
└─────────────┘ └──────────────┘ └──────┬───────┘
│
┌──────────────┐ ┌──────▼───────┐
│ Evaluation │◀───│ Retrieval │
│ harness │ │ pipeline │
└──────────────┘ └──────────────┘
Installation
pip install bifrost-rag
Quick Start
from bifrost_rag import ChromaStore, Document, RAGPipeline, FixedSizeChunker
# Create a vector store
store = ChromaStore(collection_name="my-docs")
# Chunk and ingest documents
chunker = FixedSizeChunker(chunk_size=500, overlap=50)
text = "Your long document text here..."
chunks = chunker.chunk(text, metadata={"source": "doc1"})
# Add documents with embeddings (from your embedding provider)
docs = [
Document(id=f"chunk-{c.index}", text=c.text, embedding=your_embeddings[i])
for i, c in enumerate(chunks)
]
pipeline = RAGPipeline(store=store, top_k=5)
pipeline.ingest(docs)
# Query
result = pipeline.query(query_embedding=query_embed)
print(result.sources)
Chunking Strategies
| Strategy | Description |
|---|---|
FixedSizeChunker |
Split by character count with overlap |
SentenceChunker |
Split by sentence boundaries |
RecursiveChunker |
Hierarchical split: paragraphs → sentences → characters |
Evaluation
from bifrost_rag import RAGEvaluator, Document
evaluator = RAGEvaluator()
# Evaluate retrieval quality
dataset = [
{
"retrieved": [Document(id="d1", text="..."), Document(id="d2", text="...")],
"relevant_ids": {"d1"},
},
]
result = evaluator.evaluate(dataset, k=5)
print(result.summary())
License
MIT
Metadata
Release files for bifrost-rag 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bifrost_rag-0.1.0.tar.gz | 10.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bifrost_rag-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.0 kB
Release files / bifrost_rag-0.1.0.tar.gz
| Download URL | bifrost_rag-0.1.0.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c7ae8af76fe8513d7d7d7f40a1523c63a88bef7db91bc9ca062d112dd3b4ded
|
|
BLAKE2b-256 checksum How to use checksums |
87fd30167fcc4f73532d07b5abb68c6d70a0976219d7cf02a63ac14197552947
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / bifrost_rag-0.1.0-py3-none-any.whl
| Download URL | bifrost_rag-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b240bc4851b820f256854a30a9229bf96c8c7d4479ccc84d11a3293a2c87c57f
|
|
BLAKE2b-256 checksum How to use checksums |
63f542ccd49167154cadd87ccf5f151cc8a383c79409bae8dcbab63832e41160
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for bifrost-rag 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.