Query Retriever with Rerank

Query retrieval tool with multi-query strategies, intelligent reranking, and comprehensive debugging

Query Retriever with Rerank

AI-generated

Overview

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

  1. A customer support system querying a knowledge base to provide accurate answers to user questions.
  2. An internal document search tool that reranks retrieved documents to improve answer relevance.
  3. 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

Discussion