No history yet

Defining Prompt Engineering

Talking to an AI

When you ask a chatbot for a recipe or tell an image generator to create a picture of a cat in space, you're using a prompt. A prompt is simply the instruction you give to an AI. The AI models that understand and respond to these prompts are often (LLMs). They are trained on vast amounts of text from the internet, books, and other sources, learning the patterns of human language.

Lesson image

Think of an LLM as a brilliant, super-fast intern. It has read almost everything ever written and can draft a report in seconds. But this intern is also extremely literal. It has no common sense, can't read your mind, and won't guess what you secretly want. It will do exactly what you ask, for better or worse. This is where engineering comes in.

From Chat to Craft

Using a simple chat query like "tell me about ancient Rome" will give you a generic, Wikipedia-style summary. That's fine for casual curiosity. But what if you need a detailed outline for a presentation aimed at middle schoolers, focusing only on daily life and avoiding military campaigns? That requires a more structured instruction.

Prompt engineering is the skill of carefully crafting your instructions to guide the AI toward a specific, high-quality result. It's the difference between a vague request and a detailed brief.

Instead of just asking a question, you're designing a task for the AI to perform.

A well-engineered prompt gives the AI context, constraints, and a clear goal. This structure is crucial. It tells the AI not just what to do, but how to do it. For example, you can assign it a persona ("Act as a professional copywriter"), specify the format ("Provide the answer as a bulleted list"), and set the tone ("Use a friendly and encouraging voice").

This level of detail dramatically improves the quality and relevance of the output. It also helps prevent one of the biggest problems with LLMs: hallucinations—when the AI confidently makes up facts. By providing clear boundaries, you reduce the chances of the model inventing information to fill in the gaps.

Mastering prompt engineering means you can get more reliable, nuanced, and useful results from AI tools. Whether you're using it to help with your job, learn a new topic, or be creative, knowing how to craft a good prompt is becoming an essential skill.

Now that you know what prompt engineering is, let's test your understanding.

Quiz Questions 1/5

What is a "prompt" in the context of AI?

Quiz Questions 2/5

The text compares a Large Language Model (LLM) to a "brilliant, super-fast intern" that is also "extremely literal." What does this analogy primarily emphasize about LLMs?