Prompt Engineering and System Prompt Design
What to know
Strong prompts are explicit about role, task, constraints, input, and output format. The system prompt sets durable behavior (persona, policies, tone, tool-use rules); user turns carry the task and data. Candidates should understand techniques: giving clear instructions and context, using examples (few-shot) to demonstrate format, asking the model to think step by step before answering for reasoning-heavy tasks, and specifying output structure (e.g., "return JSON with keys a and b").
Know how to place long documents: put large reference material in the prompt with clear delimiters (XML-style tags work well) and put the actual question after the documents. Understand that instructions and data should be separated so untrusted content cannot be mistaken for directives.
Traps
- Vague instructions ("be helpful") instead of concrete constraints and formats.
- Negative-only instructions ("don't be verbose") without saying what to do instead.
- Putting the question before a huge document, which buries the task.
- Over-stuffing examples until they crowd out the actual input, or examples that contradict the stated rules.
- Assuming temperature fixes factual errors; it changes variability, not knowledge.
- Expecting the system prompt to override clearly conflicting user instructions without reinforcement.
Worked example
For extraction: system prompt states role and rules ("extract only fields present; return JSON; use null when absent"); user turn contains the document in <doc> tags followed by the instruction. This ordering plus a schema plus an explicit null rule reduces hallucinated fields.
Rule of thumb
If a colleague could not follow your prompt unambiguously, neither will the model. Specify role, task, constraints, and output shape, and show one example of "good."