# Prompt

> A prompt is the input given to an AI model to tell it what to do, typically instructions, context, examples and the user's request, from which the model generates its response.

Also called: prompts, model input, instruction, AI prompt. Category: Models and training. Source: https://aibuildindex.com/glossary/prompt

## In the index

- Prompt engineering: median $3,600, middle half $600 to $11,200, 1,367 priced briefs (https://aibuildindex.com/skills/prompt-engineering)

A prompt is everything the model is given to work from in a single request. In a consumer chat tool it can be one sentence typed by a person. In a business build it is usually assembled by software: fixed instructions, the relevant data, sometimes examples, and the user's message, stitched together on every call. Because the model has no other way to know what is wanted, the prompt is where most of an AI feature's behaviour is defined.

## How it works

Most production prompts have a recognisable structure:

- **Role and rules.** Who the model is acting as, what it must and must not do, and the tone to use. In chat-style APIs this often sits in a separate [system prompt](https://aibuildindex.com/glossary/system-prompt).
- **Context.** Data the model needs for this request, such as a customer record, retrieved help articles or a document to summarise.
- **Examples.** A few worked input and output pairs showing the expected format, known as [few-shot prompting](https://aibuildindex.com/glossary/few-shot-prompting).
- **The task.** The specific request, for instance the customer's question or the email to classify.
- **Output instructions.** The format the answer should take, such as a short reply or a set of named fields.

For an email triage build, the software might send the model a list of categories with definitions, two labelled examples, the incoming email, and an instruction to return only a category name and a one-line reason.

Prompts are fed to the model as [tokens](https://aibuildindex.com/glossary/token) and must fit within its [context window](https://aibuildindex.com/glossary/context-window). Anything included from outside the business, such as a customer's message or a web page, can contain text that tries to override the instructions, a risk known as [prompt injection](https://aibuildindex.com/glossary/prompt-injection).

## What it means for cost

Prompts affect cost in both build time and running time. Writing a prompt that works on a few test cases is quick; getting one that behaves correctly across hundreds of real inputs takes iteration, test sets and review, and that is a legitimate line in a quote under [prompt engineering](https://aibuildindex.com/glossary/prompt-engineering).

Prompt length also drives running costs, because the whole prompt is sent and billed on every request. Ask a builder where prompts are stored, how changes are tested before release, and whether long fixed sections can be shortened or cached.

## Common questions

### Who writes the prompts in a business AI build?

Usually the builder, working from the buyer's rules, examples and edge cases. The buyer's domain knowledge matters as much as the technical skill, because the prompt has to encode how the business actually wants decisions made.

### Can I change the prompts myself after handover?

Often yes, if the build keeps prompts in a configuration file or admin screen rather than buried in code. Changes should still be tested against a set of known examples before release, since a small wording change can shift behaviour.

### Is a longer prompt more accurate?

Not reliably. Clear, specific instructions and good examples help; long, repetitive or contradictory instructions can confuse the model and cost more on every call.

## Related terms

- [Prompt engineering](https://aibuildindex.com/glossary/prompt-engineering): Prompt engineering is the practice of designing, testing and refining the instructions, context and examples given to an AI model so that it produces accurate, consistent and correctly formatted output for a specific task.
- [System prompt](https://aibuildindex.com/glossary/system-prompt): A system prompt is the standing set of instructions sent to a chat-style AI model before any user message, defining its role, rules, tone and limits for every conversation in an application.
- [Few-shot prompting](https://aibuildindex.com/glossary/few-shot-prompting): Few-shot prompting is a technique in which a prompt includes a small number of worked examples of the task, showing inputs and the desired outputs, so the model can follow the pattern without any retraining.
- [Context window](https://aibuildindex.com/glossary/context-window): A context window is the maximum amount of text, measured in tokens, that a language model can take in and produce in a single request, including instructions, documents, conversation history and its own reply.
- [Prompt injection](https://aibuildindex.com/glossary/prompt-injection): Prompt injection is a security attack in which hostile instructions are hidden in content an AI system processes, such as an email, web page or document, causing the model to follow the attacker's instructions instead of its own.
