Query Retriever with Rerank
AI-generatedOverview
This node implements a Query Retriever with Rerank tool designed to answer questions by searching through a vector store of documents. It supports multiple query strategies including simple query, multi-query, and multi-step query, allowing for flexible and intelligent document retrieval and reranking. The node is useful in scenarios where users need to extract relevant information from large document collections, such as knowledge bases or user information repositories, and generate answers based on the retrieved documents. It also supports debugging and performance analysis features for advanced use cases.
Use Case Examples
- A customer support system querying a knowledge base to provide accurate answers to user questions.
- An internal document search tool that reranks retrieved documents to improve answer relevance.
- A research assistant tool that breaks down complex queries into multiple reasoning steps to gather comprehensive information.
Properties
| Name | Meaning |
|---|---|
| notice | A notice to inform users that this node is used to connect to ai_agent nodes. |
| toolOptions | Configuration for the AI tool's name and description, allowing customization of the tool's identity and data description. |
| retrievalOptions | Settings for document retrieval and reranking behavior, including how many documents to retrieve and return, and whether to return ranked documents for debugging or citations. |
| queryStrategy | Configuration of how to process and respond with retrieved documents, including strategy type and related options for query variations, reasoning steps, and prompt templates. |
| options | Advanced configuration options for the vector store tool, including debugging and AI-powered performance analysis. |
Output
JSON
answer- The generated answer based on the retrieved and reranked documents.sourceDocuments- The documents retrieved and optionally reranked that were used to generate the answer.
Dependencies
- Requires connections to a vector store, a language model, an embedding model for reranking, and optionally a memory node for debugging.
Troubleshooting
- Error if the vector store input is missing: Ensure a vector store connection is provided.
- Error if the language model input is missing: Ensure a language model connection is provided.
- Error if the embedding model input is missing: Required for document reranking, ensure embedding connection is provided.
- Performance may degrade if LLM debug analysis is enabled due to additional language model calls.
Links
- Query Retriever with Rerank Documentation - Official documentation for the Query Retriever with Rerank tool in n8n.