Learn how to build an AI-powered customer support system using 💧 Instill VDP on our cloud platform ☁️ Instill Cloud with OpenAI's GPT-4 Turbo. This tutorial walks you through creating an efficient pipeline that automatically classifies tickets and drafts email responses, streamlining your support process.
Key Features:
- Automated ticket classification
- AI-generated email drafts
- Improved response times
- Enhanced support quality
Try the demo pipeline on ☁️ Instill Cloud.
Perfect for businesses looking to scale customer support operations and leverage cutting-edge AI technology. Follow our step-by-step guide to transform your customer service workflow.
Ready to optimize your customer support with AI? Let's get started!
#Preparation
There are two ways to access 💧 Instill VDP:
#1. 💧 Instill VDP via Self-hosting 🔮 Instill Core
🔮 Instill Core is a full-stack AI infrastructure tool for data, model and pipeline orchestration, including:
-
💧 Instill VDP: Pipeline orchestration for building flexible AI workflows by connecting different AI, Application, and Data components
-
⚗️ Instill Model: Model orchestration for managing, serving, fine-tuning and monitoring AI models
-
💾 Instill Artifact (coming soon): Data orchestration for preparing unstructured data (documents, images, audio, video) for AI use
For more information about 🔮 Instill Core please see our documentation, and for further details about deployment options please see our deployment guide.
#2. 💧 Instill VDP via ☁️ Instill Cloud (recommended)
☁️ Instill Cloud is our cloud platform built with 🔮 Instill Core.
In this tutorial, we recommend using ☁️ Instill Cloud to access 💧 Instill VDP for ease of use, especially if you are new to our platform.
Create your account by following the steps here.
#Play with the demo pipeline
Before learning how to build your own version of this pipeline, you can try this demo pipeline on ☁️ Instill Cloud first. Furthermore, you can simply clone this pipeline and modify it to your needs instead of building it from scratch.
#Accessing the pipeline playground
When you first log into ☁️ Instill Cloud, you will be directed to the Hub page where you can explore various pipelines built by the community. You can search for our tutorial pipeline by typing "ticket" in the search bar or accessing it with this link.
Now you can start exploring this pipeline with different input data! Sample
data is also available in the input field descriptions, simply copy + paste
it into the input fields and click Run
to execute the pipeline.
#Cloning the pipeline
To modify or explore this pipeline in further detail, you can
clone this pipeline by clicking the Clone
button in the top right. For more
details, see the documentation.
Now you're ready to build this pipeline from scratch!
#Build the pipeline
We will be using the OpenAI Component to classify our customer tickets and draft responses via the text generation task.
#Step 1. Create your pipeline
First, you will need an account on ☁️ Instill Cloud. If you are a new user, please follow the steps here.
-
Log in to ☁️ Instill Cloud
-
Click
+ Create Pipeline
in the top right to create a new pipeline -
Name it e.g., "ticket-triage-demo"
-
Add a description e.g., "This pipeline will classify customer ticket and draft an email response based on the context provided."
-
Click
Create
#Step 2. Configure the input variable
When you first enter the canvas, there will be 2 blocks called variable
(input)
and response
(output). Let's add some input variables.
Click Add Field +
in the block called variable
and add these fields:
- customer ID
- ticket issued to company
- ticket ID
- content
#Step 3. Configure first OpenAI Component - Ticket Classification
Next, we will start adding our AI capabilities. Let's start with Ticket Classification. Click on the pencil in the top of this block and rename this Component to "triage".
-
Click
Component +
in the top left and select the OpenAI Component -
Set the OpenAI Component to: Text generation
-
Set the Model to: gpt-4-turbo
-
Set the prompt like:
Classify the ticket based on the content to one of the following categories: ['technical-issues', 'billing-and-payments', 'product-inquiries', 'complaints-and-feedback', 'account-management'] Ticket: ${variable.content} Category:
Components and response blocks are connected by typing ${<YOUR_REFERENCE>}
into the
value field. Start typing ${
and a list of possible connections will appear to
makes things quicker and easier to link. Furthermore, input data type hints will
show up when you click the Prompt*
value field!
-
In the same OpenAI Component, click on
More
to access this components properties -
In the
System message
, set the behaviour of the assistant to:
You are a ticket classifier. You analyze the content of a customer ticket and classify it into one of the pre-defined categories, and ONLY return the category
#Step 4. Configure second OpenAI Component - Email drafting
Next, we will configure another OpenAI Component to draft emails. Click on the pencil in the top of this block and rename this Component to "email-writer".
-
Click
Component +
in the top left and select the OpenAI Component -
Set the OpenAI Component to: Text generation
-
Set the Model to: gpt-4-turbo
-
Set the prompt like:
Based on the customer ticket information, write a draft email to the customer.- Give an email subject based on the content and start it with "[Ticket ID] Request Received:".- No need to mention the Ticket ID in the email body.Customer ID: ${variable.customer-id}Customer Email: ${variable.email}Customer Issued to Company: ${variable.ticket-issued-to-company}Ticket ID: ${variable.ticket-id}Ticket Content: ${variable.content}Draft Email:
-
In the same OpenAI Component, click on
More
to access this components properties -
In the
System message
, set the behaviour of the assistant to:
You are a customer support. You represent the company support team to write draft email to the customer who filed a ticket, and ONLY return the draft email.
#Step 5. Configure the response output
Similar to the input variable block, let's add the 2 output results: Ticket Category & Draft Email. The only difference here is we also need to enter a reference value.
-
Click
Add Field +
in the block calledresponse
and add Title: "Ticket Category" -
Set the
Value
to${triage.output.texts}
-
Click
Add Field +
in the block calledresponse
and add Title: "Draft Email" -
Set the
Value
to${email-writer.output.texts}
#Step 6. Test this pipeline
We are now ready to check to see if this pipeline works or not using the following sample data:
Customer ID: cid-318326Email: johnny@hello.comTicket Issued to Company: AT&TTicket ID: tid-542594Content: Where can I download the invoices from the last three months?
-
Copy and paste it into the corresponding input fields in the
variable
block -
Click
Run
in the top right -
Check the
response
block for the results
#Run the pipeline
There are 3 ways to run your pipeline:
#1. Run in the Pipeline Playground Page
You can go to the Pipeline Playground page either by clicking the left arrow
next to Component +
in the top left or navigating to your Pipelines page
and selecting the relevant pipelines.
Input the corresponding sample data and click Run
to get the results!
#2. Run in the Pipeline Editor Page
See the Step 6. Test this pipeline section above.
#3. Run via API Endpoint
💧 Instill VDP automatically generates a dedicated endpoint for each pipeline, you can find the steps on how to run a pipeline via API Endpoint in the documentation.
The corresponding response for the above API request will be:
{ "outputs": [ { "draft-email": [ "Subject: [tid-542594] Request Received: Inquiry About Invoice Downloads\n\nDear Johnny,\n\nThank you for reaching out to us. We have received your request regarding downloading invoices for the last three months.\n\nTo access your invoices, please log in to your AT&T account and navigate to the \"Billing & Payments\" section. From there, you can select \"View Paper Bills\" where you’ll be able to download the invoices for the past three months. If you need further assistance or have any more questions, please feel free to let us know.\n\nWe appreciate your patience and value you as an AT&T customer.\n\nBest regards,\n\n[Your Name]\nCustomer Support Team\nAT&T" ], "ticket-category": [ "billing-and-payments" ] } ], "metadata": null}
Well done! You just completed the tutorial for building your own Customer Ticket Processing Automation 🎉.
#What's next?
Our team at Instill AI is continuously improving and pushing out new features every day. Join our Discord community to stay up to date with the latest changes and to share any feedback or cool projects you build with us. Happy building 🙌!