Prerequisites
Before adding the Knowledge Retrieval Tool, ensure that you have:Adding the Knowledge Retrieval Tool
Navigate to Your Assistant
- Go to the Assistants section in the main navigation menu.
- Select the assistant you want to configure.
- Click “Configure assistant” in the top right corner.
- Select “Tools and MCP” from the left sidebar menu.
- Click on Add Tools.
Configure the Tool
When configuring a Knowledge Retrieval tool, you’ll need to provide several key elements:
-
Name: A unique identifier for your tool (e.g., “knowledge_retrieval_challenges”)
- Use descriptive names that indicate the tool’s purpose
- Follow a consistent naming convention (e.g., snake_case)
-
Description: Details on when and how to use the function
- Example: “retrieve challenges for user role and user industry”
- Provide clear guidance on the tool’s purpose and use cases
- This helps the model determine when to invoke the tool
-
Fields: Define parameters in JSON format following the OpenAI Function Tool Call schema:
This schema follows the OpenAI Function Tool Call format where
additionalProperties: falseensures only defined properties are allowed,propertiesdefines the parameters the tool accepts with descriptions and data types for each (likequery), and the schema validates inputs when the tool is called. - Expected Action: From the list select “Knowledge Retrieval”.
-
Knowledge: Choose an existing knowledge from the dropdown, or create new.
- Select from the dropdown list of available sources
- Or create a new knowledge source directly
-
Retrieval Setting: Select a search method:
- Hybrid Search: Combines full-text and vector searches for optimal results
- Semantic Search: Uses vector embeddings to find semantically similar content
- Full Text Search: Indexes all terms for keyword-based retrieval
- Configure Top K results (default: 5) to limit the number of results returned
- Set a Score Threshold (default: 0.5) for relevance filtering
Using the Knowledge Retrieval Tool
Once configured, your assistant will automatically use the Knowledge Retrieval Tool when appropriate. The process typically follows these steps:- The assistant analyzes the user’s query or conversation context.
- If relevant, it calls the Knowledge Retrieval Tool with the necessary parameters.
- The tool fetches information from the knowledge base.
- The assistant incorporates the retrieved information into its response.
Managing the Knowledge Retrieval Tool
You can modify or remove the Knowledge Retrieval Tool at any time:- Go to your assistant’s configuration page.
- Select “Tools and MCP” from the left sidebar menu.
- Find the Knowledge Retrieval Tool in the list.
- Click on Edit Tool to modify its configuration or Delete Tool to delete it.
Best Practices
- Regularly update your knowledge base to ensure the assistant provides the most current information.
- Monitor your assistant’s performance and adjust the tool’s configuration as needed.
- Use clear and specific queries to get the most relevant results from the knowledge base.