Your prompt is just “write code.” What improves it the most?
- AAdd the word “please”
- BAdd a role, the context, and the expected format/constraints
- CMake it much longer
- DWrite it in ALL CAPS
Answer: B
Add a role, the context, and the expected format/constraints
Why
Specificity wins: who the model is, the context, and exactly what output you want (format + constraints). Length or politeness alone don’t.
- PromptingA downstream pipeline needs strict, repeatable JSON from the model.
- PromptingYou need output in a very specific, unusual format.
- PromptingYour app puts stable rules (persona, safety limits, output format) into the same user message as each request’s data.
- PromptingYour prompt says "answer in one short sentence" and, three paragraphs later, "explain your reasoning step by step in detail." Outputs are…
More on Way of the Agent
- Course programThe first three modules are free: start in the browser or the app, no card needed.
- Library: guides, skills and promptsReady prompt templates, grouped into collections.
- AI ChroniclesSourced stories from the history of AI.
- ConceptsPlain-language explainers of agent engineering.
- Learn AI agentsApps and courses for learning AI agents, compared honestly.
Real situations from building agents - with the answer and why.
Solve a new one every day on the Path