Prompt Design and Examples
Write an explicit task contract
A useful prompt explains the objective, inputs, constraints, evidence policy, and output format. Personality alone is insufficient: “You are an expert” does not define what to do with a missing purchase date.
For Acorn, separate the instructions from ticket text and source passages. Clear delimiters make interpretation easier, but they are not security boundaries. The application still treats all user and retrieved text as untrusted.
Task: Draft a support reply using only the supplied policy.
If an answer requires an absent fact, ask one clarification question.
Do not promise exceptions not stated in the policy.
Policy:
<policy id="refund-v2">
Standard purchases are refundable within 14 days.
</policy>
Ticket:
<ticket>I purchased yesterday. Can I get a refund?</ticket>
Output: a short reply plus the source ID supporting the policy claim.This is a prompt example, not code. Try changing “yesterday” to “some time ago.” A correct response should avoid assuming the missing date.
Zero-shot, few-shot, and decomposition
Zero-shot prompting supplies instructions without demonstrations. Few-shot prompting includes input-output examples. Use examples that cover ordinary inputs, ambiguity, and refusal or abstention when appropriate. Examples can introduce unwanted bias if they all favor one class or one writing style.
Decomposition breaks a task into verifiable stages: extract facts, retrieve policy, compare conditions, and draft a reply. It adds latency and orchestration, so compare the gain against a simpler baseline. Ask for a concise justification or evidence references when useful; do not assume a long generated reasoning trace guarantees correctness.
Prompt iteration is an experiment
Keep a versioned prompt and a small representative development set. Change one element, run the same cases, and inspect regressions. Overfitting a prompt to five familiar examples is still overfitting. Keep separate examples for final evaluation.
Important inputs belong in structured fields where possible. For example, supply the verified purchase date from a tool rather than requiring a model to guess what “last Friday” means in an unspecified timezone.
Checkpoint with answers
Can repeated words such as IMPORTANT enforce access control? No. Authorization must be checked outside the model.
What should a few-shot set include for classification? Representative labels and edge cases, with a clear contract for ambiguous inputs.
Exercise: A prompt says “Always answer” and “Never guess missing policy.” How would you improve it? Answer: explicitly allow abstention and clarification, remove the conflict, and test missing-evidence cases.