Prompt engineering
Be clear, direct, and detailed
When interacting with Claude, think of it as a brilliant but very new employee (with amnesia) who needs explicit instructions. Like any new employee, Claude does not have context on your norms, styles, guidelines, or preferred ways of working. The more precisely you explain what you want, the better Claude’s response will be.
The golden rule of clear prompting
Show your prompt to a colleague, ideally someone who has minimal context on the task, and ask them to follow the instructions. If they’re confused, Claude will likely be too.
Show your prompt to a colleague, ideally someone who has minimal context on the task, and ask them to follow the instructions. If they’re confused, Claude will likely be too.
How to be clear, contextual, and specific
- Give Claude contextual information: Just like you might be able to better perform on a task if you knew more context, Claude will perform better if it has more contextual information. Some examples of contextual information:
- What the task results will be used for
- What audience the output is meant for
- What workflow the task is a part of, and where this task belongs in that workflow
- The end goal of the task, or what a successful task completion looks like
- Be specific about what you want Claude to do: For example, if you want Claude to output only code and nothing else, say so.
- Provide instructions as sequential steps: Use numbered lists or bullet points to better ensure that Claude carries out the task the exact way you want it to.
Examples
Prompt library
Get inspired by a curated selection of prompts for various tasks and use cases.
GitHub prompting tutorial
An example-filled tutorial that covers the prompt engineering concepts found in our docs.
Google Sheets prompting tutorial
A lighter weight version of our prompt engineering tutorial via an interactive spreadsheet.
Was this page helpful?