Seeded synthetic support tickets in five categories; Tribuo and Smile logistic regression and Smile naive Bayes against a majority baseline; skewed classes, train/test duplicates, vocabulary drift and the three different answers to a ticket of unseen words; a zero-shot client for OpenAI-compatible endpoints tested against a fake endpoint (no model was called) and a cost formula with assumed prices. Every figure is written to output/ by the tests that assert it. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b69H5rTewUKPyhGS8r
23 lines
1.6 KiB
Plaintext
23 lines
1.6 KiB
Plaintext
# Zero-shot client against a fake endpoint (wiring only, no model)
|
|
NO LLM WAS CALLED. A local server returns scripted replies, so this shows request shape and reply handling.
|
|
|
|
## Reply guard, ZeroShotLlm.parse
|
|
"BILLING" -> BILLING (accepted)
|
|
"Access." -> ACCESS (accepted)
|
|
"The category is Bug" -> BUG (accepted)
|
|
"BILLING or CANCEL" -> (none) (rejected: two categories)
|
|
"I think this is a refund request" -> (none) (rejected: no category name)
|
|
"" -> (none) (rejected: empty)
|
|
|
|
## Five scripted replies through the real HTTP client
|
|
scripted: BILLING, ACCESS, Probably BUG., FEATURE or BILLING, CANCEL
|
|
right 4 of 5, unparseable 1 (the ambiguous reply counts as wrong, never as a guess)
|
|
|
|
## The first request body, verbatim
|
|
{"model":"any-model","temperature":0,"max_tokens":8,"messages":[{"role":"system","content":"You classify customer support tickets. Reply with exactly one word from this list and nothing else: BILLING, ACCESS, BUG, FEATURE, CANCEL. BILLING is about charges, invoices and refunds. ACCESS is about login, passwords and locked accounts. BUG is about something that is broken. FEATURE is a request for something new. CANCEL is about ending a subscription or account."},{"role":"user","content":"Ticket: I was charged twice for this month.\nCategory:"}]}
|
|
Authorization header: Bearer test-key
|
|
|
|
## Prompt size across the real test tickets (estimate: characters / 4)
|
|
instruction alone : 93 tokens
|
|
average per ticket : 117.9 tokens (instruction + ticket)
|