qdrant_search
Search for similar documents in Qdrant by embedding text with Ollama. Optionally enhance results with query expansion, HyDE, and reranking.
Instructions
Search for similar documents in Qdrant.
Embeds the query text using Ollama, then searches for similar vectors in the specified Qdrant collection. Returns matching documents with similarity scores.
Supports advanced features:
Query expansion: generates multiple query variations and merges results
HyDE: generates hypothetical documents for semantic enrichment
RRF: Reciprocal Rank Fusion for merging multiple result sets
Reranking: uses LLM to reorder results by relevance
Args: params (SearchInput): Validated parameters: - collection_name (str): Collection to search in - query_text (str): Text to search for (auto-embedded) - limit (int): Max results, 1-100 (default: 5) - score_threshold (float): Min similarity 0.0-1.0 (default: 0.0) - fields (str): Comma-separated metadata fields to return (optional) - response_format (str): 'markdown' or 'json' - expand_query (bool): Enable query expansion (default: False) - expand_query_count (int): Number of variations (default: 3) - use_hyde (bool): Enable HyDE (default: False) - hyde_combine_original (bool): Include original query with HyDE (default: True) - rerank (bool): Enable LLM reranking (default: False) - rerank_top_n (int): Candidates for reranking (default: 10)
Returns: str: Formatted search results with document IDs, texts, and scores
Errors: - Collection not found: "Collection 'xyz' does not exist" - Embedding failed: "Failed to embed query text" - Connection error: "Cannot connect to Qdrant at {url}"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |