For each knowledge library, before trusting it, write 20 questions against documents you know well:
| Category | Count | Purpose |
|---|---|---|
| Simple factual (answer in one place) | 5 | Baseline retrieval precision |
| Multi-section (answer spans sections/chapters) | 5 | Chunking + top-k adequacy |
| Comparison (two documents or two sections) | 5 | Cross-document retrieval |
| Not answerable from the documents | 5 | Refusal test — the critical one |
Record them in a copy of the template below (keep per-library test files in your
backup folder, e.g. tests/RE-Signalling-testset.md):
Q##: <question> [<language: EN|AR|mixed>]
Expected source: <document, section, page> | NOT IN CORPUS
Result: <answer summary>
Retrieved correctly: Y/N Faithful: Y/N Citation correct: Y/N
Refused correctly (for NOT-IN-CORPUS): Y/N
Latency: <s> Notes:
For Gate 8, ensure across the set: ≥5 questions in Arabic, ≥5 in English, ≥2 mixed (Arabic question about an English document and vice versa).
Per library, compute from the test log:
| Metric | Definition | Target |
|---|---|---|
| Retrieval precision | Correct source retrieved / answerable Qs | ≥ 0.8 |
| Answer faithfulness | Answers fully supported by retrieved text / answerable Qs | ≥ 0.8 |
| Citation accuracy | Citations pointing to real, correct locations / cited answers | 1.0 (no fakes) |
| Missing-info detection | Correct refusals / unanswerable Qs | ≥ 0.8 |
| Latency | Median seconds to complete answer | ≤ 60 s STANDARD mode |
| RAM headroom | Free RAM during RAG answer | > 1.5 GB |
Simple evaluation score = mean of the first four ratios. Faithfulness > fluency: a plain answer supported by evidence always outranks an impressive hallucination.
Change one variable per iteration; re-run the same test set; log the result in
docs/12-final-report.md §F.