- Blog
- 12.10.2024
- Leveraging AI, Data Fundamentals, Product
Testing Large Language Models for Customer Service Copilot: Improving Quality, Reducing Costs, and Transforming Processes

Artificial Intelligence (AI) is redefining how businesses operate. Traditionally, customer service operations rely on manual workflows—analyzing customer issues, researching solutions, and crafting professional responses. While effective, this approach is slow, costly, and resource-intensive.
Imagine resolving 10 times more customer cases at just a fraction of the cost—now made possible with Matillion’s Data Productivity Cloud (DPC).
In this blog, we explore how to integrate Large Language Models (LLMs) into your data pipelines using the Data Productivity Cloud. Through a practical example, I’ll demonstrate how you can automate customer service processes, evaluate AI-generated responses, compare costs, and assess the overall impact. By the end of this post, you’ll see how easily organizations can replicate this workflow to drive efficiency and cost savings.
The Power of Large Language Models in Customer Service
Customer service is often seen as a human-first industry, requiring a nuanced understanding of issues and personalized responses. However, LLMs like ChatGPT and Claude Sonnet have emerged as powerful tools capable of automating large portions of this process. These AI models can:
- Interpret and summarize complex customer issues.
- Retrieve relevant documentation or information from knowledge bases.
- Craft professional, helpful, and context-aware responses.
Despite their potential, not all LLMs are equal. Differences in cost, response quality, and accuracy can significantly impact business outcomes. To explore these variations, I tested four LLMs:
- ChatGPT-4 (ChatGPT-4-1106-preview)
- ChatGPT-4o
- ChatGPT-4o-mini
- Claude Sonnet v3.5
I built a complete ETL pipeline in Matillion DPC to evaluate these models systematically. This pipeline was designed to handle customer case issues from start to finish, transforming raw data into actionable, AI-generated responses.
Version 1 - Using the Amazon Bedrock Prompt Component for Claude Sonnet v3.5

Version 2 - Using the OpenAI Prompt Component for ChatGPT-4, ChatGPT-4o, and ChatGPT-4o-mini

ETL Pipeline Overview: Automating Customer Service with Matillion DPC
The pipeline comprises seven key stages that seamlessly process customer issues, integrate AI-generated insights, and deliver polished responses. Let’s break down each stage:
1. Input Customer Cases
The process begins with a dataset containing unresolved customer support cases. Each case includes:
- A unique Case ID.
- The customer’s query or issue.
- Any available metadata (e.g., timestamp, priority).
This table acts as the foundation for subsequent transformations.
2. Generate Keywords Using LLMs
Using Matillion’s Amazon Bedrock and OpenAI Prompt Components, we extract relevant keywords from each case. These keywords serve as contextual anchors, helping the AI model focus on the core issue.
How It Works:
- Input: The customer query.
- User Context Prompt: A tailored instruction asking the LLM to identify ~5 keywords summarizing the issue.
- Output: A JSON object containing extracted keywords, stored in a new column.
Documentation for Configuring Prompt Components:
3. Join Keywords to Customer Cases
In this stage, the generated keywords are joined back to their corresponding case IDs. This ensures a seamless connection between the input data and subsequent transformations.
4. Retrieve Context Using Pinecone Vector Query
Using Matillion’s Pinecone Vector Query Component, we query the company’s knowledge base to retrieve relevant documentation. This stage enriches the customer case with additional information, such as step-by-step instructions, API references, or troubleshooting guides.
Key Steps:
- Ingest keywords as search strings.
- Query the Pinecone vector database for matching content.
- Return text snippets associated with the most relevant vectors.

