GenAI Chatbot Responses - Custom Prompts

Created by Felix Winstone, Modified on Wed, 26 Jun 2024 at 07:46 PM by Felix Winstone

As part of setting up your Knowledge Base, you can add a custom prompt to your AI responses.


The Talkative system has a standard prompt that asks the LLM to answer the customer's question based on the knowledgebase data provided. It includes a number of safeguards and instructions, including telling the LLM to respond with an "unsure" action if the answer cannot be found in the knowledgebase.


While this prompt gives generic instructions suitable for all customer service scenarios, your organization is unique and may have specific things you want your AI to achieve. 


The custom prompt allows you to customize the behavior and responses of the chatbot for that particular knowledgebase.


Think of it as a set of instructions you want your AI chatbot to abide by.

The more instructions you give it, the better the outcome.


You can add custom prompts by going to Settings > AI Knowledge Bases > click into the knowledge base > advanced settings


What are some best practices and scenarios?


Your knowledgebase contains emails and phone numbers.

Suggested prompt: "If the customer needs more specific help, you are a chatbot part of a live chat system, so recommend that the customer presses "speak to agent", or otherwise transfer to a human agent as part of the chat system. Do not give out phone numbers or email addresses, even if they are referenced in the data set."


Your chatbot's "identity"

Suggested prompt: "You are XYZ, a helpful customer service chatbot for Examply. You are trying to provide answers related to our line of shoe products, but can always transfer to a human agent if the you don't have all the answers"


You want to collect certain information from customers.

Suggested prompt: "As part of your role, you should ask the customer for their email address, so that our sales team can follow up accordingly"


You want to point the customer in certain directions.

Suggested prompt: "As part of your role, you should help customers sign up for our free trial. If the customer expresses purchasing intent, suggest they sign up for a free trial, which they can do on the website you are on"


You want the bot to refrain from certain topics.

Suggested prompt: "While the dataset contains pricing information, do not share specific prices, or send any message that includes pricing or cost information."


You want to respond in a particular language.

Suggested prompt: "Please respond to the customer in the same language that they asked the question in."


You want links to be formatted in a certain way

Suggested prompt: "please include URL links to any items mentioned, please format them like https://example.com (ensure no punctuation either side)"


You want to have a bit of fun.

Suggested prompt: "Please respond to the user like you're a pirate. 'Arr!"


You can include multiple instructions as part of your prompt, e.g.

"you are "Examply Expert", a chatbot for Examply, which is a leading shoe supplier. You are not able to provide any pricing details. please do not reference the dataset in your response. if a customer asks about competitive products (company1, company2, company3), do not give any advice and recommend the customer speak to a human agent, which they can do by pressing "speak to advisor". don't mention the data set.  tell customers to refer to the website for pricing info. if customers need help, they should click "speak to advisor". do not give any prices. if a customer needs sizing help, suggest they can visit one of our 100 retail locations. please include URL links of products in the format https://www.examply.com.com/xyz/ , if you have them in the dataset."


We highly recommend testing your custom prompt against scenarios.


Note that custom prompts tend to work more effectively with larger / more powerful models, i.e. GPT-4o obeys them better than GPT3-5.


Beware of prompts that may contradict each other, for example "your mission is to answer the customer's question" may contradict "do not give the customer pricing information", in this case an apt prompt may be "your mission is to help the customer, although you must not share pricing information"


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article