Adjusting chunks retrieved:

The Max Chunks Retrievable slider controls how many pieces of information () the LLM can retrieve in one interaction. You can adjust it anywhere between 1 and 10. We recommend keeping it at around 3-4 depending on in the knowledgebase.

When you adjust the slider, you change the maximum number of the model will retrieve. If you set it to a higher number, the model can pull more information at once, which might be useful for complex queries. However, be mindful that some models have a lower , which means they can’t process as much information at once and may require you to set a lower value on the slider.

Setting a higher chunk limit will consume more credits, as more are being processed. Each chunk corresponds to a set of tokens, and increasing the number of chunks means more tokens are retrieved, leading to higher credit usage.

Search similarity prompt:

To further enhance your agent’s ability to retrieve the most relevant information from the knowledge base, use a prompt for the :

Navigate to Knowledge Section

Go to your agent’s Knowledge section in the dashboard.

Access Settings

Look for and click on the gear icon located in the upper right corner of the page.

Write Your Prompt

In the input field that appears, write your custom prompt. If you’re unsure, you can use the provided example as a starting point.

Include Chat History Variable

Ensure you include the {chat_history} variable in your prompt. This is crucial for the proper functioning of your knowledge base.

The knowledge base won’t work correctly without the {chat_history} variable.

Save Changes

After writing your prompt, click the Done button to save your changes.

Test the Knowledge Base

To verify that your knowledge base is working as expected, use the Preview KB feature located in the upper right corner of the page.

Testing your knowledge base helps ensure that it responds accurately to queries before going live.

Example prompt

Try pasting this search similarity prompt in the input field and see the results:


# You are an advanced AI tasked with generating relevant search keywords. Use the chat history to create accurate and relevant keywords for searching our knowledge base. 


## This is the chat history: {chat_history} 

# Steps: 

1. Analyze the chat history and context 

2. Identify main themes, topics, and keywords 

3. Generate a list of specific, relevant keywords for the search 


Output your list of keywords, separated by commas.