Step 1: Say exactly what you want back
Brightline gets about eighty customer messages a day. They want a model to read each one and fill in three fields for the support queue: a category, a priority and the order id, if there is one.
This lab has no Python to write. You edit prompt.md, and a harness
runs it over 20 real-looking messages in cases.jsonl, each with the
right answer, then scores the replies. That is how prompts are improved
at work: against a test set, with numbers, rather than by eye on one
example.
prompt.md has two parts, split by the line ---USER---:
- above it, the system prompt: the standing instructions;
- below it, the user template:
{message}is replaced by each customer message.
Text between <!-- and --> is a note for you; the harness removes it.
1. Click Run first, with the prompt as it is. Every case fails: the model writes a friendly paragraph, and a program cannot read a paragraph.
2. Replace the TODO with the output contract. Say it plainly:
Reply with exactly one line in this format and nothing else:
category=<category>; priority=<priority>; order=<order id or none>
category is one of: order_status, refund, recommendation, event, complaint, other
priority is one of: high, normal, low
3. Run again. Nearly every reply now parses, and some are already right. Read the failures: the model is guessing what the categories mean and what makes a message urgent. Step 2 fixes that.
prompt.md, the file you edit8 lines
<!-- Text inside these arrows is a note for you. The harness removes notes before sending. -->
You triage customer messages for Brightline Books, an independent bookshop.
<!-- TODO (Step 1): tell the model exactly what to reply:
one line, the format category=<category>; priority=<priority>; order=<order id or none>
and the allowed values for category and priority. See the instructions. -->
Classify this customer message.
---USER---
{message}cases.jsonlholdout.jsonlpromptlab.pyrun_tests.py