Craft a Simple Prompt
Welcome to the Customer Complaints Classification Tutorial! Imagine you’re a customer support analyst tasked with categorizing customer complaints to route them to the appropriate department. With GenAI Studio, you can sort these complaints efficiently, aiding data-driven decision-making.
Let’s get started! First, we’ll make sure you’re signed in with your Hugging Face access token ready, and then we’ll set up your project.
Get Set Up #
- Ensure you’re signed in.
- Confirm your Hugging Face access token is set.
Create a Project #
Creating a new project is like preparing your workspace for this task.
Create a New Project: Go to your GenAI Studio home page and click Create a new project. Name Your Project: Call it Customer Complaints Tutorial and click Create. You’ll see it listed in your projects.
- Go to your GenAI Studio home page and select Create a new project.
- Name it
Customer Complaints Tutorial
and then select Create. You’ll see it listed in your projects. - Select Customer Complaints Tutorial from the project list.
Choose a Base Model #
Selecting a base model is the foundation for categorizing complaints.
- From the project’s Snapshots tab, select New Playground.
- Open the Select model drawer and then pick a base model from the list, such as
meta-llama/Llama-2-7b-chat-hf
.About the Llama-2-7b-chat-hf base model- Llama-2: This is the second version of the Llama model series.
- 7b: The model has around 7 billion parameters.
- chat: The model is specifically tuned for conversational tasks.
- hf: Hugging Face platform.
- Select a Resource pool. Let’s choose the
a100
resource pool of NVIDIA A100s. NVIDIA A100s are generally recommended for inference and fine-tuning However, if your resources are limited, you can use NVIDIA V100s or NVIDIA T4s. - Select Load to load the model into the playground.
Provide Instructions #
Now, let’s start by categorizing a single complaint.
- Type the following Instruction.
Instruction
You are a customer support expert in a financial sector. Your task is to classify customer complaints
as related to a particular product from the following list. Don't include any explanation.
Only respond with one product from the numbered list.
Categories:
1. Credit reporting, credit repair services, or other personal consumer reports
2. Credit card or prepaid card
3. Credit card
4. Student loan
5. Debt collection
6. Checking or savings account
7. Credit reporting or other personal consumer reports
8. Vehicle loan or lease
9. Payday loan, title loan, or personal loan
10. Mortgage
Provide a Customer Complaint #
- In Input, enter a real complaint text and prepare to categorize it.
Input
Complaint: I have not been living at the address which judgment was issued for the past year and I do not owe any money to these lawyers or landlord. I will like this removed from my credit report. Also I made final payment on my woman within account and close it. please research and clear my credit will be looking for apartment soon and this issue will not let me get the apartment I want. Thank you.
Answer:
Generate a Response #
- Select Generate and review the output.
Set Model Generation Properties (Model Parameters) #
Optimize your model’s responses by adjusting its settings.
- Select Manage model.
- In Model generation properties, set the following parameters:
- Temperature:
0
- Max Tokens:
64
- Top K:
30
- Top P:
1
- Temperature:
- Select Load.
Re-generate the Response #
- Select Generate.
- Review the re-generated output.
Continue to adjust the generation properties until you are satisfied with the output.
Save the Snapshot #
- Save the snapshot and name it
customer complaints snapshot1
.
That’s great! You’ve just created a snapshot and saved it! But, there’s more to explore! In the next part, we’ll enhance our model’s capabilities by providing examples and linking a dataset containing various complaints.
By doing this, we’ll see how our model transforms responses into a structured dataset, complete with categorized complaints.
Recap #
- Craft a Simple Prompt: You learned how to create a basic prompt to engage with the model initially. This helps establish a foundation for more complex interactions.