Prompt Basics

Fundamentals of writing effective prompts for AI models.

What is a Prompt?

A prompt is the input you give to an LLM. The quality of your prompt directly determines the quality of the response. Prompting is both an art and a science.

Core Principles

Fundamental guidelines for effective prompts.

Be Specific

Vague prompts get vague answers. Include relevant details and constraints.

Show Examples

Demonstrate the format and style you want with concrete examples.

Provide Context

Background information helps the model understand your needs.

Specify Format

Tell the model exactly how you want the output structured.

Anatomy of a Prompt

The components that make up an effective prompt.

Role/Persona

Who the model should act as.

Task Description

What you want the model to do.

Context/Background

Relevant information for the task.

Output Format

How you want the response structured.

💬

Prompt Comparison

Compare weak vs. strong prompts

Select Example

Compare weak vs. strong prompts

Weak Prompt
Summarize this article
The article talks about various things related to the topic. It mentions some important points and has several sections covering different aspects. The author makes some arguments.
  • ✗No context provided
  • ✗Unclear what format is expected
  • ✗No length guidance

Click to see the improved version

Key Takeaways

  • 1Clear, specific prompts yield better results
  • 2Examples are powerful—show, don't just tell
  • 3Iterate on prompts; first attempts are rarely optimal
  • 4Consider the model's perspective when crafting prompts