Grounded retrieval
Embed document chunks with BGE, retrieve by cosine similarity, and pass excerpts with document and page labels to the model.
OPEN-SOURCE RAG ENGINE
OptiRAG retrieves the right passages, reuses semantically similar answers, and selects a model based on query complexity.
Low evidence, abstention, or missing citations can trigger escalation from 20B to 120B.
LIVE DEMO
Ask about OptiRAG’s documentation and follow the backend as it processes your question.
Run a query to see the cache decision, retrieved passages, model selection, and timings here.
RECORDED BENCHMARK
Compare the optimized pipeline with the baseline, which retrieves passages and always uses the large model.
Loading the recorded benchmark…
UNDER THE HOOD
FastAPI runs the pipeline. ChromaDB stores vectors and cached answers. SQLite records request metrics.
Embed document chunks with BGE, retrieve by cosine similarity, and pass excerpts with document and page labels to the model.
Reuse an answer when a question clears the similarity threshold. Tenant, corpus version, and expiry determine which entries are eligible.
Use rules or an LLM classifier to choose a model tier. Retry a small-model answer on the large model if it fails the retrieval or answer checks.