What is prompt engineering?
Prompt engineering is the practice of writing and structuring the instructions, context and examples given to a large language model so it produces accurate, consistent output for a specific task.
From prompt engineering to context engineering
The same model can give a vague answer or an excellent one depending on what it is told. The practice has shifted from clever one-off phrasing to what many now call context engineering: deciding which documents, rules, tools and history the model sees for each task, written down as knowledge files and reusable skills instead of one-off prompts.
Vendor guides from Anthropic and OpenAI agree on the basics: be clear and direct, give examples, structure inputs, and let the model reason before it answers. That is what makes AI features in a product reliable, and AI-assisted work in a team consistent instead of random.
Testing prompts in AI products
For products, we design and test the prompts behind AI features as part of product design and agentic workflows: every prompt runs against an evaluation set of real inputs with known good answers, so a new prompt or model is checked before release.
At STRAK prompts are written down and reused, not improvised. They live in the STRAK rulebook, described in our process: brand, tone, rules and offer sit in knowledge files that agents read before every task; repeatable jobs are written as step-by-step skills with a definition of done; checks run as code afterwards. When review catches a mistake, we fix the knowledge or the skill, not just the output.
Related service: Agentic workflows · How we work
Prompt engineering in practice
Instead of telling an agent “write a glossary page about design tokens”, our setup gives it the brand and rules files, a skill describing the page shape and word count, the data format, the list of valid links, and a script that renders the page and flags problems. The instruction itself is short; the context does the work. The output still goes to a person for review.
Common mistakes
- Rewriting prompts from scratch every time. Store prompts and context as files, version them and improve them.
- No examples. One or two examples of good output often beat a paragraph of description.
- Too much irrelevant context. More text is not better. Give the model what this task needs.
- No evaluation. Test prompt changes on a fixed set of inputs before shipping them in a product.
The parts of a good prompt
| Part | What it says | Example |
|---|---|---|
| Task | What the model should do | Write the empty state for the invoices screen. |
| Context | What it needs to know | Our tone of voice file and the screen’s purpose. |
| Constraints | What it must and must not do | At most 20 words, no exclamation marks. |
| Output format | The shape of the answer | A headline, one line of body text and a button label. |
| Examples | One or two good answers | The empty state we wrote for the projects screen. |
Common prompt engineering techniques
| Technique | What it does | When to use it |
|---|---|---|
| Zero-shot | Asks for the task with instructions only | Simple, well-known tasks |
| Few-shot | Adds a few examples of good output | When format or tone must match |
| Step-by-step reasoning | Lets the model think before it answers | Analysis, math and multi-step decisions |
| Roles | Sets who the model acts as in a system prompt | Products and assistants with a fixed job |
| Structured output | Asks for JSON or a fixed template | When code reads the answer |
Questions about prompt engineering
Is prompt engineering still needed with newer models?
What is the difference between a system prompt and a user prompt?
What is context engineering?
How do you test a prompt?
Can STRAK train our designers to work this way?
Thomas OldenburgerFounder, design and build leadStill deciding? A 30-minute call answers most of it.
Related terms
AI agent
An AI agent is a system in which a large language model plans and carries out a multi-step task on its own, choosing which tools to call, reading the results and deciding what to do next until the goal is met.
Definition AIAgent-ready website
An agent-ready website, also called an AI-ready website, is a site whose content, design system and rules are written down in a form AI agents can read, so an agent can draft a change safely for a person to review.
Definition AIModel Context Protocol (MCP)
The Model Context Protocol (MCP) is an open standard that lets AI applications connect to external tools and data sources, such as design files, code repositories, CMSs and databases, through a common interface of servers and clients.
Definition AIDESIGN.md
A DESIGN.md is a Markdown file in a repository that sets out a product’s design system, its design tokens and the rules for using them, so developers and AI coding tools build UI that matches the design.
Definition