Skip to content

Retriever Tool

Retriever Tool turns the search over a knowledge base, such as a vector database holding your documents, into a tool for an agent. The agent consults it when a question needs information from those documents and answers with what it finds.

You connect the component that searches your documents to Retriever, give it a name and a description, and connect its Tool output to the agent’s Tools input.

When to use it

  • You keep your manuals or FAQs in a vector database and want an agent to answer from them.
  • An agent has several sources of information and you want it to choose the right one for each question.
  • You want an assistant to search your documents only when needed, not on every message.
  • You combine your internal documents with other tools, such as web search.

Configuration

FieldWhat it does
Retriever (required)The search over your knowledge base. Connect the Retriever output of a vector database here, such as Chroma DB.
Name (required)The name the agent sees for the tool: lowercase words joined by _, for example product_manuals. Default: search_documents.
Description (required)What the agent reads to know when to consult it. Explain what it contains, for example “User and maintenance manuals for our home appliances”.

Advanced options

FieldWhat it does
Prefix PromptText added before each of the agent’s searches, to steer the results. For example, the name of the product line.

Output

Tool: the search ready for the agent. Connect it to the agent’s Tools input. Each query returns the document passages most related to the question; if the connected search doesn’t say how many, up to 10 are returned.

Example

A software company wants its support assistant to answer from the product documentation.

  1. Connect the Retriever output of the vector database that holds the documentation to Retriever.
  2. In Name, type product_docs, and in Description, “Official product documentation: installation, setup and common errors”.
  3. Connect the Tool output to the agent’s Tools input.
  4. When a customer asks how to export a report, the agent looks it up in the documentation and answers with the steps.

Good practices

  • A good Description is what makes the agent use the tool at the right moment. Say what kind of questions it answers.
  • If the agent has several Retriever Tool components, give each one a name and description that can’t be confused.