Careeroza
Real World Example
Food Delivery Support Ticket Triage
Food delivery apps like Swiggy and Zomato receive lakhs of support messages a day. A common first GenAI feature is triage: read the message and tag it (late order, wrong item, refund, payment) so it reaches the right team. Here is a small version with the Claude API:
import anthropic
from dotenv import load_dotenv
load_dotenv() # puts ANTHROPIC_API_KEY into the environment
client = anthropic.Anthropic() # reads ANTHROPIC_API_KEY
ticket = "Order #88213 came 50 minutes late and the biryani was cold. I want my money back."
response = client.messages.create(
model="claude-haiku-5-5", # small, fast model is enough for tagging
max_tokens=100,
system="Classify the support message. Reply with one tag only: LATE, WRONG_ITEM, REFUND, PAYMENT, OTHER. "
"If several apply, pick the action the customer asks for.",
messages=[{"role": "user", "content": ticket}],
)
print(response.content[0].text)Run it
python triage.pyExample output
REFUND
Why This Works Well
- The task is narrow and the output is one word, so a cheap fast model is enough.
- Your code checks the tag is one of the five allowed values before routing (never trust free text blindly).
- Humans still handle the refund; the AI only saves the sorting time.