Skip to main content
In this lesson we define what a prompt is and show how to write prompts that produce reliable, high-quality outputs from foundation models (LLMs). A prompt is the primary input you give a model; the way you compose it directly influences the model’s next-token predictions and therefore the final response. You’ll learn:
  • Why some prompts produce weak or inconsistent results
  • How to structure prompts to get better outputs
  • How to apply structured prompts with concrete examples
  • The improvements you can expect after applying these practices
  • Key takeaways and next steps in prompt engineering
A slide titled "Lecture Flow" showing a turquoise flowchart from "Real-world Problem" → "Solution" → "Demonstration" then down to "Results" and across to "Key Takeaway" → "What's Next." Notes mention prompts producing weak, inconsistent results and recommend using structured instructions and treating prompts as instructions, not questions.

The issue: wording and ambiguity determine output quality

When you send prompts to a model, the exact phrasing strongly correlates with output quality. Vague or poorly worded prompts usually yield weak, inconsistent, or generic responses. LLMs do not “read your mind”; they rely on the explicit information in the prompt to shape probability distributions over next tokens. Common consequences of weak prompts:
  • The model guesses missing constraints and produces inconsistent results.
  • Teams switch models or slow development cycles unnecessarily.
  • Iteration and debugging time increases because outputs are unpredictable.
A presentation slide titled "Problem: Prompts are producing Weak Inconsistent Results" showing four numbered panels. Each panel lists an issue: poorly written prompts, vague questions, developers misunderstanding model interpretation, and inconsistent outputs slowing development.

The solution: structure your prompts as instructions

Treat prompts as precise instructions, not open-ended questions. A well-structured prompt includes:
  • Role: who the model should be (e.g., “You are a cloud solutions architect”)
  • Context: relevant background and constraints (e.g., company size, compliance needs)
  • Task: the exact deliverable (e.g., “Write a 150-word executive summary”)
  • Output constraints: tone, format, length, and forbidden content
  • Audience: who will consume the output (e.g., technical reviewers, executives)
A slide titled "Solution: Use Structured Instructions." It shows four numbered blue panels that list prompt-writing steps: treat prompts as clear instructions, define the task, provide context/constraints, and structure prompts to guide the model.
Use short, explicit instructions rather than vague questions. Examples of directive prompts:
  • “Translate the following text to French.”
  • “Write Python code to parse this JSON file.” (Include the schema or sample JSON.)
  • “Extract email addresses from the following text.”
Treat the prompt like a short specification: role, context, task, constraints, and format. This reduces ambiguity and guides the model to the desired next-token predictions.
Avoid contradictory or impossible constraints (for example, “Explain X in one sentence” plus “include extensive technical details”). Conflicting instructions confuse the model and produce unreliable output.

Context matters: specify audience and purpose

The intended audience and purpose directly affect tone, level of detail, and structure. For example, a summary for a non-technical executive should focus on business impact, while a summary for engineers should include implementation risks and technical tradeoffs. Always state audience and purpose to reduce guessing.
A slide titled "Workflow: Use-Case Alignment" showing four colored panels labeled Input, Task, Inclusions, and Clarity, each with an icon and short explanatory text about prompts, tasks, and output quality.

Concrete example: a clear, executable prompt

A strong prompt sets role and context, then gives a precise task and constraints.
  • Role: “You are a cloud solutions architect.”
  • Context: “A mid-sized financial services firm is migrating from on-premises to cloud. They are concerned about compliance, cost control, and operational visibility.”
  • Task: “Write a 150-word executive summary explaining why adopting managed services will reduce operational risk.”
  • Format constraints: “Business tone, no bullet points.”
Compared to a bare instruction like “Summarize cloud migration benefits,” this structured prompt yields a focused and reusable output.
A presentation slide titled "Workflow: Use-Case Alignment." It features a dark-blue content card with a prompt asking a cloud solutions architect to write a 150-word executive summary about adopting managed services for a mid-sized financial firm migrating to AWS, highlighting concerns like compliance, cost control, and operational visibility.

Why this works — technical background

LLMs produce text by predicting the next token given the input sequence. They compute a probability distribution over possible next tokens and sample according to those probabilities. The more precise and constrained the prompt, the narrower the distribution and the more consistent the output. In short: structure reduces uncertainty in next-token predictions.
A presentation slide titled "Workflow: Why Prompt Matters" showing three numbered panels: (01) "Models predict next tokens based on input," (02) "They do not 'know what you mean'," and (03) "Ambiguous prompts produce inconsistent results." The panels are color-coded blue, orange, and pink with simple icons above each number.

Common bad prompts and why they fail

Below are typical weak prompts and the underlying issues that make them fail. Ambiguity and conflicting constraints produce incomplete, contradictory, or overly generic outputs.

How to write a strong prompt (quick checklist)

Use the checklist below when drafting prompts. Each element is concise so the model can follow it predictably.

Results you can expect after applying structure

Applying the practices above typically yields:
  • More reliable, consistent model outputs
  • Faster iteration when building AI features
  • Reduced time spent on prompt experimentation
  • Fewer refinement cycles to reach usable results
An infographic slide titled "Results" with three numbered panels. The panels list: 01 More reliable model outputs, 02 Faster development of AI-powered features, and 03 Reduced prompt experimentation time.

Key takeaway

A prompt is an instruction that guides the model’s next-token prediction. Clear, structured prompts that include role, context, audience, task, and constraints produce better outputs than vague questions. Apply the checklist and use precise, directive language when possible.
A presentation slide titled "Key Takeaway" with a blue "01" badge. The text explains that a prompt guides next-token prediction and that clear, structured prompts produce better results.
Give your prompt a role (for example, “You are a cloud systems architect”), describe the organization and the goal, define the audience, specify output constraints, and state the exact task. That wraps up this lesson on what a prompt is. Subsequent lessons will dig deeper into prompt engineering techniques, prompt chaining, and prompt evaluation.

Watch Video