Semantic Search
search_semanticSearch Pāli tipiṭaka by semantic similarity. Adjust threshold for strict or broad matches, independent of keyword search.
Instructions
Semantic search — match by meaning, not exact words.
Uses vector similarity (cosine distance) over text_pali embedded with
a multilingual MiniLM model.
🤔 In most cases you should use search_hybrid instead — it
combines this semantic search with keyword search and ranks better.
Use this tool only when you need:
Pure semantic results (no keyword influence)
Fine-grained
thresholdtuning (hybrid uses RRF which is harder to tune)To debug what semantic alone picks up vs keyword
⚠️ Known limitations:
The index is Pāli only (English/Thai queries pass through the multilingual embedding but the model isn't tuned on Pāli)
English queries usually embed better than Thai (model is EN-primary)
For specific Pāli terms (
appamāda,dukkha), exact match is better — usesearch_by_keywordinsteadPāli stock phrases recur in many suttas → similarity scores cluster; read the top 10, don't trust rank 1 alone
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Query text (English works best, then Pāli, Thai is weakest). | |
| language | No | Output language — "pali", "thai", "english", or "all" (Thai disabled → null). | pali |
| limit | No | Maximum results (default: 5, max: 20). | |
| threshold | No | Maximum cosine distance (smaller = stricter match). Default 0.7; lower to 0.5 for tighter matches, raise to 0.9 for broader. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |