semantic_search_deep
Retrieve passages that plain recall misses by widening each hit into its surrounding passage and reranking candidates to return the best few.
Instructions
Deep recall: retrieve wide, widen each hit into its surrounding passage, then rerank with a cross-encoder and return the best few.
Use this deliberately, not by default. It is for one situation: the passage you need is in the corpus but sits below the plain-recall cutoff - the twentieth hit rather than the third. When plain recall is already precise, reranking can scatter it just as easily as it can help.
⚠ score here is a reranker logit, not a cosine. It orders the results and nothing else: there is no value at which it becomes "relevant", and scores from different queries are not comparable. recall_score keeps the original cosine alongside it. ⚠ Recall layer only, exactly as with semantic_search: verbatim quotes, page numbers and emphasis are verified against the source PDF, never cited from here.
⚠ First call downloads ~2.3 GB (the ONNX graph plus its external weight file) and is slow; later calls reuse the cached model. That is ten times the embedding model this project fetches by default - worth knowing before you invoke this rather than after. Requires the LanceDB backend. Point SEMANTIC_RECALL_RERANKER at a smaller cross-encoder if that is too much.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "semantic_search_deep"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| query | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |