Prompt Engineering Primer
# Prompt engineering primer
> Six patterns, one example each, all from job-radar. Read top-to-bottom once. After that, use it as a reference card while writing your first prompts.
---
## The two-minute mental model
LLMs are next-token predictors. Everything in the prompt — instructions, examples, format hints, role framing — biases that next-token prediction. The art is making the bias point at the answer you want **for inputs you haven't yet seen.**
The single biggest beginner mistake: writing a prompt that works on the input you tested, then assuming it generalizes. It usually doesn't. Generalization comes from:
1. **Structure** (system role, clear sections, structured outputs)
2. **Examples** (few-shot — the model copies patterns)
3. **Constraints** (enums, schemas, "if X then Y" rules)
4. **Iteration on diverse data** (this is what evals are for)
---
## Pattern 1 — System prompt vs user prompt
**Anthropic + OpenAI both split prompts into system (sets behavior) and user (carries the task).**
System content sticks across turns. User content is the per-call payload. Putting your role/persona/style guide in the system prompt and the task-specific text in user means your prompt is reusable.when to use it
Community prompt sourced from the open-source GitHub repo majdukovic/job-radar (no explicit license). A "Prompt Engineering Primer" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
majdukovic/job-radar · no explicit license
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions