1 min lesson
Prompt engineering for reliability
Explain the order in "Prompt engineering for reliability", then say how you would verify the result.
Step 1 of 2
Prompt engineering for reliabilitythe part that separates production from demo
A demo prompt returns prose. A production prompt returns a value your pipeline can branch on, every time, even on the weird row. Four habits get you there.
- 1Force structured output. Ask for strict JSON or a single enum value, so a formula column can route on it without parsing prose.
- 2Few-shot the edge cases. Two or three labeled examples, including a hard one, anchor the model far better than adjectives.
- 3Guardrail the unknowns. Give an explicit
"unknown"escape hatch so the model abstains instead of inventing an answer. - 4Eval on a sample before you scale. Hand-label 50 rows, run the prompt and check agreement before you spend on 50,000.
Learn more
Full explanation
A production classification prompt returns a value, not prose
a production classification prompt returns a value, not prose
Classify this company as an ICP fit for a developer tool.
Return ONLY JSON: { "fit": "strong"|"weak"|"unknown", "reason": "<=12 words" }
Rules:
- "strong" only if they ship software and have >10 engineers.
- If the website does not state headcount or product, return "unknown".
- Do not guess. "unknown" is a valid, expected answer.
Examples:
Input: "Series B fintech, 40 engineers, ships a mobile app" -> {"fit":"strong","reason":"software company, large eng team"}
Input: "Local accounting firm, no product" -> {"fit":"weak","reason":"not a software company"}
Input: "Stealth startup, no details" -> {"fit":"unknown","reason":"insufficient information"}
Company: {{website_summary}}Always eval before you scale
The cheapest way to look senior in this round: “Before I ran the prompt on the full list, I hand-labeled 50 rows and checked agreement. It missed on holding companies, so I added a few-shot example for those.” That is the difference between hoping and knowing.