Intro to prompting

콘텐츠

Claude is trained to be a helpful, honest, and harmless assistant. It is used to speaking in dialogue, and you can instruct it in regular natural language requests as if you were making requests of a human.

The quality of the instructions you give Claude can have a large effect on the quality of its outputs, especially for complex tasks.

A prompt is the text that you give Claude to elicit, or "prompt," a relevant output. A prompt is usually in the form of a question or instructions. For example:

| Role | Prompt | | ---- | -------------------- | | User | Why is the sky blue? |

The text that Claude responds with is called a "response", sometimes also called an "output" or "completion."

| Role | Response | | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Assistant | The sky appears blue to us due to how the molecules in the air scatter light from the sun. The shorter wavelength light (blue) scatters more easily than the longer wavelength light (like reds and yellows), so when we look up at the sky, what we see is all the scattered blue light. This is known as Rayleigh scattering. The color of the sky varies based on conditions like the angle of the sun and amount of dust/water in the air, but during the day with a clear sky, the blue wavelength of light is most responsible for the color we perceive. |

Claude is a conversational assistant, based on a large language model (LLM). The model uses all the text that you have sent it (your prompt) and all the text it has generated so far to predict the next token that would be most helpful.

This means that Claude constructs its responses one set of characters at a time, in order. It cannot go back and edit its response after it has written it unless you give it a chance to do so in a subsequent prompt.

Claude can also only see (and make predictions on) what is in its context window. It can't remember previous conversations unless you put them in the prompt, and it can't open links.

If you're ready to chat with Claude, visit claude.ai to chat with Claude on the web or check out our quickstart guide to get quickly up and running using the API.

The maximum prompt length that Claude can see is its context window. See our model comparison table for a list of context window sizes per model.


For more advanced techniques and tips on creating effective prompts, check out our prompt engineering guide. Here, you'll find a wealth of information on how to enhance Claude's performance through careful prompt design, including best practices, common pitfalls to avoid, and real-world examples. We encourage you to experiment with different prompts and techniques to see how they impact Claude's responses and performance.

For code examples with accompanying prompts for various use cases and capabilities, check out the Anthropic cookbook.


Our prompt library features an extensive collection of prompts for various use cases, covering both work and play. It's a great resource to explore when you're looking for ideas or want to understand how to use Claude to solve specific problems. From creative writing to data analysis to character role-play, the prompt library has something for everyone.

Note: The prompt library currently features only prompts without images. Prompts involving images are coming soon.


We also provide an experimental helper metaprompt that prompts Claude to create a prompt for you, based on guidelines you provide. The metaprompt is experimental, but may be helpful for drafting an initial prompt or quickly creating many prompt variations.

Happy prompting, and don't forget to share your creations in our Discord community!

Updated 3 days ago


요약하다
Claude is a conversational assistant trained to provide helpful and honest responses. Users can interact with Claude using natural language requests, with the quality of instructions impacting its outputs. A prompt is the text given to Claude to generate a response, typically in the form of a question or instructions. Claude constructs responses based on a large language model, predicting the next token to generate text. It operates within a context window, unable to remember previous conversations or access external links. To enhance Claude's performance, users can utilize prompt engineering techniques and explore the prompt library for various use cases. Additionally, an experimental helper metaprompt is available to assist in creating prompts. The article also provides resources for code examples, a Discord community for sharing creations, and a prompt library with a wide range of prompts for different purposes.