Creating a customer service copilot in a day

Jen Person|Oct 22, 2024

We’ve all heard about copilots that connect systems and help people find answers across different data sources. There are many tools for building them. But what if copilots not only could help us find the information we need across many different tools. What if they could help us take action on this information and even automate a lot of our repetitive work?

The Squid platform provides everything an organization needs to deliver copilots that both streamline and automate work. Squid’s data connectors, triggers, and Universal RAG engine make it easy to connect real-time systems and find answers across applications, databases, and even PDFs. But using Squid’s API auto discovery, AI functions, and instructions, I can also build agents that take action on this data.

With Squid AI, I was able to build a feature-rich banking customer service copilot in a day. This agent not only streamlines real-time search across documentation, tickets, and Slack messages. I can use it to execute a variety of tasks across these tools. It can even compose basic answers to support tickets for me.

Before I dive into the implementation, let’s evaluate what it takes to build a copilot without Squid.

Building a copilot without Squid AI

To implement a copilot without Squid AI, you first need to set up an AI pipeline, which involves handling data ingestion, cleaning, aggregation, and normalization, all of which must process rapidly to keep pace with incoming information. To manage retrieval, you need a RAG engine that chunks data, creates vector embeddings, and stores them in a vector database like Pinecone or Redis. To optimize response quality, you need rigorous testing and iteration. Finally, security measures must be integrated throughout to ensure that your copilot respects the access rules of the underlying data.

Once your AI pipeline is working well, you don’t then “set it and forget it”. There are exciting improvements happening every day that you will want to include in your solution, so you will constantly tend to your pipeline to incorporate new features. For example, you will likely want to extract images and charts from your documents for reference.

Does your company want to allocate resources to building and maintaining an AI pipeline, or would they rather use those resources to build and maintain your actual product?

The copilot

With my banking customer service copilot, Squid AI handles all of the complexity of chunking and embedding text and images, storing the embeddings in a vector database, and retrieving relevant information from documents to provide to the LLM so I could focus on feature implementation. By leveraging Squid AI, I was able to cut down on development time, allowing me to create a fully functional copilot that could assist customer service agents with ease in a day’s worth of work.

There were three main steps involved in creating my banking customer service copilot with Squid AI:

• Providing instructions

• Sharing the knowledge base

• Connecting services

Each of these steps ensures that the copilot is aligned with the specific needs of the business and integrates seamlessly into existing workflows. The flexibility of Squid AI’s platform allows businesses to create tailored copilot solutions, no matter the industry or scale.

Providing instructions

Squid enables you to provide instructions in natural language that inform your copilot’s tasks and behaviors. When creating a copilot, it is best to start with very brief instructions and build upon them as needed based on how the AI agent responds to prompts. Initial instructions serve as a foundation, defining the copilot’s purpose, tone, and boundaries. For my banking copilot, I started with a single AI agent with the following instructions:

You are a helpful copilot that assists customer support staff by providing answers to their questions about banking and finance products.

From here, you might expand upon these instructions to specify what types of questions the copilot will and won’t answer. For example, you can outline the topics that are relevant to the copilot, or define how it should respond to out-of-scope questions. This helps the copilot provide consistent responses and maintain a high-quality user experience:

Answer employee questions using the provided context. If a user asks a question or makes a request about something other than banking products, banking accounts, interest rates, or other banking activities, respond, “I can only help with questions related to banking customer service.”

As you add more capabilities to your copilot, your instructions will naturally expand and even branch off into separate AI agent instances that each have their own set of instructions. These AI agents can then be specialized to handle different scenarios or departments within your organization, and instructions can even evolve to enable an AI agent to operate autonomously within defined guardrails. For example this sales CRM copilot automatically reads from a sales professional’s spreadsheet, cleans and standardizes the data, and then updates data in a CRM.

For the banking copilot, these instructions did grow and the solution expanded to include multiple AI agents. You will see how these instructions grew in the post as I added features.

Sharing the knowledge base

Now it’s time to start adding the right information for our copilot. In this use case, we’ll be adding a public knowledge base from Capital One. Squid makes it easy to add some or all of this knowledge base, and also keep it up to date. For instance, if you have updated product documentation that needs to be immediately accessible to the copilot, you can automate this process to sync with the copilot in real time.

To provide your copilot with access to your knowledge base, you can add documents manually through the Squid Console in the form of file uploads, URLs, or raw text. You can also provide documents programmatically using the Squid Client SDK to manage URLs, raw text, file uploads, or files linked from Google Docs. This flexibility means you can easily manage the copilot’s knowledge base in a way that fits your existing content workflows.

For instance, if you have updated product documentation that needs to be immediately accessible to the copilot, you can automate this process to sync with the copilot in real time. This ensures that your copilot is always providing accurate, up-to-date information to employees. When dealing with multiple document formats and various content sources, having the ability to programmatically update the knowledge base saves time and reduces the likelihood of errors that can occur when managing content manually.

I provided my banking copilot with multiple documents from Capital One, as these were all publicly available. Your copilot will likely include internal documents, but for the sake of demonstration, everything provided to my copilot was public.

Connecting services

In addition to unstructured data sources like documents, employees need access to services like communication platforms and CRMs. For most of us, this means a minimum of 12 browser tabs open at any time to toggle between resources. Squid makes it easy to integrate these data sources into your copilot to provide a variety of helpful behaviors:

• Automatically access a customer’s profile from a CRM when initiating a support chat.

