Hybrid RAG workbench
An in-progress document-chatbot experiment with classic and CLaRa-inspired hybrid retrieval paths. Comparison tooling exists; the results have not been tested or conclusions drawn.
Progress and limits
Implemented comparison and evaluation tooling alongside the existing document-grounded baseline. Benchmark results, conclusions and a completed research write-up are still outstanding.
Local development only. The comparison results have not been tested, and no conclusion or measured retrieval improvement is claimed. A completed research write-up is still outstanding. This is CLaRa-inspired work, not a reproduction of its full architecture. Structured table and figure ingestion and the newer Azure provider remain planned.
See evidence and sourcesDoes this hybrid approach retrieve better evidence than the existing baseline? That question is still open.
I’m revisiting an older document-grounded chatbot to make retrieval inspectable. The local tooling exposes a classic vector-search baseline and a CLaRa-inspired hybrid route over the same uploaded corpus. I have not yet tested the comparative results or reached conclusions about the approach.
What the retrieval comparison tooling implements
- Preserved the existing upload, extraction, chunking, embedding, retrieval and cited-answer pipeline.
- Added query clarification, a broader vector candidate pool, reranking using vector and lexical signals, and evidence snippet compression.
- Built a comparison interface showing sources, retrieved chunks, candidate diagnostics and clarification behaviour.
- Added an evaluation API and CLI using expected source titles and evidence terms, with saved JSON results and a readable summary.
- Documented a phased ingestion plan that keeps local text extraction working before adding richer table and figure handling.
Engineering decisions
Keep a baseline to compare against
Classic retrieval remains available alongside the hybrid route so changes can be judged against the same documents and questions.
Inspect evidence separately from answers
Source matches, term coverage, retrieval latency and compression expose different trade-offs. A fluent generated response is not treated as an evaluation result.
Build locally before adding providers
Offline mock mode supports local development. Structured extraction, newer Azure document processing and selective visual analysis are documented next steps.
What has been evaluated so far?
- Classic and hybrid chat routes, the comparison interface and the labelled evaluation API and CLI are present in the local workspace.
- The hybrid service exposes its vector, lexical and query-term coverage signals along with compression diagnostics.
- The evaluation tooling can retain per-case outputs. Comparative benchmark findings and a completed research write-up remain outstanding.