1 min lesson
Earn the AI step
Match each case in "Earn the AI step" to the signal and response that fit it.
Step 1 of 3
Earn the AI step
Cursor builds an AI tool and expects you to apply AI to real workflows, but a gratuitous LLM call is worse than none. Add exactly one AI step that genuinely beats a deterministic rule and put a guardrail on it.
Classify a free-text company description into an ICP segment a regex can't.
Draft a one-line, fact-grounded personalization from enriched fields.
An LLM doing arithmetic the score already computes.
A model 'deciding' routing a threshold handles deterministically and cheaper.
Learn more
Full explanation
The AI column with its guardrail
# Constrain the output space, ground it in real fields and verify before trusting it.
prompt = f"""Classify this company into exactly one segment.
Allowed values: ["startup", "midmarket", "enterprise", "unknown"].
Return only the value, no prose.
Company: {row.company}
Employee count: {row.employee_count}
Description: {row.description}
"""
label = llm(prompt).strip().lower()
# Guardrail: reject anything off-menu; never let a hallucinated label route a lead.
if label not in {"startup", "midmarket", "enterprise", "unknown"}:
label = "unknown" # fail closed, send to human review
# Cross-check against a hard signal so the LLM can't override ground truth.
if row.employee_count and row.employee_count > 2000 and label == "startup":
label = "needs_review" # contradiction → flag, don't silently trustThe guardrail is the part the team is actually grading: constrain the output to an allowed set, fail closed to human review on anything off-menu and cross-check the model against a hard signal it shouldn't be able to override. "I used an LLM" is table stakes; "I used an LLM and here's how I keep it from routing a lead on a hallucination" is the senior answer.