Foundation Concepts / Core Definitions

Prompt

Essential [1/5]
Natural language instruction User query

Definition

A prompt is a natural language instruction or question given to an AI model. It serves as the primary interface between humans and large language models (LLMs), telling the model what task to perform or what information to provide.

Prompts can range from simple questions ("What is the capital of France?") to complex, multi-part instructions with specific formatting requirements, context, and constraints.

Key Concepts

  • Input text: The actual words and sentences you send to the model
  • Intent: What you want the model to accomplish
  • Context: Background information that helps the model understand your request
  • Constraints: Any limitations or requirements for the output

Examples

Simple Prompt
Direct Question
What are the three laws of thermodynamics?
A straightforward question expecting a factual answer.
Structured Prompt
Task with Format Requirements
List 5 healthy breakfast ideas. Format each as: "Name - Key ingredients - Prep time"
A prompt that specifies both the task and the desired output format.
Complex Prompt
Multi-part Instruction with Context
You are a senior software engineer reviewing code. Review the following Python function for: 1. Potential bugs 2. Performance issues 3. Code style improvements Keep your feedback concise and actionable. def find_duplicates(lst): duplicates = [] for i in lst: if lst.count(i) > 1: if i not in duplicates: duplicates.append(i) return duplicates
A detailed prompt that establishes a role, provides context, and sets clear expectations.

Interactive Exercise

Practice Writing Prompts

Transform this vague request into a clear, effective prompt:

Vague request: "Help me with my email"

Write a prompt that specifies: what kind of email, the purpose, tone, and any constraints.

Pro Tips
  • Be specific about what you want - vague prompts lead to vague answers
  • Include relevant context the model needs to know
  • Specify the format you want the response in
  • If the task is complex, break it into steps

Related Terms