Customer Complaints Classification:
Craft a Complex Prompt

As we continue refining our model, this section will guide you through creating a more intricate prompt to enhance accuracy and depth in responses. We’ll also save our progress by creating snapshots, which will be useful for future fine-tuning.

Create a Complex Prompt (Include both Product and Subproduct)

Access Your Saved Snapshot

  1. From the project’s Snapshots tab, select the snapshot you saved from the previous step.

Customize Your Prompt

Previously, we guided the model to identify a specific product from a predefined list relevant to a consumer complaint. Now, we’ll increase the complexity (and improve the response) by asking the model not only to predict the product but also to identify an associated sub-product based on the complaint details.

Instruction

You are a customer support expert in a financial sector. Your task is to classify customer complaints
as related to a particular product and subproduct from the following lists:

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

Sub-categories:
1. Credit reporting
2. General-purpose credit card or charge card
3. Federal student loan servicing
4. I do not know
5. Checking account
6. Store credit card
7. Other (i.e. phone, health club, etc.)
8. Credit card debt
9. Other debt
10. Mortgage debt
11. Auto debt
12. Medical debt
13. Loan
14. Private student loan
15. Medical
16. Payday loan debt
17. Savings account
18. Payday loan
19. Other banking product or service
20. General-purpose prepaid card
21. Federal student loan debt
22. Other personal consumer report
23. Auto
24. Private student loan debt
25. Credit card
26. Non-federal student loan
27. Lease
28. CD (Certificate of Deposit)
29. Conventional home mortgage
30. Government benefit card

Only respond with one product and one subproduct from the numbered lists.
Reply in the following format "product (subproduct)".

Examples

Complaint: {{Consumer Complaint}} 
Answer: {{Product}} ({{Sub_product}})

Input

Complaint: {{Consumer_complaint_narrative}}
Answer:

Expected Output

{{Product}} ({{Sub_product}})

Generate the Response

  1. Select Generate to see the output generated by the model based on the prompt you provided.
  2. Review the initial 10 output rows to gauge accuracy.

Compare Output Results

In the last section, we asked the LLM to classify customer complaints as related to a particular product from a list. By providing the LLM with a more complex prompt, we can see that the model now has the ability to classify customer complaints by product and subproduct.

Save the Snapshot

  1. Select Save Snapshot > Save as new snapshot. Name it customer complaints snapshot3.
  2. Select Save as New Snapshot.

Recap

  • Craft a Complex Prompt: You advanced the model’s capabilities by crafting a more detailed prompt that includes both product and subproduct categories. This improved the model’s depth in processing and responding to queries, making it more precise.