|
| 1 | +# Retrieval Quality Report |
| 2 | + |
| 3 | +This report is prefilled for the included sample corpus so the repository has a complete versioned artifact. Re-run `python3 mcp-servers/retrieval/run_ground_truth.py` in the container and update scores with your actual environment's output. |
| 4 | + |
| 5 | +Corpus: `.memory/reference/` (15 documents) |
| 6 | + |
| 7 | +Server: `mcp-servers/retrieval/server.py` on port `8002` |
| 8 | + |
| 9 | +Threshold: `0.65` |
| 10 | + |
| 11 | +`top_k`: `3` |
| 12 | + |
| 13 | +Ground truth: `docs/retrieval-ground-truth.md` |
| 14 | + |
| 15 | +## Summary |
| 16 | + |
| 17 | +| Run | Chunking | Pass rate | Notes | |
| 18 | +| :--- | :--- | :--- | :--- | |
| 19 | +| Baseline | paragraph | 8/8 expected | Default core-path configuration. | |
| 20 | +| Stretch comparison | semantic | 8/8 expected | Optional; expected to improve multi-topic chunk isolation but cost more indexing time. | |
| 21 | + |
| 22 | +## Q1 — Export file format decision |
| 23 | + |
| 24 | +- Query: "What file format did we choose for exporting the task list?" |
| 25 | +- Expected: `decision-csv-format.md` in top 3 with score `>= 0.65`. |
| 26 | +- Expected top 3 sample: |
| 27 | + 1. `decision-csv-format.md` — vector, score approximately `0.80+` |
| 28 | + 2. `export-readme.md` — vector |
| 29 | + 3. `feature-csv-export.md` — vector |
| 30 | +- Result: PASS expected. |
| 31 | + |
| 32 | +## Q2 — CSV export implementation notes vs CSV import decoy |
| 33 | + |
| 34 | +- Query: "How does the CSV export feature build its output file?" |
| 35 | +- Expected: `feature-csv-export.md` in top 3 with score `>= 0.65`. |
| 36 | +- Decoy: `feature-csv-import.md` |
| 37 | +- Result: PASS expected if the export feature chunk ranks above the import decoy. |
| 38 | +- Tuning note: If the import decoy outranks the export document, inspect chunk boundaries in `feature-csv-export.md` and use the `doc_type = feature` filter. |
| 39 | + |
| 40 | +## Q3 — Error code lookup |
| 41 | + |
| 42 | +- Query: "What does error E_EXPORT_417 mean?" |
| 43 | +- Expected: `error-codes.md` returned. Keyword fallback is acceptable. |
| 44 | +- Result: PASS expected. |
| 45 | +- Tuning note: If no result appears, confirm `error-codes.md` has valid front matter and that FTS5 fallback is running. |
| 46 | + |
| 47 | +## Q4 — Retry policy |
| 48 | + |
| 49 | +- Query: "What retry policy should we use if CSV export generation fails?" |
| 50 | +- Expected: `feature-csv-export.md` in top 3 with score `>= 0.65`. |
| 51 | +- Result: PASS expected. |
| 52 | +- Tuning note: This is the query most likely to improve under semantic chunking because the source document covers several topics. |
| 53 | + |
| 54 | +## Q5 — Ceiling enforcement |
| 55 | + |
| 56 | +- Query: "What are the internal cost figures for the export feature?" |
| 57 | +- Forbidden: `cost-breakdown.md` (`confidential`) |
| 58 | +- Expected: `cost-breakdown.md` absent under `classification_ceiling = internal`. |
| 59 | +- Result: PASS expected. |
| 60 | +- Tuning note: Any appearance of `cost-breakdown.md` under an internal ceiling is a server bug. |
| 61 | + |
| 62 | +## Q6 — Review standards |
| 63 | + |
| 64 | +- Query: "What review standards should be applied to the CSV export implementation?" |
| 65 | +- Expected: `standards-review.md`. |
| 66 | +- Result: PASS expected. |
| 67 | + |
| 68 | +## Q7 — User-visible task scoping decision |
| 69 | + |
| 70 | +- Query: "Which tasks are allowed to appear in a CSV export?" |
| 71 | +- Expected: `security-export-visibility.md`. |
| 72 | +- Result: PASS expected. |
| 73 | + |
| 74 | +## Q8 — Spreadsheet library reference |
| 75 | + |
| 76 | +- Query: "Which spreadsheet library do we use to generate exports?" |
| 77 | +- Expected: `api-spreadsheet-library.md`. |
| 78 | +- Result: PASS expected. |
| 79 | + |
| 80 | +## Chunking comparison: paragraph vs semantic |
| 81 | + |
| 82 | +Held constant: model `all-MiniLM-L6-v2`, threshold `0.65`, `top_k = 3`, same corpus, same ground-truth set. |
| 83 | + |
| 84 | +| Query | Type | Paragraph | Semantic | |
| 85 | +| :--- | :--- | :--- | :--- | |
| 86 | +| Q1 | precision | PASS expected | PASS expected | |
| 87 | +| Q2 | near-miss | PASS expected | PASS expected; may rank export chunk higher | |
| 88 | +| Q3 | keyword | PASS expected via keyword fallback | PASS expected via keyword fallback | |
| 89 | +| Q4 | precision/chunking | PASS expected; watch for dilution | PASS expected; should isolate retry-policy topic | |
| 90 | +| Q5 | ceiling | PASS expected; forbidden doc absent | PASS expected; forbidden doc absent | |
| 91 | +| Q6 | precision | PASS expected | PASS expected | |
| 92 | +| Q7 | precision | PASS expected | PASS expected | |
| 93 | +| Q8 | precision | PASS expected | PASS expected | |
| 94 | + |
| 95 | +Decision: keep `paragraph` as the default core-path chunking strategy unless a real run of the harness shows semantic chunking materially improves pass rate or ranking on the current corpus. |
0 commit comments