semantic_search
Search cached content using natural language queries to find semantically similar entries. Powered by pgvector HNSW indexing with optional hybrid search for higher precision on named entities.
Instructions
Find cached entries that are semantically similar to a natural-language query. Powered by pgvector HNSW index on cachly infrastructure — embeddings never leave Germany. Requires OPENAI_API_KEY (or compatible) and the Speed/Business tier with CACHLY_VECTOR_URL. Example: "find all cached responses about password reset" or "what did we answer about pricing?"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance_id | Yes | ||
| query | Yes | Natural-language query to find similar cached content | |
| threshold | No | Minimum cosine similarity 0–1 (default: 0.82). Lower = broader matches. | |
| namespace | No | Semantic namespace to search in (default: cachly:sem) | |
| top_k | No | Maximum number of results to return (default: 5) | |
| use_hybrid | No | Enable Hybrid BM25+Vector RRF fusion search. Passes `hybrid: true` and the query text to the pgvector API for higher precision on named entities. Default: false. | |
| auto_namespace | No | Auto-detect the namespace from the query text using text heuristics instead of using the `namespace` parameter. Returns results only from the matching domain (code/translation/summary/qa/creative). |