What is a prompt
A prompt is a natural language input that instructs a generative AI on the task at hand. These AI models can create a variety of content like stories, conversations, videos, and more. The quality of the output depends on the prompt’s clarity and context, as AI models need accurate details to produce meaningful and precise responses.Prompt content types
A prompt can include one or more of the following elements:Input
The input is the core part of a prompt. It tells the model what task to perform or what question to answer. Inputs come in different forms:Question input
A question input asks the model for an answer, usually in the form of a direct question. Prompt Example:Task Input
A task input asks the model to perform a specific action—like generating ideas, making a list, writing a summary, or offering suggestions. Prompt Example:Entity Input
An entity input is when the prompt gives the model a specific piece of content to act on—like summarizing a paragraph, classifying a sentence, or translating a passage. It’s often paired with clear instructions on what to do with that content. Prompt Example:Completion Input
Prompt Example:Context
The context section gives the model helpful background or specific instructions that shape how it responds. You can use context to:- Direct the model’s behavior.
- Supply relevant information it should refer to.
- Limit the model’s answers to specific data or rules.
Examples
Examples are pairs of inputs and expected outputs you include in your prompt to show the model what kind of response you’re looking for. This technique is especially useful when you want the output to follow a certain format or logic. Prompt Example:References
- Some sections in this guide are paraphrased or inspired by Google’s Gemini API documentation on prompting.