Dersin tam metnini oku
1. A job description, not a costume
An agent prompt is a reusable specialist: instructions that define a job, saved once, invoked whenever the job comes up. The complete design has five parts. ROLE: what the specialist is and is not. WORKFLOW: the steps it follows, in order. REQUIRED INPUTS: what it must be given, or must ask for, before starting. OUTPUT CONTRACT: the exact shape of what comes back. GUARDRAILS: what it never does, plus any disclaimers its domain demands.
Miss a part and the failure is predictable. No workflow: plausible but unmethodical answers. No required inputs: confident work built on guesses. No output contract: a different shape every time. No guardrails: the one bad day that makes you stop trusting it.
2. Why structure beats role-play
'You are an experienced contract lawyer' is a costume. It shifts vocabulary and confidence, mostly confidence, while the underlying work stays whatever the model felt like doing. The costume version sounds more expert without being more careful.
The structured version defines the work: 'Review the contract clause by clause. For each flagged clause: quote it, name the risk, rate severity, propose alternative wording. Ask for the governing jurisdiction if it is not stated. End with the three clauses to negotiate first, and note that this is not legal advice.' Same domain, but now the expertise is a procedure you can verify and improve.
3. Guardrails and worked examples
Guardrails are the never-do rules that hold on the bad day: 'never invent a citation', 'never state a deadline without naming its source', 'always include the not-legal-advice line'. Write them from failures you have seen or can predict. Each guardrail should have a story. Domains with real stakes (legal, medical, financial) also need their standing disclaimer built in, not remembered per prompt.
Then pin the behavior with one worked example: a sample input and the exact output you want for it, inside the agent prompt. You know why from earlier courses, patterns hold better than descriptions. One example tunes tone, depth and format at once, and each new failure mode becomes a new example or a new guardrail.
4. Version your agents
The first version of any agent is a hypothesis. You will meet inputs you did not predict and outputs that drift from the contract. So treat the prompt like the small piece of infrastructure it is: number the versions, change one thing at a time, keep one line per version on what changed and why.
The discipline pays off the first time an agent gets worse. With versions, you compare v4 against v3 and find the line that caused it; without them you are rewriting from memory. Versioning also makes agents shareable, a teammate can adopt v5 and report problems against something specific.