Documentation for Pinecone Vector Query:
5. Join Context to Customer Cases
The extracted context is merged with the original customer cases, creating a comprehensive dataset that includes both the problem statement and supporting information.
6. Generate AI Responses
Using the same Prompt Components as in Stage 2, the LLM generates a detailed, step-by-step email response for each case. The prompt is carefully crafted to ensure:
- Professional tone.
- Step-by-step clarity.
- Accurate and relevant advice.
Prompt Details:
The User Context includes instructions to:
- Reference extracted keywords and contextual data.
- Include step by step instructions to guide the customer.
- Provide helpful links or resources where applicable.
7. Deliver Final Responses
The AI-generated responses are joined back to their corresponding Case IDs, ready for review or direct delivery to customers.
Testing the Pipeline: Results and Insights
To assess the pipeline’s performance, we tested it on a set of 20 sample customer queries. Below is an example of a customer query used:
“I’m struggling with pagination while using the API Query Profile in Matillion ETL. What type of pagination should I use?”
Responses to the 20 sample customer queries from the four LLMs were evaluated by a Matillion Solution Architect based on usefulness, accuracy, and completeness. Below is an example of the feedback provided for the specific customer query quoted above:
| LLM | Rating | Comments |
| ChatGPT-4 | 4/5 | Linked to correct documentation but lacked depth in steps. |
| ChatGPT-4o | 2/5 | Relied too much on external links, requiring customer effort to interpret. |
| Claude Sonnet v3.5 | 4/5 | Provided clear steps but limited explanation. |
| ChatGPT-4o-mini | 5/5 | Most relevant and actionable response, with detailed guidance. |
To better illustrate the differences in responses from the four LLMs to the customer query mentioned earlier, their AI-generated replies are presented below:
| LLM | AI-generated Responses |
| ChatGPT-4 | Hello,
Thank you for reaching out and providing the details of your case linked with 00074399. I understand you are looking to use the API Query Profile in Matillion ETL and need guidance on handling pagination with the Jira API.
Based on the Matillion ETL version 1.74.2 that you are using, and the information provided in the documentation, you should use offset-based pagination for the Jira API. This method involves setting the 'startAt' and 'maxResults' parameters in the API payload to manage the pagination through the records.
Here are the steps to set up offset-based pagination:
1. Create an API profile from the Project menu in Matillion ETL. 2. Set up a new endpoint and configure this endpoint using the pagination and offset-based pagination option in the last step of the process. 3. Once the profile is completed, you will need to make slight changes to the RSD for the profile. Find the RSD and select advanced mode. 4. Use the provided RSD configuration as a guide, ensuring that the 'pageoffsetparam' and 'pagesizeparam' sections are correctly set.
For more detailed instructions, please refer to the Jira API Pagination article [here](https://support.matillion.com/s/article/JiraAPIPagination1725969729336).
If you encounter any issues or have further questions, please do not hesitate to contact us.
Best regards, [Your Name]
|
| ChatGPT-4o | Hi,
Thank you for reaching out. I understand you're having trouble with pagination while using the API Query Profile in Matillion ETL version 1.74.2. Unfortunately, the provided documentation excerpts do not directly address pagination strategies for the Jira API. However, I recommend checking the Jira API documentation for pagination details: https://developer.atlassian.com/cloud/jira/software/rest/intro/#introduction.
In Matillion ETL, pagination can typically be handled using the 'Next Page URL' or 'Offset' pagination methods, depending on how the API you're working with implements pagination. If Jira's API provides a 'next' link in the response, you can use the 'Next Page URL' method. Otherwise, if it uses offset-based pagination, you can configure Matillion to increment the offset parameter in subsequent requests.
Could you please provide more details about the pagination method used by the Jira API or any specific error messages you encounter? This will help us assist you better.
Best regards,
[Your Name] Matillion Support |
| Claude Sonnet v3.5 | Hi,
Thank you for reaching out regarding your issue with pagination while using the API Query Profile in Matillion ETL version 1.74.2. To implement pagination correctly, you can follow these steps:
1. **Create an API Profile**: Go to the Projects menu in the Matillion ETL UI and create a new API profile. 2. **Set Up Endpoint**: Configure your endpoint using the pagination options available. Make sure to select the pagination method that suits your needs (e.g., offset-based pagination). 3. **Modify RSD File**: After creating the profile, you may need to make slight modifications to the RSD file. Use the advanced mode to adjust the parameters for pagination. Specifically, ensure you set the `startAt` and `maxResults` parameters correctly in your API payload. 4. **Test Your Configuration**: Run the job to verify that the pagination works as expected.
For more detailed guidance, you can refer to the following knowledge articles: - [How To: Extract data into Cloud Data Warehouse using the API Query Component](https://support.matillion.com/s/article/HowToExtractdataintoCloudDataWarehouseusingtheAPIQueryComponent) - [Jira API Pagination](https://support.matillion.com/s/article/JiraAPIPagination1725969729336)
Could you please provide more details about the specific API you are trying to query? Additionally, are you using any specific parameters that might affect pagination? This information will help us assist you better.
Best regards, Matillion Support Team |
| ChatGPT-4o-mini | Hi,
Thank you for reaching out regarding your issue with pagination while using the API Query Profile in Matillion ETL version 1.74.2. To implement pagination correctly, you will need to set up your API profile with the appropriate parameters.
Here are the steps to configure pagination for your API Query Profile:
1. **Create an API Profile**: Go to the Projects menu in the Matillion ETL UI and select 'Manage API Profiles'. 2. **Set Up a New Endpoint**: Click on the '+' sign to add a new profile. Fill in the endpoint name and description, then proceed to configure the API settings, including any necessary authentication and parameters. 3. **Configure Pagination**: Ensure you enable pagination in the last step of the process. You will need to set the `startAt` and `maxResults` parameters in your API payload to manage offset-based pagination effectively. 4. **Edit the RSD File**: After creating the profile, you may need to make slight modifications to the RSD file in advanced mode. Use the following configuration as a guide: - Set `pageoffsetparam` to `startAt`. - Set `pagesizeparam` to `maxResults`. - Ensure you define the limit for the number of results returned per page. 5. **Test Your Configuration**: Run the job to ensure that the pagination works as expected.
For more detailed guidance, you can refer to the following knowledge articles: - [How To: Extract data into Cloud Data Warehouse using the API Query Component](https://support.matillion.com/s/article/HowToExtractdataintoCloudDataWarehouseusingtheAPIQueryComponent) - [Jira API Pagination](https://support.matillion.com/s/article/JiraAPIPagination1725969729336)
Could you please confirm if you have already set up the API profile and if you are facing any specific errors during the pagination process? This information will help us assist you better.
If you encounter any issues or have further questions, please let me know!
Best regards, Matillion Support Team |
Cost Analysis: Which LLM Delivers the Best ROI?
Scalability is crucial for customer service automation. To determine cost efficiency, we calculated the average cost per case for each LLM based on token usage (input + output) for the 20 sample customer queries and vendor pricing.
LLM | Cost Per Case | Annual Cost (169 cases/week) |
| ChatGPT-4 | $0.194 | $1,700.61 |
| ChatGPT-4o | $0.019 | $165.56 |
| Claude Sonnet v3.5 | $0.024 | $212.98 |
| ChatGPT-4o-mini | $0.001 | $9.93 |
Switching from ChatGPT-4 to ChatGPT-4o-mini yields a cost reduction of $1,690 per year while receiving the highest rating for response quality out of all of the tested models.
Note: Pricing is subject to change based on vendor updates.
Benefits of Matillion’s Data Productivity Cloud for LLM Integration
Key Advantages:
- Improved Customer Satisfaction: Faster, more accurate responses enhance the customer experience.
- Operational Efficiency: Automate repetitive tasks, freeing up team resources for complex issues.
- Cost Savings: Dramatically reduce operational costs by using efficient LLMs.
- Scalability: Handle higher volumes of cases without increasing headcount.
Challenges:
- Manual Review: AI-generated responses still require human oversight to ensure accuracy and relevance.
- Continuous Optimization: Regular testing of new models is necessary to keep up with technological advancements.
Conclusion: Transform Your Customer Service Today
This project illustrates how Matillion’s Data Productivity Cloud empowers organizations to revolutionize customer service by integrating LLMs. The result? Reduced costs, improved efficiency, and happier customers.
Ready to unlock the potential of AI-driven customer service? Explore how Matillion can help your organization streamline operations and achieve measurable impact.
Isabelle Ng
Associate Data Engineer
Featured Resources
Big Data London 2025: Key Takeaways and Maia Highlights
There’s no doubt about it – Maia dominated at Big Data London. Over the two-day event, word spread quickly about Maia’s ...
BlogSay Hello to Ask Matillion, Your New AI Assistant for Product Answers
We’re excited to introduce a powerful new addition to the Matillion experience: Ask Matillion.
BlogRethinking Data Pipeline Pricing
Discover how value-based data pipeline pricing improves ROI, controls costs, and scales data processing without billing surprises.
Share: