evaluate_retrieval
Measures retrieval quality by testing expected documents appear in search results. Provides MRR@5 and per-query hit/miss analysis.
Instructions
Evaluate search quality by testing whether search_knowledge() retrieves expected documents.
Read-only. Runs multiple search queries internally. No side effects on the index.
Args: test_cases: JSON string array of test cases. Each item requires "query" (search string) and "expected_filepath" (path of the document that should appear in top-5 results). Example: [{"query": "suid exploit", "expected_filepath": "security/suid.md"}]
Returns: JSON string with MRR@5 (Mean Reciprocal Rank), Recall@5, and per-query hit/miss breakdown. MRR@5 above 0.7 indicates good retrieval quality.
Usage: Use to audit search quality after bulk document ingestion or after tuning hybrid_alpha. Use get_index_stats() for system health checks instead. Use search_knowledge() for actual document retrieval — this tool is for quality measurement only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| test_cases | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |