← Glossary / 50 of 100

n. / Prompts and context

Prompt

Definition

A prompt is the full input given to a language model for one call: instructions, examples, retrieved context, conversation history and the user's request. The model's reply depends entirely on it.

In more detail

What the user typed is only a small part of the prompt. Most of it is assembled by your code, which is why bugs often hide in prompt building rather than in the model. Seeing the final prompt exactly as the model received it is the first thing to check in any bad answer.

Example

A user asks "Where is my order?". The prompt sent to the model also includes the system instructions, the last four messages and the order record your code fetched.

Definitions are the start.

Open a real trace and watch these terms move.