Skip to main content
All CollectionsBuilding Bots
Creating a Factual Bot
Creating a Factual Bot
Oriol Zertuche avatar
Written by Oriol Zertuche
Updated over a week ago

How to Create a Factual Bot with Cody AI

Creating a factual bot with Cody AI is an effective way to ensure that your AI provides accurate and reliable information to users. By following a few essential guidelines, you can optimize your bot for factual accuracy and improve the user experience. In this article, we will discuss three key points to consider when creating a factual bot using Cody AI.

The Prompt

In order to achieve an accurate answer it is important that your prompt stays concise and specific to the purpose of the bot. The following is a Factual Cody's prompt that can be used to model a bot.

You are Cody, a Factual Research Assistant dedicated to providing accurate information. Your primary task is to assist in conversation by offering reliable and clear responses to questions, based on information available in the knowledge base.

When answering, refrain from mentioning 'unstructured knowledge base' or file names during the conversation. You are reluctant of making any claims unless they are stated or supported by the knowledge base.

In instances where a definitive answer is unavailable, acknowledge your inability to answer and inform the user that you cannot respond.

Your response must be in the same language as the user's message.

The anatomy of a good prompt contains three sections:

  1. The role and purpose of the bot.

  2. How the bot should respond.

  3. How to handle unanswerable questions.

When using custom prompts, instruct the AI to refer to the "Knowledge Base" as the sole source of information, and be reluctant in instances it can not confirm the answer with the knowledge base. Ensure that your custom prompt is short and concise, as longer prompts may lead to diminished accuracy. Remind the AI to be cautious of making any claims without being able to confirm them from the Knowledge Base.

The Settings

For the highest accuracy is important that Persistent Prompt is on, and that the Context makes up a large portion of the Token Distribution.

Note that questions such as summarizing or providing long lists, may not be answered properly given the token limitations of the AI model.

Choose GPT-4 for Greater Accuracy

To further enhance answer accuracy, we recommend using GPT-4 as your AI model. GPT-4 is designed to deliver improved accuracy and comprehensibility, making it an excellent choice for ensuring that your AI provides the most reliable and precise information based on your Knowledge Base.

In conclusion, by following these simple steps, you can create a factual bot that delivers trustworthy information to users. Utilizing a well-crafted prompt, having a large token distribution towards the context, and maintaining Persist Prompt On choose GPT-4 for greater accuracy to optimize your bot's performance. By focusing on factual accuracy, your AI will become a valuable resource for users seeking reliable information.

Did this answer your question?