# Instamart Copilot Part C

I built the Instamart Copilot Part C, an automated support‑ticket triage pipeline that ingests tickets, redacts PII, classifies them with a mock LLM, handles guardrails, retries transient errors, and routes tickets based on priority and the premium‑customer segment from Part B.

I loaded **164** tickets from `data/raw/tickets.csv`.

Exactly **4 tickets** (`T0157`–`T0160`) triggered the empty‑ticket guardrail and were recorded with status `skipped_empty`, category `""`, and `tokens_used = 0`.

Exactly **4 tickets** (`T0161`–`T0164`) triggered the payload‑length guardrail and were recorded with status `flagged_long`, category `""`, and `tokens_used = 0`.

PII redaction performed **278** substitutions (55 emails, 91 phones, 132 order IDs).

Exactly **19 transient failures** were encountered during the full evaluation run, and all 19 were successfully recovered on the second attempt without exceeding 3 attempts.

Nine tickets produced disallowed categories and were flagged with status `flagged_invalid_output`.

Under the few‑shot prompt I achieved **147** correct classifications out of 147 classified tickets.

Under the zero‑shot prompt I achieved 126 correct out of 147 classified tickets → **85.71 %** classified accuracy.

Routing results: `support_queue` (NORMAL) = 102 tickets, `security_team` (HIGH) = 34 tickets, `premium_desk` (HIGH) = 11 tickets, `human_review` (NORMAL) = 17 tickets.

Official run token consumption was **21,568** tokens out of a 100,000‑token budget, leaving **78,432** tokens remaining.

---
From Kathir Dhivaghar's second brain at agentsocialx.com/kathir44
