PREMIUM: How to build your own AI chatbot

Your guide to creating a custom chatbot + deep dive on how to build one with your own data or documents

Happy Monday ☀️ We’ve got another big resource drop for premium subscribers this week all around building your own custom AI chatbots.

If you’ve already played with our AIxBot in Slack, or another custom chatbot - you likely see the potential in customizing ChatGPT to have a version scoped for your business or use case.

Since we built ours, we’re now going to show you how to build your own.

The first thing we’ll walk you through are the different types of custom AI chatbots people are building today:

  1. Customizing chatbots via system prompts

  2. Customizing chatbots via adding context (your own data or docs)

  3. Customizing chatbots via fine tuning a model

Then, this week - we’re going deep on the second approach — customizing via adding context.

This is the approach we’ve taken for AIxBot, and we have a workshop on Thursday with Chatbase at 12pm PT - one of the leading products to help you build your own custom context chatbot without writing any code.

Join Thursday's workshop with Chatbase at 12pm PT. Fill out the interest form and we'll invite you to the Calendar event!

Below you'll find a breakdown of the new playbook section Building with AI: Custom Chatbots, including the Intro to Custom Chatbots which breaks down the different approaches, and the deep dive on Building a Chatbot with Custom Context.

Dig in below, or you can access everything in The AI Exchange Playbook along with the other chapters (must be logged in with subscriber account).

p.s. this is just a peek of what you're getting in the member hub, log in here.

[Subscriber Log In Required] Building with AI: Custom Chatbots

Since ChatGPT, AI-powered chatbots have become the next big thing.

AI-powered chatbots have many use cases from engaging customers to supporting your team and driving leads.

In this chapter, we’ll walk you through an overview of custom chatbots, why you should build one, and specific types of custom chatbots to build.

Introduction to chatbots

Traditional chatbots, powered by rule-based systems, were designed to follow predefined scripts and offer preprogrammed responses to user inputs. While they served basic purposes, such as answering frequently asked questions and providing simple information, their capabilities were limited. These chatbots struggled to comprehend the ins and outs of human language, often resulting in rigid and impersonal interactions that failed to meet the expectations of increasingly discerning customers. Instead of providing a satisfying, helpful customer experience, they often left users feeling frustrated and disengaged.

In recent years (pre-ChatGPT), advancements in natural language processing (NLP) and deep learning enabled the development of more sophisticated, AI-powered chatbots. These chatbots leverage advanced algorithms to process and understand user inputs and generate more natural, tailored responses. This technology enabled businesses to provide customers with a more efficient, friendly, and engaging customer experience, but there was still much left to be desired.

What’s changed

While AI-powered chatbots have been featured on tons of websites and in tons of tools, the introduction of generative AI and large language models completely accelerated their usefulness and potential business applications.

Since ChatGPT’s debut in late 2022, chat-based interactions have become the forefront of real-world applications of generative AI to business. Large language models like ChatGPT have made it even easier for businesses to create user experiences that are both engaging and informative for their customers or users. These chatbots can be integrated into websites, messaging platforms, mobile apps, internal tools, and more, enabling businesses to provide instant, personalized support to their customers, users, and employees.

But while large language models, like ChatGPT, are extremely powerful out of the box, they still have many limitations. Some of the biggest limitations include the lack of up-to-date and domain-specific knowledge, lack of personalization, lack of control of responses, and lack of context-specific understanding.

It’s not enough to plug ChatGPT into a customer support box and let it work.It needs to be customized.

By customizing a chatbot, businesses can exercise more control over the conversation topics, the language and tone, the format and type of response, and even the information used to in its answer.

Use cases for custom chatbots

While the benefit of a custom chatbot can seem obvious for a business looking to engage with its customers, the list of potential use cases for a custom chatbot goes way beyond this.

Here are some of our favorites:

  • Supercharge your customer support agents with suggested answers from your support docs

  • Have a conversation with a celebrity-based chatbot

  • Chat with the content of your favorite YouTuber or podcast host

  • Ask questions over your company’s internal documents or data

  • Replace traditional keyword search with fact based answers (like Bing AI or Google’s Bard)

  • Give domain-specific, personalized answers to your coaching or consulting clients

  • Create a writing editor or email generator micro-app as lead gen

  • etc.

Types of custom chatbots

While chatbots can be customized in many different ways, there are three main buckets of custom chatbot implementations that are common practice today:

(1) Prompt chatbots

Prompt chatbots are the simplest way to customize a chatbot, and primarily relies on the use of prompt-design for customization.

In this type of custom chatbot implementation, the chatbot's responses are designed based on a predefined system message (or instructions) and sometimes can include static few shot prompting (i.e. giving the chatbot examples of how you’d like it to respond). The chatbot is instructed to take a specific input and generate the appropriate response using the input, any examples given, and its instructions.

Prompt chatbots are relatively simple to create and require very little additional data compared to other types of custom chatbots. They are suitable for scenarios where the task, or purpose, is more structured and predictable and doesn’t require a large amount of up-to-date or domain-specific information, such as translating a sentence to a different language or generating a draft email.

(2) Context chatbots

Context chatbots are customized to allow a user to chat with specific information, data or context that is loaded into the chatbot for a specific purpose.

Context chatbots are a slightly more complex way to customize a chatbot, and work by giving the chatbot the context (i.e. specific information or data) that it needs to answer a question or accomplish a task within the prompt.

With context chatbots, the necessary context is provided to the chatbot in its instructions where it’s told to answer the user’s question or perform the user’s task using only the context provided. While simple context chatbots can leverage static context to answer questions (i.e. one piece of information that can fit within the context window of a specific large language model), more complex context chatbots that need to query a large corpus of potential context, require a method of context retrieval to provide the chatbot with only the most relevant information it needs to perform its job. We’ll go more into the different methods of context retrieval in a future chapter, but the most common approach here is to leverage embeddings.

(3) Model chatbots

Model chatbots are the most involved and complex way to customize a chatbot, and relies on fine-tuning a pre-trained model to provide the chatbot with the net new information it needs to perform its job.

Model chatbots are built by fine-tuning a base language model, such as ChatGPT, on a specific dataset that is relevant to the target domain or use case. The training process involves providing examples of desired inputs and corresponding outputs to teach the chatbot how to respond accurately in specific contexts.

Fine-tuned chatbots can offer a very high level of control over the chatbot's behavior, but require an extremely curated training dataset and iteration to achieve the desired results due to the lack of visibility into the fine-tuning process. When done right, they can be tailored to specific industries, such as healthcare, finance, or e-commerce, and can provide domain-specific knowledge and language understanding.

---

Each type of custom chatbot has its advantages and use cases, and businesses can choose the approach that best suits their requirements. Some businesses may opt for a combination of these types to create a more versatile and powerful chatbot solution.

How to build Context Chatbots

Subscribe to The AI Exchange Premium Membership to read the rest.

Become a paying subscriber of The AI Exchange Premium Membership to get access to this post and other subscriber-only content.

Already a paying subscriber? Sign In

A subscription gets you:
Deep dives on applying AI via our AI Exchange Playbook
Access to The AI Exchange Resource Library
Access to Workshops, Events, and Perks
Access to Private Slack channel, connect with like-minded individuals