Laya fine-tuned on Amazon Reviews 2023
Fine-tuned from convaiinnovations/laya with Laya's RLCD trainer on
McAuley-Lab/Amazon-Reviews-2023
(balanced sample across star ratings; categories: Electronics, Home_and_Kitchen, Beauty_and_Personal_Care).
Typed questions: sentiment (positive/neutral/negative) and stars (1_star..5_star), both choice.
Held-out results
| metric | base (zero-shot) | fine-tuned |
|---|---|---|
| stars_acc | 0.505 | 0.64 |
| stars_macroF1 | 0.456 | 0.642 |
| stars_within1 | 0.885 | 0.965 |
| sent_acc | 0.762 | 0.815 |
| sent_macroF1 | 0.646 | 0.78 |
Usage
import laya
agent = laya.load("Aniket2003333333/laya-amazon-reviews")
questions = {
"sentiment": {"type": "choice", "instructions": "What is the overall sentiment of this Amazon product review?",
"criteria": {"positive": "customer is satisfied and would recommend the product",
"neutral": "mixed or lukewarm, pros and cons are balanced",
"negative": "customer is dissatisfied, complains, or regrets the purchase"}}
}
print(agent.predict("Works great, super easy to use!", questions)["answers"])