Skip to main content

Lora Land for Customer Support

In this example, we will show you how to use the Predibase SDK to fine tune Mistral-7B for customer support for 3 different types of customers. We'll give a detailed walkthrough of the steps from data preparation to training and running inference.

Open In Colab Notebook

What is Lora Land?

Lora Land is a collection of 25 fine-tuned Mistral-7b models that consistently outperform base models by 70% and GPT-4 by 4-15%, depending on the task, all fine-tuned on Predibase for an average cost of $8.00. This collection of specialized fine-tuned models–all trained with the same base model – offers a blueprint for teams seeking to efficiently and cost-effectively deploy highly performant AI systems.

Task Description

To assist with customer support requests, we have decided to use an LLM to power a chat bot to assist us. In particular, we want it to take a chat/input message from a customer, and return a JSON response with two keys:

  1. intent: Classify the input query into a fixed list of intents (for e.g., "get_refund" or "get_invoice" or "cancel_order")

  2. response: Write a free-form response back to the user indicating that we've understood what the user wants to do and we'll be happy to assist them with the task at hand, as well as apologize for difficulties if at all required.

For example, for an input:

I can no longer afford order {{Order Number}}, cancel it

We want to get the LLM to return:

{
"intent": "cancel_order",
"response": "I pick up what you're putting down that you're in a situation where you can no longer afford to proceed with order {{Order Number}}. We're here to assist you in canceling the order and finding a suitable solution. Kindly follow the steps below: 1. Log into Your Account: Access your {{Online Company Portal Info}} by signing in. 2. Locate Your Order: Navigate to the '{{Online Order Interaction}}' or '{{Online Order Interaction}}' section. 3. Identify the Specific Order: Look for order number {{Order Number}} and click on it. 4. Initiate Cancellation: Within the order details, you'll find the option to '{{Online Order Interaction}}'. Please select it to begin the process. 5. Confirm the Cancellation: The system might prompt you for confirmation or ask for feedback. Please provide the necessary information to proceed. Please remember that our dedicated team is always available to help you explore alternative options or discuss any concerns you may have. Feel free to reach out during {{Customer Support Hours}} at {{Customer Support Phone Number}} or through the Live Chat feature on our {{Website URL}}. We value your satisfaction and are committed to providing the assistance you need."
}