back to docs

Backstories

Learn about the importance of backstories in chatbot development and how they contribute to creating engaging and personalized experiences for users. Discover how multilingual chatbots can benefit from customized backstories and how conversation preempting can set the tone for conversations.

Backstories are an important aspect of chatbots that truly bring them to life. In simple terms, a backstory defines the overall personality and ability of the chatbot.

Think of a backstory as the history of a character. It includes information about the chatbot's experiences, skills, and personality traits. By understanding the backstory, you can understand the chatbot's perspective and what it is trying to convey.

In the context of conversations, backstories are associated with datasets and skillsets. Together, these three components work to create a more natural and engaging conversation for the user.

Backstories can be customized to fit the specific needs of a chatbot. For example, a chatbot designed for customer support might have a backstory that emphasizes patience and empathy. On the other hand, a chatbot designed for entertainment might have a backstory that highlights humor and wit.

Writing Backstories

Backstories serve as natural language programming environments, providing a platform where instructions (i.e. code) can be written and understood in a language similar to our everyday speech. This innovative approach allows for a more intuitive and user-friendly programming experience, as it bridges the gap between complex programming languages and the natural language we use in our daily interactions.

In order to craft a compelling and effective backstory, it is absolutely essential for one to have a thorough understanding of the specific tasks and functions their conversational AI bot is expected to perform. By doing so, they can create dynamic and engaging narratives that not only provide context and depth to their AI bot, but also enhance its utility and efficiency. Therefore, the process of writing a backstory becomes not only a creative endeavor but also a strategic one that directly impacts the functionality of the AI bot.

For those interested in learning the art of writing compelling backstories, we have painstakingly crafted an in-depth tutorial for you. This comprehensive guide will provide you with the tools and techniques needed to create engaging narratives for your conversational AI agents and chatbots. By following our step-by-step approach, you can ensure your characters resonate with your audience and enrich their overall user experience. For a detailed walkthrough, please visit our tutorial here.

Multilingual Chatbots

When it comes to multilingual chatbots, backstories can become even more important. Understanding the cultural nuances and language intricacies of different regions can be difficult, but by crafting a backstory that is specific to a culture or language, chatbots can become more relatable and effective in their conversations. A multilingual chatbot might have different backstories for each language it speaks, allowing it to adapt to the unique needs and expectations of each region.

For example in order to make a chatbot that speaks in French we can define the backstory in french:

Je suis un chatbot amusant et engageant et je ne répondrai qu'en français.

Conversation Preempting

Conversation preempting is a notable technique utilized in the design and operation of bots developed using ChatBotKit. This technique serves as a tool to establish and maintain the tone of the conversation, ensuring it adheres to the desired dialogue flow. This aspect can be finely tuned and customized within the backstory of the bot, adding a layer of depth and complexity to the bot's conversational skills. This customization is achieved through the use of conversation scenarios or scenes, a term commonly used within the ChatBotKit community. These scenes allow developers to craft unique and engaging conversation paths, enhancing the user-bot interaction experience.

To create a new scene within your backstory simply use the <|scene|> tag like this:

The backstory here <|scene|> This is the beginning of the first scene.

Multiple scenes can be used to create a more hypothetical scenarios. Here's an example:

The backstory here <|scene|> This is the beginning of the first scene. <|scene|> This is the beginning of the second scene. <|scene|> This is the beginning of the third scene.

In this example, the backstory includes three scenes. When the conversation begins, the chatbot will use one of the scenes at random.

Each scene contains text which will be added to your original backstory. However, you can preempt the conversation using dialogs. Here is an example:

The backstory here <|scene|> Help the customer solve their problem <|user|> Hi there I have problem and I need your help. <|bot|> Aye aye captain

In the example above we preempt the conversation by providing a witty response which the bot will follow and try to imitate for the rest of the conversation.

With scenes and dialogs you can create the perfect chatbot experience.

Conclusion

In conclusion, backstories are an essential part of chatbot development that help create a more engaging and personalized experience for the user. By understanding the chatbot's backstory, users can better connect and interact with the chatbot.