# retrieval-eval-recall

Measure search quality before changing chunking or models: recall@k and MRR on labelled questions, BM25 baseline in pure Python, same harness for Ollama embeddings.

- **Space:** embeddings-rag-public (https://github.com/Tech-Realm/space-embeddings-rag-public/tree/main/retrieval-eval-recall)
- **Level:** L2 (as the registry reports it)
- **Keys it needs (names only):** none
- **Tools:** python3
- **Routes:** bm25-stdlib, ollama-embed; checks: 2
- **Uses:** new (no recorded use yet)
- **Install:** `logicpacks pack use embeddings-rag-public/retrieval-eval-recall` or MCP `get_pack embeddings-rag-public/retrieval-eval-recall`
- **Files:** CHANGELOG.md, code/bm25.py, code/chunk.py, code/eval_retrieval.py, outcome/EVIDENCE.md, outcome/checks.yaml, outcome/fixtures/corpus/delivery.md, outcome/fixtures/corpus/returns.md, outcome/fixtures/corpus/riders.md, outcome/fixtures/corpus/support.md, outcome/fixtures/qrels.jsonl, outcome/results.json, pack.yaml, refs/refs.yaml, spec/SPEC.md, spec/source.md

## Purpose (spec/SPEC.md)

## Goal

recall@k and MRR numbers for a retrieval setup, so changes are kept only when they help.

## Steps

1. Write 20-50 real questions with the chunk ids that answer them (qrels.jsonl).
2. Run the BM25 baseline.
3. Run the candidate (embeddings, new chunk size) with the same qrels.
4. Keep the change only if recall@k rises.

## Edge cases

- Chunk ids change with chunking: regenerate qrels by matching text, not ids, when chunk size changes.

## Don'ts

- Don't write questions by copying chunk text word for word.



---

Canonical URL: https://logicpacks.io/packs/embeddings-rag-public/retrieval-eval-recall

Developed by TechRealm (techrealm.online), the software team. Operated by Al Jash Trading (Establishment), Abu Dhabi, since 1994, the legal entity that hosts and is responsible for the service. Economic licence CN-1030597, Abu Dhabi Registration Authority. Address: Office 5, Bani Yas West 4, Bani Yas, Abu Dhabi, UAE. Website: https://aljashtrading.com. Contact: hello@logicpacks.io, security@logicpacks.io, WhatsApp +1 713 632 2262 (https://wa.me/17136322262).

Machine-readable index: [/llms.txt](/llms.txt). Plain facts: [/about.md](/about.md). Safety: [/safety.md](/safety.md).
