Turn Triage Decisions Into Validated Structure
Design a compact JSON contract and validate fields, enums, evidence snippets, and human-review flags.
Today's Goals
- Define ticket triage as testable fields and enums.
- Distinguish valid structure from correct judgment.
- Test missing fields, unknown labels, and unsupported conclusions.
A support team may eventually move a model result into a queue. A paragraph is readable but difficult to validate consistently. A JSON object can carry the same decision in explicit fields. The critical lesson is that a parseable object is only the first gate.
Plain-Language Walkthrough
Design the smallest useful contract
Start with the decision the reviewer needs. Give every result the original ticket ID, one allowed category, one urgency value, a short evidence quote, and a review flag. Add an optional note for uncertainty. Avoid a field called “confidence” unless you define how it is calibrated and used. A model-produced decimal can look scientific while having no tested relation to actual error rates. A clear boolean review flag with a reason is more actionable at this stage.
A conceptual result might look like this:
{
"ticket_id": "NM-004",
"category": "other",
"urgency": "needs-human-review",
"evidence_quote": "The lid cracked and I also want a refund",
"review_required": true,
"review_reason": "Two issues and no verified order record"
}The same keys work for Chinese tickets; do not translate machine field names differently by locale. Translate explanatory values only when the downstream reviewer expects that. Keep category values stable so a branch can test them. An empty quote is not equivalent to “no evidence required.” Decide whether missing evidence rejects the result or forces manual review. Write the policy before running the model.
Interview questions
Why can valid JSON still be wrong?有效 JSON 为什么仍可能错?
Common in ChinaCommon overseasBasic#schema#semantic-validation🔒 Unlock this chapter to see the answer keys.
How should unknown categories be handled?怎样处理未知类别?
Common in ChinaCommon overseasIntermediate#schema-version#routing🔒 Unlock this chapter to see the answer keys.
How do you check evidence snippets?证据片段如何核验?
Common in ChinaCommon overseasIntermediate#bilingual#evidence🔒 Unlock this chapter to see the answer keys.
