Skip to content
p.mba

Type to search tools, guides, glossary terms, frameworks, formula sheets and pages.

Menu

Glossary · Data Science & AI

Prompt

Also called: prompt engineering · system prompt · instructions

The instructions, context and examples given to a generative AI model to steer what it produces.

Definition

A prompt is the input text, and sometimes images or files, that a generative model responds to. Output quality depends heavily on the prompt: stating the task, audience, format and constraints, supplying relevant source material and showing an example of a good answer usually produce far better results than a one-line request. Prompt engineering is the practice of designing and testing prompts systematically, including asking the model to work step by step or to say when it lacks information. Prompts cannot make up for missing facts, so outputs that matter still need checking.

Worked example

Hypothetical scenario: instead of 'summarize this case', a student writes 'You are preparing me for a cold call. Using only the attached case, list the CEO's three options, one data point for and against each, and the question a professor is most likely to ask.' The result is specific, sourced to the case and easy to check.
  • Large Language Model: A neural network trained on very large amounts of text to predict the next token, which lets it generate, summarize, translate and reason over language.
  • Context Window: The maximum amount of text, measured in tokens, that a language model can consider at once, covering the prompt, any documents supplied and its own reply.
  • Hallucination: When an AI model produces a fluent, confident answer that is false or unsupported, such as an invented fact, number or citation.
  • Retrieval-Augmented Generation: A technique that retrieves relevant documents from a trusted source and adds them to a language model's prompt so its answer is grounded in that material.
  • Generative AI: AI systems that produce new content, such as text, images, code or audio, by learning patterns from large amounts of existing data.

Courses

More in Data Science & AI

All glossary terms