• Query internal communication platforms to find conversations relevant to a customer issue.

• Pull related support tickets to check for status and solutions.

• Create new support tickets and automatically include the customer conversation history.

• Generate email templates and automate email follow-up.

Each integration allows the copilot to become a more intelligent assistant, capable of pulling data from across your organization and presenting it in a single view. To connect your services to Squid AI, navigate to the Squid Console’s Integrations tab and select your desired integration. Provide the required details about your service. These details vary depending on the service, but generally include items like endpoints, usernames, and API keys. Squid AI’s integrations are designed to be user-friendly, ensuring that technical and non-technical users alike can set up connections without extensive coding knowledge.

But providing search across one unstructured data source is easy. What if customer service agents want to find related answers to problems across Linear and Slack as well? With Squid’s schema auto-discovery feature, I was able to immediately see what functionality was available in both tools immediately. The implementation process for both connectors is quite similar, so we’ll just look at the Linear connector for example’s sake.

When connecting to Linear, I configured an AI agent to use the Linear GraphQL API to query issues based on keywords. This enables customer service staff to quickly find related issues and determine if there is an existing solution to a customer problem. Just like the knowledge base component of the copilot, I provided this AI agent with instructions and context. Here is a look at those instructions:

Using Linear's GraphQL API reference and the Squid GraphQLClient reference, 
generate the correct query to pass to the Squid GraphQLClient, and pass it to the callLinearAPI function. 
Always include url as a query parameter.

!! Important: Use Linear's GraphQL API reference as context.
!! Important: Do not pass issue IDs or other data points that aren't provided in the prompt.

When filtering with contains, always use containsIgnoreCase.
If querying for search terms in an issue, only search the description.
Example response format to pass to the function:

query {
    issue(id: "DEV-184") {
        id
        title
        description
        url
    }
}

Notice that there are two sentences marked as !Important. When testing the AI agent, I found that I needed to provide additional instructions to keep the agent on-task. Overall, these instructions are still incredibly brief and allow the AI agent to perform a very useful task.

For context, I included a copy of the Linear GraphQL schema. The underlying LLM seems to have been trained on this information, but I still provided the schema to ensure that it has the most up-to-date version and that it doesn’t stray to other GraphQL schemas.

Fine tuning my agent’s responses

When prompting your copilot, you will find that it responds slightly differently each time even when asking the exact same question. This is a natural behavior of an LLM that can be curbed by changing the temperature of the agent. Temperature is a value from 0 to 1 that represents the novelty of the LLM response. The higher the number, the more random the response will seem. A lower number will give a more consistent response.

In addition to adjusting the temperature, you can create an auditing AI agent. This is particularly effective when you need a highly specific and accurate response from an AI agent, such as when creating a GraphQL query. For my banking copilot, I provided the audit agent with these instructions:

Audit the provided GraphQL query to ensure it is in the proper format for querying the Linear GraphQL API. 
If it is not, make corrections so it is in the proper format.

!! Important Respond with only either the original query or the corrected query if you made a correction in proper GraphQL format.
!! Important: Use Linear's GraphQL API reference as context.

When filtering with contains, always use containsIgnoreCase. 
If querying for search terms in an issue, only search the description.

Example response:

query {
    issue(id: "DEV-184") {
        id
        title
        description
        url
    }
}

Like my original AI agent, I provided the Linear schema as context. Including this audit AI agent improved the accuracy of the copilot's responses to questions about Linear from around 80% to nearly 100%. I say "nearly 100%" because I haven't encountered any errors in all my usage. However, to be absolutely certain of complete accuracy, I'd need to conduct more extensive testing.

For every prompt involving Linear queries, the process follows a three-step sequence: First, the Linear AI agent creates the appropriate query. Next, the auditing AI agent verifies the query's accuracy. Finally, a function executes the query and relays the results back to the Linear AI agent.

Executing tasks across tools from a single interface

But what’s the point of an agent that scans data from SaaS tools if I can’t also use my copilot to interact with them too?

Squid AI makes it incredibly straightforward to execute a variety of tasks across connected data sources. In addition to searching for Linear issues, I configured the banking customer service copilot to take actions on my behalf. To further reduce context switching, the copilot can create new Linear issues automatically.

Optionally, the copilot can be configured to update the status of issues, assign an issue owner, set issue priority, add labels, and much more. Anything you can do with Linear, your copilot can do. The scope of actions a copilot can take is entirely controlled by you, allowing you the freedom to expand to a wealth of actions. At the same time, the copilot’s behaviors remain within the parameters that you have set, so you can rest assured that it isn’t able to take any unwanted action no matter what prompt is fed to it.

Securing the copilot

Squid AI offers fully customized security functionality that can restrict access to any and all capabilities of your copilot. Copilots respect the permissions and access control lists of the underlying data they access. In addition, copilots access the authorization context of the client, allowing for easy configuration of security rules. For example, you can check the client’s auth token for custom claims to determine if they’re permitted to use a feature or access some specific data. Writing access controls for my banking copilot was as straightforward as checking the client’s credentials before running a task.

In addition, Squid AI only utilizes enterprise LLM subscriptions, meaning the data is never used to train models. You can optionally connect to your own self-hosted LLM for privacy.

Learn more

Contact Squid AI today to discuss your use case. Whether you’re looking to create a customer service copilot or an internal knowledge assistant, Squid AI’s platform provides the tools and support needed to get your copilot up and running quickly. Schedule a demo to see the platform in action and explore how it can transform your organization’s workflows.