Improving Chat Performance

This guide details how to build an embeddable chatbot AI Employee, customize its appearance and behavior, develop a workflow with conversation context, and embed it into your website. It also introduces two agents: the Conversation Summarizer and Static Response.

Overview

Ema supports in-app chat functionality and also allows you to build a chatbot AI Employee that can be embedded directly into your website. This guide covers the full process: creating the chatbot, customizing it, building the workflow, and embedding it.

Step 1: Initiate Chatbot Creation

  1. Locate the tile labeled GWE Chatbot AI Employee within the Ema interface.
  2. Assign a name to your new AI Employee (for example, "Compliance Chatbot").
  3. Click Create.

Step 2: Access the Chatbot Configuration Page

Upon creation, you are directed to the chatbot configuration page with various widgets, including the chatbot SDK configuration. This page allows you to assign a unique name and set up initial parameters for your embeddable chatbot.

Step 3: Customize Branding and Appearance

  • Set the chatbot name (for example, "Compliance Chatbot").
  • Choose your brand's color to match your website's theme.
  • Provide a welcome message that greets users when they interact with the chatbot.
  • Update the logo by supplying a public URL for your brand's logo.

Step 4: Save and Preview the Chatbot

After making your customizations, click Save. A sample chatbot preview will show how the chatbot will appear on your website with your configured name, brand color, and welcome message.

Step 5: Obtain the Embed Code

Scroll down the configuration page to locate the embed code snippet. This code is used to insert the chatbot into your website's body, enabling it to appear on your site.

Step 6: Develop the Chatbot Workflow

Navigate to the Workflow Builder to develop the conversation flow. The trigger for the chatbot is the same as that used for the Ema webapp chat, but this workflow will incorporate additional context from the full chat conversation.

Step 7: Enhance the Workflow with Conversation Context

Since relying solely on the user query can limit context, integrate a Conversation Summarizer agent:

  1. Supply the summarizer agent with dialogue from the trigger to automatically generate a summarized version of the conversation.
  2. Optionally specify a context window by setting the number of conversation turns (for example, the last 10 messages) that should be referenced.

Step 8: Implement Search and Response Mechanisms

Add a search-and-respond mechanism that uses the summarized conversation to improve response accuracy. Best practices include:

  1. Employ an Intent Classifier that examines the full conversation and categorizes the query (for example, into GDPR or HIPAA categories).
  2. Provide the classifier with the entire conversation.
  3. Define clear question categories along with descriptions and potential user phrases.
  4. Optionally change the default category. If the classifier cannot categorize to one of the provided categories, it falls back to this default.

Step 9: Configure Category-Specific Workflows

Create specific branches within the workflow for each category:

  • GDPR branch -- Set up search actions triggered only when the intent classifier identifies a GDPR question. Rename the search agent to "GDPR Search."
  • HIPAA branch -- Add a dedicated Static Response agent. This agent always outputs the text it is provided with, regardless of the context or query. Rename it appropriately.

Step 10: Provide Context in Query Inputs

In the search query inputs, include the summarized conversation to provide additional context beyond just the latest query.

Step 11: Publish Workflow Outputs

Set the output of the search-and-respond mechanism by providing the summarized conversation and publishing this as the workflow output. Ensure that the response for each category is published as a workflow output so the correct response is consistently delivered when that category is triggered.

Step 12: Activate the Chatbot

Once the workflow is fully configured and published, return to the AI Employee configuration. Activate the chatbot to enable its functionality on your website.

Step 13: Test the Chatbot

Test the embeddable chatbot within the Ema web app chat to ensure it is functioning as expected. Verify that the branding, workflow, and response behaviors are correctly implemented.

Last updated: Jul 3, 2026