Before you begin
Before working on your AI Agent, get some background information on generative content and MessageMind’s resolution engine.
When you’ve used a chatbot in the past, you’ve probably thought of it as slow or difficult to use. The majority of bots out there aren’t great at understanding what your customers want, or knowing how to respond or take actions like a human agent would.
By combining the information in your knowledge base with cutting-edge AI, you don’t just have a chatbot with MessageMind™. You have a generative AI Agent, designed to perform tasks that human agents have previously only been able to do.
This guide will take you through MessageMind™’s technology that we use to make the customer experience with an AI Agent different from any chatbot you’ve used before.
The secret behind how your AI Agent both understands and writes messages is in the AI, or artificial intelligence, that MessageMind™ uses behind the scenes. Broadly, AI is a range of complex computer programs designed to solve problems like humans. It can address a variety of situations and incorporate a variety of types of data; in your AI Agent’s case, it focuses on analyzing language to connect customers with answers.
When a customer interacts with your AI Agent, your AI Agent uses Large Language Models, or LLMs, which are computer programs trained on large amounts of text, to identify what the customer is asking for. Based on the patterns the LLM identified in the text data, an LLM can analyze a question from a customer and determine the intent behind it. Then, it can analyze information from your knowledge base, where the meaning behind it matches what the customer is looking for.
Generative AI is a type of LLM that uses its analysis of existing content to create new content. It builds sentences word by word, based on which words are most likely to follow the ones it has already chosen. Using generative AI, your AI Agent constructs responses based on pieces of your knowledge base that contain the information the customer is looking for, and phrases them in a natural-sounding and conversational way.
LLM training data can contain harmful or undesirable content, and generative AI can sometimes generate details that aren’t true, which are called hallucinations. To combat these issues, your AI Agent uses an additional set of models to ensure the quality of its responses.
Before sending any generated response to your customer, your AI Agent checks to make sure the response is:
- Safe: The response doesn’t contain any harmful content.
- Relevant: The response actually answers the customer’s question. Even if the information in the response is correct, it has to be the information the customer was looking for in order to give the customer a positive experience.
- Accurate: The response matches the content in your knowledge base, so your AI Agent can double-check that its response is true.
With these checks in place, you can feel confident that your AI Agent has not only made sound decisions in how to help your customer, but has also sent them high-quality responses.
Your AI Agent runs on a sophisticated Reasoning Engine MessageMind™ created to provide customers with the knowledge and solutions they need.
When customers ask your AI Agent a question, it takes into account the following when deciding what to do next:
- Conversation context: Does the conversation before the current question contain context that would help your AI Agent better answer the question?
- Knowledge base: Does the knowledge base contain the information the customer is looking for?
- Business systems: Are there any Actions configured with your AI Agent designed to let it fetch the information the customer is looking for?
From there, it decides how to respond to the customer:
- Follow-up question: If your AI Agent needs more information to help the customer, it can ask for more information.
- Knowledge base: If the answer to the customer’s inquiry is in the knowledge base, it can obtain that information and use it to write a response.
- Business systems: If the answer to the customer’s inquiry is in any of the Actions configured with your AI Agent, your AI Agent can fetch that information by making an API call.
- Handoff: If your AI Agent is otherwise unable to respond to the customer, it can hand the customer off to a human agent for further assistance.
Together, the mechanism that makes these complex decisions on how to help the customer is called MessageMind™’s Reasoning Engine. Just like when a human agent makes decisions about how to help a customer based on what they know about what the customer wants, the Reasoning Engine takes into account a variety of information to figure out how to resolve the customer’s inquiry as effectively as possible.
Many AI chatbots are vulnerable to prompt injections or jailbreaking, which are prompts that get the chatbot to provide information that it shouldn’t. For example, information that is confidential or unsafe.
The reasoning engine behind MessageMind™’s AI Agents is structured in such a way as to make adversarial LLM attacks very difficult to succeed. Specifically, it has:
- A series of AI subsystems interacting together, each of which modifies the context surrounding a customer’s message.
- Several prompt instructions that make the task to be performed very clear, directing the AI Agent to not share their workings and instructions, and to redirect conversations away from casual chitchat.
- Models that aim to detect and filter out harmful content in inputs or outputs.
With state-of-the-art generative AI testing prior to new deployments, MessageMind™ ensures a secure and effective customer interaction experience.
When you connect your AI Agent to your knowledge base and start to serve automatically generated content to your customers, it might feel like magic. But it’s not! This topic takes you through what happens behind the scenes when you start serving knowledge base content to customers.
How MessageMind™ ingests your knowledge base
When you link your knowledge base to your AI Agent, your AI Agent copies down all of your knowledge base content, so it can quickly search through it and serve relevant information from it. Here’s how it happens:
-
When you link your AI Agent with your knowledge base, your AI Agent imports all of your knowledge base content.
Depending on the tools you use to create and host your knowledge base, your knowledge base then updates with different frequencies:
- If your knowledge base is in Zendesk or Salesforce, your AI Agent checks back for updates every 15 minutes.
- If your AI Agent hasn’t had any conversations, either immediately after you linked it with your knowledge base or in the last 30 days, your AI Agent pauses syncing. To trigger a sync with your knowledge base, have a test conversation with your AI Agent.
- If your knowledge base is hosted elsewhere, you or your MessageMind™ team have to build an integration to scrape it and upload content to MessageMind™’s Knowledge API. If this is the case, the frequency of updates depends on the integration.
-
Your AI Agent splits your articles into chunks, so it doesn’t have to search through long articles each time it looks for information. It can just look at the shorter chunks instead.
While each article can cover a variety of related concepts, each chunk should only cover one key concept. Additionally, your AI Agent includes context for each chunk; each chunk contains the headings that preceded it.
-
Your AI Agent sends each chunk to a Large Language Model (LLM), which it uses to assign the chunks numerical representations that correspond to the meaning of each chunk. These numerical values are called embeddings, and it saves them into a database.
The database is then ready to provide information for GPT to put together into natural-sounding responses to customer questions.
How MessageMind™ creates responses from knowledge base content
After saving your knowledge base content into a database, your AI Agent is ready to provide content from it to answer your customers’ questions. Here’s how it does that:
-
Your AI Agent sends the customer’s query to the LLM, so it can get an embedding (a numerical value) that corresponds with the information the customer was asking for.
Before proceeding, the AI Agent sends the content through a moderation check via the LLM to see if the customer’s question was inappropriate or toxic. If it was, your AI Agent rejects the query and doesn’t continue with the answer generation process.
-
Your AI Agent then compares embeddings between the customer’s question and the chunks in its database, to see if it can find relevant chunks that match the meaning of the customer’s question. This process is called retrieval.
Your AI Agent looks for the best match in meaning in the database to what the customer asked for, which is called semantic similarity, and saves the top three most relevant chunks.
If the customer’s question is a follow-up to a previous question, your AI Agent might get the LLM to rewrite the customer’s question to include context to increase the chances of getting relevant chunks. For example, if a customer asks your AI Agent how much your store sells cookies, and your AI Agent says yes, your customer may respond with “how much are they?” That question doesn’t have enough information on its own, but a question like “how much are your cookies?” provides enough context to get a meaningful chunk of information back.
If your AI Agent isn’t able to find any relevant matches to the customer’s question in the database’s chunks at this point, it serves the customer a message asking them to rephrase their question or escalates the query to a human agent, rather than attempting to generate a response and risking serving inaccurate information.
-
Your AI Agent sends the three chunks from the database that are the most relevant to the customer’s question to GPT to stitch together into a response. Then, your AI Agent sends the generated response through three filters:
- The Safety filter checks to make sure that the generated response doesn’t contain any harmful content.
- The Relevance filter checks to make sure that the generated response actually answers the customer’s question. Even if the information in the response is correct, it has to be the information the customer was looking for in order to give the customer a positive experience.
- The Accuracy filter checks to make sure that the generated response matches the content in your knowledge base, so it can verify that the AI Agent’s response is true.
-
If the generated response passes these three filters, your AI Agent serves it to the customer.