Contact

What is Prompt?

Definition

A prompt is the input text given to a language model to produce a response: a question, a task description, examples or a document to work on. In chat applications, the message the user types is called the user prompt. The model, however, reads more than that: it responds to the whole context, including system instructions, conversation history and any attached or retrieved sources. How clearly a prompt is written directly shapes the quality of the answer.

Also known as: user prompt, LLM prompt, AI prompt, user message

Diagram of a prompt made of role, task, context, format and example sent to a model to get the desired output

What you type versus what the model reads

The sentence you type into a chat box is only one part of what the model actually sees. The application combines it with the system prompt the developer wrote in advance, earlier messages, attached files, passages pulled in from search results and tool definitions. The model reads all of it as one input, a sequence of tokens, and the total has to fit within its context window.

APIs keep these parts apart using roles: developer instructions (system or developer), user messages (user) and the model's earlier replies (assistant). “User prompt” refers to the user message in that structure.

Anatomy of a good prompt

Effective prompts are built from a complete brief, not from magic phrases:

  • Task: what to do, in one clear sentence.
  • Context: who it is for, why, and with which information.
  • Constraints: length, language, things to avoid, whether to rely only on the supplied sources.
  • Output format: a list, a table or JSON, and with which headings.
  • Examples: one or two samples of the expected output often beat long explanations.
Before:
  Write a product description.

After:
  Using the specifications below, write a product description
  for our online store. Audience: home users.
  Length: 80–120 words. Do not add claims that are not in the specs.
  End with a three-item "Highlights" list.

  Specs:
  - 1.5 litre capacity, 2200 W
  - Automatic shut-off, limescale filter

The second version spells out everything the model would otherwise have to guess. A constraint such as “do not add claims that are not in the specs” also curbs the model's tendency to fill gaps with invention.

Why the same prompt gets different answers

A language model picks from many possible next tokens at every step. Sampling settings such as temperature add controlled randomness to that choice, so running the same prompt twice can produce different wording and even different emphasis. A new model version, the conversation history and sources retrieved at answer time also change the outcome. Judge a prompt over repeated runs, never on a single attempt.

In AI search products, the user prompt plays the role a keyword plays in classic search, but it is usually longer, more conversational and full of context: not “bodrum hotel” but “can you suggest a quiet beachfront hotel in Bodrum for a family with young kids?” The system often turns that one prompt into several searches, an approach Google describes as query fan-out.

That is also why monitoring a brand's presence in AI answers relies on a set of prompts that mirror real customer questions rather than a keyword list. The set should cover different stages of the buying decision and be rerun at regular intervals under the same conditions.

Misconceptions worth dropping

“Longer prompts work better.” Relevance matters, not length; off-topic detail distracts the model. “A prompt is a security setting.” Rules given in a prompt can be overridden by text coming from outside, a risk covered under prompt injection. “A good prompt works the same on every model.” Models respond to instructions with different sensitivity, so prompts need retesting whenever the model changes.

Related terms

← Back to the glossary