Complex retrievers
Last updated
Last updated
Complex retrievers are components that internally combine both an embedder and a retriever. This integrated structure allows them to handle query embedding and retrieval within a single node, eliminating the need for separate configuration or coordination between components. To use them, you simply need to pass the query—you don’t need to set up embedding or retrieval logic separately.
Dynamiq offers two custom complex retrievers, each combining an embedder and a retriever into a single node, but with different configuration logic:
To use this node, you must first create a knowledge base based on your configuration. The Knowledge Base Retriever relies on an existing and deployed knowledge base to retrieve relevant information. Therefore, at least one knowledge base must be created and available before this node can be used effectively.
Name: Provide a name for the retriever.
Knowledge Base: Select a knowledge base to automatically generate the appropriate retrieval logic.
Max Documents: Set the maximum number of documents to retrieve.
Filters: Apply filters to refine search results.
Description: Short description of the node’s functionality.
Options:
Use hybrid search: Enables hybrid search.
Alpha: Adjusts the balance between keyword and vector search.
This node allows you to dynamically specify both the embedder and the retriever to suit your use case. It parses and applies all provided parameters through an internal manager, enabling flexible configuration without hardcoding. This design makes it easy to integrate custom retrieval logic tailored to your specific requirements.
Name: Provide a name for the retriever.
Text Embedder: Choose an embedder to convert the query into vector form for retrieval.
Document Retriever: Choose a retriever to find and return relevant documents based on the embedded query.
Max Documents: Set the maximum number of documents to retrieve.
Filters: Apply filters to refine search results.
Description: Short description of the node’s functionality.
Options:
Use hybrid search: Enables hybrid search.
Alpha: Adjusts the balance between keyword and vector search.
The input and output structure is identical for both of these retrievers. Below is an example illustrating the expected format:
query: A string
containing the search query to execute.
Content: content off all retrieved documents in string format
Example:
Documents- list of retrieved documents