arnavgrg's picture
Update README.md
2c1958c verified
|
raw
history blame
4.48 kB
metadata
library_name: peft
base_model: mistralai/Mistral-7B-v0.1
license: apache-2.0
datasets:
  - bitext/Bitext-customer-support-llm-chatbot-training-dataset
language:
  - en
tags:
  - text-generation-inference

Description

This LoRA adapter was fine-tuned on the bitext/Bitext-customer-support-llm-chatbot-training-dataset, specifically by:

  1. Grouping the data on the following category column values: PAYMENT, INVOICE, REFUND
  2. Merging intent and response columns into a new single column called response_json that is a JSON object consistint of two keys: intent and response.

This is what the dataset looks like once it is preprared:

drawing

It also has the following token distribution (without the prompt template being merged into the input)

drawing

How To Use This Model

Prompt Template

This adapter was instruction tuned using the following prompt template:

You are a support agent for a company and you receive requests from customers.
Your job is to reply to the customer by providing both the intent, which you
should determine from the customer's request, as well as an appropriate response.

Please note that the intent can only be one of the following: check_payment_methods, get_invoice, check_refund_policy, track_refund, payment_issue, check_invoice, get_refund.

Please package your reply in the JSON format.

Request: {instruction}

Reply:

At inference time, just replace/insert {instruction} with an actual instruction.

Example Input and Output

Input:

You are a support agent for a company and you receive requests from customers.
Your job is to reply to the customer by providing both the intent, which you
should determine from the customer's request, as well as an appropriate response.

Please note that the intent can only be one of the following: check_payment_methods, get_invoice, check_refund_policy, track_refund, payment_issue, check_invoice, get_refund.

Please package your reply in the JSON format.

Request: can you help me check in which cases can I ask for refunds?

Reply:

Output (rendered using pprint, but is a proper JSON with full key-value pairs):

{'intent': 'check_refund_policy',
 'response': "I'll do my best! I completely understand your need to have a "
             'clear understanding of the situations in which you can request a '
             'refund. Let me provide you with a comprehensive breakdown:\n'
             '\n'
             '1. **Product/Service Defect:** If the product or service you '
             "purchased has a defect or doesn't meet the description, you are "
             'typically eligible for a refund.\n'
             '2. **Cancellation within Grace Period:** Should you change your '
             'mind and decide to cancel your purchase within the specified '
             'grace period, you should be able to receive a refund.\n'
             '3. **Unauthorized Charges:** If you notice any charges on your '
             "account that you didn't authorize or recognize, we will "
             'investigate the matter and assist you in obtaining a refund.\n'
             '4. **Event Cancellation:** If you purchased tickets for an event '
             'that gets canceled without a rescheduled date, you would usually '
             'be entitled to a refund.\n'
             '5. **Duplicate Charges:** If you have been charged multiple '
             'times for the same item, please inform us, and we will rectify '
             'the situation promptly.\n'
             "6. **Non-receipt of Goods:** If you haven't received your "
             'ordered product within the expected timeframe, you may qualify '
             'for a refund.\n'
             '\n'
             'Please keep in mind that refund policies may vary depending on '
             "the vendor or service provider. It's always a good idea to "
             'review their terms and conditions or contact them directly for '
             'more specific information. If you have any specific concerns or '
             'need assistance with a particular order, please provide me with '
             "the necessary details, such as the order number, and I'll be "
             'glad to assist you further.\n'
             '\n'
             'Is there anything else I can help you with today?'}

Framework versions

  • PEFT 0.8.2
  • Ludwig 0.10.2