A Prompt Is the Whole of Instructions and Material
A prompt is the whole text of instructions and questions you give an LLM. A one-line question typed into a chat box, pasted documents, and requests about the form of the answer are all, together, the prompt. The model reads this text and writes its answer as a continuation of it.
An LLM reads a prompt split into tokens (small units of text). The more documents you paste, the more tokens there are, and through an API the cost and waiting time also grow. Anything beyond the length the model can read at once cannot be passed in. In apps, there is often a hidden instruction written by the developer placed before the text the user types.
The Components of a Prompt
Google's guide lists components like the following as the parts of a prompt.
- Instructions (what you want done, written as a question or as steps)
- Material (the text or documents the answer should be based on)
- Constraints (what you want and do not want, such as length or tone)
- Answer format (a fixed form such as a bulleted list, a table, or JSON)
You do not need every component. But the model fills in missing components by guessing. Where the guess is wrong is where the answer drifts from what you expected.
Three Points of a Good Instruction
A good instruction meets the following three points.
- The goal is clear (write who the answer is for and what it is for)
- The material is provided (the model does not know things after its knowledge cutoff or the circumstances on your side)
- The answer format is set (stating the length and form cuts the work of fixing it)
Anthropic recommends deciding, before you revise a prompt, what counts as a good answer and how you will test for it. The reliable way is to try the same question several times and add one instruction at a time where the answers drift.