Search tools
It is possible to make tools available to the agent so that it can perform more complex tasks. The tools are made available to the language model, and it decides whether it is necessary to request their execution at a given moment. The language model itself will decide when to execute them and will also fill in the parameter values, if any, using the information from the prompt and the conversation messages.
There are three different types of tools on the platform: Scripts, MCP, and Searches. In this section, we will explain how to configure Search tools. These tools offer advanced configuration for information retrieval, allowing the assistant to perform semantic searches across the documents. Key settings include:
Search Techniques
-
Semantic Search:
The platform uses embedding-based semantic search to find the most relevant excerpts. The search takes into account the meaning of the query, not just keywords. -
Metadata Filtering:
Documents can be tagged with metadata (e.g., author, creation date, document type). This metadata allows the assistant to perform semantic search in documents that have certain metadata. -
Reranking:
The retrieved documents can be reordered based using Cross-Encoder (Cohere) or based on date. This process can be configured to prioritize the most recent content or the most accurate matches.
Search Configuration
General Settings
- Name
- Topic (document set for searching)
- Description: Critical parameter used by the model to interpret when to use this search
Description Guidelines The description should explain the search function's purpose and usage context. Example:
"Function to search documents, web pages, video transcriptions, etc. Returns excerpts most similar to the question (query). This function is useful to complement your answers, ensuring completeness and correctness of responses."
Reference Formatters
Being able to know the origin of the information with which a response was generated is very useful to provide guarantees, and to be able to guide users in official documentation of the organizations.
All excerpts of information can be referenced in responses, from document pages, or timestamps of a video. The format of the references is configurable for each file type. Access to the information that the model already has due to its training can also be made available, if desired. In this case, no references will be available.
It´s possible to customize how references are shown in the response. For example, references can display the document's name or a specific URL. Reference formatters can include document metadata using metadata_key. They can also reference the document name and page number using name and page_num, respectively.
Example:
"This information is obtained from the document {name} regarding the public holidays of {country_holidays}."
Filters and additional configuration
If the selected topic has metadata that can be used as a filter, then the search can be configured so that the model can make use of that filter.
Other settings that can be configured are:
- Number of extracts: Control how many document extracts should be retrieved in response to a query.
- Reordering strategy options:
- More recent first (requires attribute selection, completed in the "Reordering metadata" field)
- Reranking Cohere
- Retrieval window: retrieval window size for reordering
- Num. fixed extracts: number of blocks left out of the reordering
- Block configuration:
- Previous blocks (fractional values allowed)
- Next blocks (fractional values allowed)
- Similarity threshold: values range from 0 to 1. The recommended values are around 0.8.