AI docs · Building with AI
Prompting
How you instruct a model. Clear role, context, output spec, examples, and constraints get dramatically better results.
What it is
- A prompt is the instruction and context you give a model.
- Prompt design (sometimes called prompt engineering) is the cheapest, fastest lever on output quality.
How it works
- Effective prompts give a role and goal, the needed context, a clear output format, and constraints.
- Examples (few-shot) often beat lengthy instructions.
- Iteration matters: treat the first answer as a draft and refine.
Trade-offs
- Cheap and immediate, but has a ceiling: some behavior needs RAG or fine-tuning.
- Long prompts cost tokens; balance detail against budget.
When to use it
- Always: it is the first thing to optimize before reaching for heavier methods.
Common pitfalls
- Vague asks, missing context, and no output spec.
- Not telling the model what to do when it is uncertain.