
Welcome to Advanced Prompt Engineering and Multimodal AI. This opening lecture introduces the course, explains why prompting has grown from writing clever sentences into engineering reliable AI workflows, and shows how each section builds toward a complete multimodal analysis system.
We begin with the shift. Early prompting meant typing a question and hoping for a good answer. Modern AI applications need dependable behavior across text, images, documents, audio and video, along with structured outputs, measurable quality, security awareness and production readiness. Instead of collecting tricks, you will learn repeatable methods that you can test and improve.
You will see the learning path. We start with how models interpret prompts, then cover context engineering, reusable prompt patterns, structured JSON outputs, prompt chaining, grounding with external knowledge and evaluation. Next we move into multimodal work with images, documents, audio and video, then combine them, add agents and tool use, address security and privacy, optimize for production and finish with a capstone project.
The course is practical. Hands-on exercises use popular assistants and, where helpful, simple Python and open-source models, and the techniques transfer across platforms.
By the end of this lecture you will know what the course covers, who it is designed for, how the labs are organized and how to get the most from the lectures, exercises and final project.
From Basic Prompts to Advanced AI Workflows. This lecture explains how prompting evolves from a single instruction into a designed workflow, and why that evolution matters for anyone building real applications with generative AI.
A basic prompt is a request typed into a chat window. It can be useful, but its results vary, depend on the wording of the moment and are difficult to reuse. An advanced prompt adds clear roles, explicit constraints, relevant context, examples and a defined output format. An AI workflow goes further, connecting several prompts, validation steps, tools and human checkpoints so that a complex task is completed consistently.
We discuss the typical problems that push people from basic to advanced approaches: inconsistent answers, missing details, invented facts, outputs that cannot be parsed by software and tasks too large for one request. Each problem points toward a technique you will study later, such as structured outputs, grounding, chaining or evaluation.
You will also learn a simple maturity ladder, from ad hoc prompts to templates, to chains, to evaluated and versioned systems, and how to decide which level a given task actually needs.
By the end of this lecture you will be able to describe the differences between basic prompts and advanced workflows, recognize when a task needs more structure and explain the benefits of treating prompts as engineered components.
Understanding Text, Image, Document, Audio, and Video Inputs. Multimodal AI can work with many kinds of input, and each kind has its own strengths, limits and preparation needs. This lecture introduces the five input types you will use throughout the course.
Text is the most mature modality and works well for instructions, reasoning and generation. Images add visual information such as photographs, screenshots, charts and diagrams, but details can be missed or misread. Documents, such as PDFs and presentations, combine text, layout, tables and embedded figures, and scanned versions require recognition before the content can be used. Audio carries speech, tone and background sound, usually transcribed first or processed by models that understand audio directly. Video combines frames, motion, time and often audio, which makes it rich but expensive to process.
For each type we discuss what the model actually receives, common quality problems and typical tasks, such as describing a scene, extracting a table, summarizing a meeting or identifying events over time.
We also introduce the idea that different inputs often need to be combined, and that evidence from one modality can confirm or contradict another.
By the end of this lecture you will be able to describe each input type, understand its main limitations and begin thinking about which modality suits a given task.
Prompt Engineering vs. Context Engineering vs. Workflow Engineering. These three terms are often used interchangeably, but they describe different layers of work. This lecture separates them so you can choose the right tool for each problem.
Prompt engineering focuses on the instruction itself: its wording, role, constraints, examples and desired output. Context engineering focuses on everything else the model sees, including reference documents, retrieved facts, conversation history, memory and task state, and on deciding what to include, exclude, summarize or order. Workflow engineering focuses on how multiple steps, models and tools are connected, including routing, validation, retries, human review and logging.
We use a running example, such as answering questions about a long report. A poor answer might come from a vague instruction, from missing or buried evidence in the context, or from a single prompt trying to do too much. Recognizing which layer is responsible lets you fix the right thing instead of rewording the prompt endlessly.
You will learn how the layers support each other and how the course sections map to them.
Keep a short glossary of these terms for your project, since a shared vocabulary makes it much easier to discuss failures with teammates and decide where to focus your improvements.
By the end of this lecture you will be able to define each discipline, diagnose which layer a failure belongs to and plan improvements systematically.
Real-World Applications of Advanced and Multimodal Prompting. This lecture shows where the skills in this course are used, so that you can connect each technique to practical value.
We explore applications across industries. Customer support teams use grounded assistants that answer from approved documents with citations. Finance and operations teams extract structured data from invoices, reports and contracts. Product and design teams analyze screenshots, dashboards and user interface mockups. Sales and management teams turn meeting recordings into summaries, decisions and action items. Media and research teams analyze video for events and timelines. Developers build agents that call tools and update systems under human approval.
For each scenario we identify the inputs, the required outputs, the likely risks and the techniques involved, such as context engineering, JSON schema outputs, prompt chaining, evaluation and guardrails. We also discuss where AI is a poor fit, such as tasks that need guaranteed accuracy without review.
You will learn to describe a use case in terms of value, feasibility, risk and measurement, which helps you prioritize ideas and communicate with stakeholders.
By the end of this lecture you will be able to recognize high-value multimodal use cases, outline the workflow each would need and explain the benefits and limitations to non-technical colleagues.
Setting Up Your AI Tools and Learning Environment. Before starting the exercises, you need a reliable setup. This lecture walks through the tools and environment used in the course and how to prepare them.
You will need access to at least one capable AI assistant, such as ChatGPT, Claude or Google Gemini, ideally one that supports image and document inputs. Some exercises benefit from audio or video support, and the lecture explains alternatives when a feature is unavailable on your plan. For technical exercises we use Python, a code editor and optional local models through Ollama, so that you can practice without relying only on hosted services.
We cover practical steps: creating accounts, checking available models and their input limits, organizing a project folder for prompts, test cases and outputs, and setting up a simple Python environment with the libraries used for JSON validation. We also discuss good habits such as saving every prompt version, recording model names and settings, and using sample or synthetic data instead of confidential material.
Privacy matters, so you will learn what not to upload to online services.
By the end of this lecture you will have a working environment, a project structure for the labs and a clear understanding of which tools you will use in each section.
Hands-on: Benchmark a basic prompt against an advanced, context-rich prompt. In this first exercise you measure the benefit of advanced prompting instead of assuming it. You will take one task and compare a simple prompt with a carefully engineered one.
The steps I would expect you to follow are these. First, choose a realistic task, such as summarizing a short business report into key risks and recommended actions. Second, write a basic one-line prompt and run it several times, saving the outputs. Third, write an advanced prompt that includes a clear role, the goal, relevant context, constraints, an example and a required output format. Fourth, run it the same number of times with the same model and settings. Fifth, define a small scoring checklist, covering accuracy, completeness, format compliance and consistency, and score each output. Sixth, compare the results and note which elements of the advanced prompt contributed most.
The exercise introduces evaluation habits you will use throughout the course. Use sample or synthetic content so that nothing confidential is shared.
Keep the prompts, outputs and scoring sheet together in your project folder, because you will reuse the same benchmarking habit in later labs when you compare templates, models and workflows.
By the end of this lab you will have a side-by-side benchmark, a scoring sheet and a clearer sense of how structure and context improve reliability.
Hands-On Lab Package – Advanced Prompt Engineering & Multimodal AI. This lecture introduces the downloadable lab package that accompanies the course and explains how to use it effectively.
The package collects the materials needed for the hands-on exercises: sample documents, images, audio and video resources where provided, starter prompt templates, example JSON schemas, evaluation datasets and checklists. It is organized by section so that you can find the files for each lab quickly, and a short guide describes the purpose of every item.
We walk through the structure and explain a recommended workflow. Copy the package into your own project folder, keep the originals untouched, create a working directory for your outputs and record your prompt versions and results as you go. Where a lab uses code, the lecture explains how to run it and what to do if your environment differs.
We also discuss how to adapt the exercises to your own work. After completing a lab with the provided materials, try the same workflow on your own non-confidential samples to see how techniques transfer.
Finally, we cover good practices for handling sample content and respecting any usage terms on included files.
By the end of this lecture you will know what the lab package contains, how it is organized and how to use it to practice each technique.
How Large Language Models Process Instructions and Context. To write better prompts, it helps to understand, at a practical level, what the model does with them. This lecture explains how large language models process instructions and context without requiring a mathematical background.
A language model reads the full input, including system instructions, conversation history, documents, examples and your request, as a sequence of tokens. It then generates output one token at a time, each choice based on patterns learned during training and on the content of the current context. It does not look things up or reason like a person, although it can imitate reasoning effectively.
This explains common behaviors. Models follow clear, specific instructions better than vague ones, are influenced by what appears in the context, can overlook details buried in long inputs and may produce plausible but incorrect statements when evidence is missing. Position, wording and formatting all matter.
We discuss how instruction tuning shapes models to follow directions, how recent context can outweigh earlier text and why showing examples can steer style and structure.
The goal is a useful mental model for designing prompts and diagnosing failures.
By the end of this lecture you will be able to explain how models treat instructions and context and apply that understanding to write clearer, more dependable prompts.
Understanding Tokens, Context Windows, and Context Limits. Models measure input and output in tokens, and every request has limits. This lecture explains tokens, context windows and the practical consequences of exceeding them.
A token is a small piece of text, often part of a word, a whole short word or a symbol. Different languages, code and numbers tokenize differently, so word counts only approximate token counts. Images, audio and video are also converted into token-like units, which can consume a large share of the budget.
The context window is the maximum number of tokens the model can handle in one request, including your instructions, supplied documents, conversation history and the response it generates. When the limit is reached, content must be dropped or summarized, and some tools truncate silently, which can cause surprising failures.
We also discuss that a large window does not guarantee perfect use of everything inside it. Information in the middle of very long inputs can be overlooked, and cost and latency rise with size.
You will learn practical habits: estimating token usage, reserving space for the answer, prioritizing the most important content and testing with realistic input sizes.
By the end of this lecture you will be able to explain tokens and context limits, estimate budgets and plan prompts that fit comfortably.
Instruction Hierarchies, Roles, and Trust Boundaries. Prompts often combine several sources of text, and not all of them deserve equal authority. This lecture explains instruction hierarchies, message roles and trust boundaries.
Most platforms distinguish system or developer instructions, user messages, assistant replies and tool or document content. Higher-priority instructions are meant to set rules that lower-priority content should not override. Understanding this hierarchy helps you place stable rules, such as format requirements and safety constraints, in the right location.
Trust boundaries describe where content comes from and how much you should rely on it. Your own instructions are trusted. User input is partly trusted. Retrieved documents, web pages, emails and uploaded files are untrusted data, even when they contain text that sounds like a command. A well-designed prompt tells the model to treat such content as material to analyze, not as instructions to follow.
We discuss practical techniques at a conceptual level: clear delimiters, explicit statements about which parts are data, separating instructions from inputs and avoiding mixing secrets into prompts.
These ideas prepare you for the later sections on grounding, agents and security.
By the end of this lecture you will be able to describe instruction priority, assign appropriate trust to each source and structure prompts that preserve those boundaries.
Why Different AI Models Respond Differently to the Same Prompt. A prompt that works well on one model may behave differently on another. This lecture explains why and how to build prompts that transfer more reliably.
Models differ in training data, size, instruction tuning, safety tuning, context length, supported modalities and default behavior. Some are verbose, some concise, some cautious, some more literal. Some handle structured output and tool calling better, and some are stronger on reasoning, code or images. Even versions of the same model family can change over time.
We discuss practical consequences. Formatting, tone, refusal behavior, level of detail and willingness to say that information is missing can vary. A prompt tuned to one assistant may rely on quirks that do not hold elsewhere.
To improve portability, write explicit instructions, define output formats precisely, include examples, avoid relying on hidden defaults and test on more than one model. Record the model name, version and settings with every result so comparisons are fair.
You will also learn how to choose a model by running the same evaluation set across candidates.
By the end of this lecture you will be able to anticipate model differences, design more portable prompts and compare models systematically rather than by impression.
Understanding Model Reasoning, Uncertainty, and Hallucinations. AI models can sound confident while being wrong. This lecture explains how reasoning, uncertainty and hallucinations appear in practice and what prompt design can do about them.
A hallucination is output that sounds plausible but is unsupported or false, such as an invented citation, a fabricated statistic or a detail not present in a supplied document. Models produce fluent text by predicting likely continuations, so when evidence is missing they may fill the gap rather than say so.
Reasoning behavior also varies. Asking a model to work step by step or to compare options can improve results on some tasks, but visible reasoning is not a guarantee of correctness and can itself contain errors. Some models have dedicated reasoning modes that spend extra effort before answering.
You will learn defensive techniques. Provide source material and require evidence for claims. Ask the model to state what it does not know and to mark uncertainty. Allow an explicit option to answer that information is insufficient. Use verification steps, a second review pass or external checks for important facts.
We also discuss recognizing high-risk topics where human review is essential.
By the end of this lecture you will be able to explain why hallucinations occur and apply prompt strategies that reduce and detect them.
Temperature, Sampling, and Reproducibility in AI Outputs. If you run the same prompt twice and get different answers, sampling settings are often the reason. This lecture explains temperature, related controls and how to improve reproducibility.
When generating each token, a model assigns probabilities to many possible options. Temperature adjusts how sharply the model favors the most likely choices. Lower values make output more focused and consistent, while higher values increase variety and creativity. Other controls, such as top-p and top-k, limit which options are considered, and some platforms offer a seed value for more repeatable results.
We discuss matching settings to tasks. Extraction, classification and structured output usually benefit from low temperature. Brainstorming and creative writing can use higher values. Even at low settings, exact reproducibility is not always guaranteed, because model updates, infrastructure differences and hidden processing can change results.
You will learn practical habits: record settings with each experiment, run multiple trials when comparing prompts, measure consistency instead of trusting a single run, and design downstream validation so that small variations do not break your workflow.
Some consumer assistants do not expose these settings, so we also cover how to encourage consistency through clear instructions and structured formats.
By the end of this lecture you will be able to choose sampling settings sensibly and evaluate consistency honestly.
Hands-on: Compare prompt behavior across multiple AI models. In this exercise you run the same prompts on several models and study how and why the behavior differs, building the habit of testing before trusting.
The steps I would expect you to follow are these. First, select two or three available models, such as a hosted assistant and a local open-source model. Second, prepare a small set of prompts covering different needs: a factual summary from supplied text, a structured extraction, a reasoning question and a request where the supplied text does not contain the answer. Third, run each prompt on each model with comparable settings and save the outputs along with model names and parameters. Fourth, create a comparison table that scores accuracy, format compliance, handling of missing information, verbosity and consistency across repeated runs. Fifth, write a short analysis describing differences, surprises and prompt changes that improved portability.
Use sample or synthetic content so that nothing confidential is uploaded to online services.
Repeat the comparison whenever a model is updated or replaced, since behavior can change between versions, and keep the table so that you can show evidence when recommending one model over another.
By the end of this lab you will have a model comparison table, notes on portable prompting and a repeatable method for choosing a model for a task.
What Is Context Engineering and Why Does It Matter? Many AI failures come not from the instruction but from what surrounds it. This lecture introduces context engineering, the discipline of deciding what information the model sees, in what form and in what order.
Context includes system instructions, the user request, reference documents, retrieved passages, examples, tool results, conversation history and task state. The model can only rely on what is in front of it, so missing facts lead to guessing, irrelevant material distracts and conflicting material causes inconsistent answers.
We discuss the goals of context engineering: relevance, sufficiency, clarity, trustworthiness and efficiency. Each piece of context should have a reason to be there. We compare weak and strong contexts for the same task, showing how reorganizing and selecting information often improves results more than rewording the instruction.
You will also see how context engineering relates to cost and speed, since every token adds expense and latency, and to security, since untrusted content in the context can influence behavior.
We outline the toolkit covered in this section: separation of components, selection, prioritization, compression, long-context handling and memory management.
By the end of this lecture you will be able to explain what context engineering is, why it matters and how to evaluate whether a context is helping or hurting.
Designing Context for Reliable AI Responses. Reliable answers depend on a context that is complete, organized and fit for the task. This lecture teaches a practical process for designing context.
We begin by defining the task and the decisions the answer must support. From there, list what the model must know: definitions, rules, source documents, prior decisions, user details and constraints. Then decide what it must not see, such as irrelevant history or sensitive data that is not needed. Each included item should earn its place.
Next is structure. Group related information under clear headings, place critical instructions where they are easy to notice, provide the expected output format and state how to handle gaps, for example by saying that information is missing rather than guessing. Where the same context is reused, standardize its layout so that behavior is predictable.
We also cover testing the context. Remove or change elements and observe the effect, check whether the answer cites the right material and try cases where evidence is absent or conflicting.
A good context design is documented so that teammates can maintain it.
By the end of this lecture you will be able to design a context package for a task, justify what it contains and test whether it produces dependable answers.
Separating Instructions, Reference Data, Examples, and User Inputs. Mixing everything into one block of text invites confusion. This lecture shows how to separate the main components of a prompt so that the model, and your team, can tell them apart.
The four components are instructions, which say what to do and how; reference data, which provides facts and source material; examples, which demonstrate the desired pattern; and user input, which varies from request to request. Each has a different purpose and a different level of trust.
You will learn techniques for separation. Use clear section labels and delimiters such as tags or fenced blocks. State explicitly which parts are data to analyze and which are instructions to follow. Place stable content first and variable content last, which also helps with caching later in the course. Keep examples clearly marked so the model does not treat them as real data.
Separation also reduces risk. If user input or a document contains text that looks like an instruction, a well-structured prompt makes it easier to treat that text as material rather than command.
We show before and after versions of a prompt and the improvement in consistency.
By the end of this lecture you will be able to structure prompts into distinct components and explain the benefits for accuracy, maintainability and safety.
Context Selection, Prioritization, and Relevance. More context is not always better. This lecture explains how to choose what to include, how to rank it and how to judge relevance.
We start with the cost of excess. Irrelevant passages dilute attention, increase tokens and cost, and can lead the model to use the wrong evidence. Missing context is equally harmful, so the aim is the smallest context that is sufficient.
You will learn selection methods. Start from the task and list the questions the model must answer. Use metadata, keyword search or semantic search to find candidate material. Score candidates for relevance, authority, recency and uniqueness, and remove duplicates or near duplicates. Prefer primary sources over summaries when accuracy matters.
Prioritization determines order and emphasis. Place the most important facts and instructions where they are easy to notice, since models can overlook details in the middle of long inputs. Label the importance of items or provide a short summary of what each source contains.
We also discuss testing relevance with small experiments, such as removing a passage to see whether the answer changes, and recording why items were included.
By the end of this lecture you will be able to select, rank and justify context so that prompts stay focused, efficient and effective.
Managing Long Context Windows and Large Information Sources. Modern models accept very large inputs, but using them well takes care. This lecture explains how to manage long context windows and large information sources.
We begin with the realities. Long inputs cost more, take longer to process and may suffer from reduced attention to details in the middle or to subtle contradictions. Simply pasting an entire archive is rarely the best plan.
You will learn strategies. Split large sources into logical sections with headings and identifiers. Provide a table of contents or index so the model can locate material. Use retrieval to pull relevant passages instead of loading everything. For multi-document tasks, process documents separately and merge the results in a later step. Ask the model to quote or cite the passage supporting each claim, which makes missed evidence easier to detect.
We also discuss testing with needle-in-a-haystack style checks, such as inserting a harmless fact at different positions and asking about it, to learn how your chosen model behaves with your input length.
Monitoring token usage and keeping room for the response is essential.
By the end of this lecture you will be able to decide when to use long context, when to retrieve or split, and how to verify that important details are not lost.
Context Compression, Summarization, and Information Preservation. When sources exceed the available space, compression becomes necessary, but careless summarizing can destroy the very details you need. This lecture explains how to compress context while preserving what matters.
We start with the tradeoff. Summaries save tokens but may drop numbers, conditions, names, dates and exceptions, and a summary of a summary can drift from the original. The key question is what information the downstream task requires.
You will learn techniques. Define a preservation checklist, such as entities, figures, decisions, constraints and open questions, and instruct the summarizer to keep them. Use structured summaries with fields instead of free-form paragraphs. Keep identifiers that link each summary item back to its source so that details can be retrieved when needed. Apply hierarchical summarization for very large sources and keep the originals available.
We also discuss verification. Compare compressed versions with the source on test questions, measure what is lost and adjust the process. For high-stakes work, keep critical passages verbatim.
Compression should be treated as a designed step with its own prompt, tests and versioning.
By the end of this lecture you will be able to compress context deliberately, preserve essential information and check the quality of the result.
Managing Conversation History, Memory, and Task State. Multi-turn assistants and workflows must remember what matters without carrying everything forever. This lecture explains how to manage conversation history, memory and task state.
We begin by distinguishing three ideas. Conversation history is the record of messages so far. Memory is selected information intentionally kept across turns or sessions, such as preferences or confirmed facts. Task state is the structured record of progress in a workflow, such as which steps are complete, which inputs were validated and what remains.
You will learn practical designs. Keep recent turns verbatim and summarize older ones. Store durable facts in a structured memory with clear update and deletion rules. Represent task state explicitly, for example as a small JSON object passed to each step, rather than hoping the model infers it from chat text. Be careful that memory does not store sensitive data unnecessarily or preserve outdated facts that later mislead the assistant.
We also cover conflicts, such as when a new instruction contradicts an earlier one, and how to handle resets.
Good state management improves reliability, lowers cost and supports auditing.
By the end of this lecture you will be able to design history, memory and state handling that keeps assistants coherent, efficient and safe.
Hands-on: Build a context-aware AI research assistant using multiple reference documents. In this exercise you will build a research assistant that answers questions using several supplied reference documents and manages context carefully.
The steps I would expect you to follow are these. First, collect three or four short sample documents on a topic, using public or synthetic material. Second, give each document an identifier, title and short description. Third, design a context template that separates instructions, reference data, the user question and the required output format. Fourth, write selection logic, manual or scripted, that chooses the most relevant passages for each question. Fifth, add rules for handling missing or conflicting information and for citing document identifiers. Sixth, test the assistant on questions that have clear answers, partial answers and no answer, and compare results with and without careful context selection.
Record what you included, what you excluded and why.
Keep the document identifiers, template and test questions together, so that you can rerun the same checks later when you add documents or change the selection logic.
Finish by writing a brief reflection on which design decisions changed the answers most, such as the choice of passages, the ordering of sections or the rule for missing information, so that you can apply those lessons to later labs.
By the end of this lab you will have a working context-aware research assistant, a reusable context template and evidence of how context design improves answers.
Designing Prompts as Reusable Instruction Templates. A prompt that works once is useful, but a prompt that works every time across many inputs is an asset. This lecture shows how to design prompts as reusable instruction templates.
A template separates what stays the same from what changes. The stable parts include the role, the goal, the rules, the output format and any examples. The variable parts include the specific document, question, customer details or parameters for each run. By marking variable parts with clear placeholders, you can reuse the same template across hundreds of requests and still keep behavior consistent.
You will learn how to structure a template with labeled sections, such as purpose, inputs, steps, constraints, output format and fallback behavior. We discuss naming placeholders clearly, documenting expected input types, and including instructions for what to do when an input is missing or malformed.
Templates also improve teamwork. When prompts live in a shared library with descriptions, owners and version numbers, colleagues can reuse, review and improve them instead of rewriting from scratch.
We look at examples for summarization, classification and extraction, and discuss how to test a template with varied inputs before trusting it.
By the end of this lecture you will be able to turn a one-off prompt into a documented, testable and reusable template that your team can maintain with confidence.
Role-Based Prompting and Expert Task Framing. Assigning a role is one of the most common prompt techniques, and also one of the most misunderstood. This lecture explains how to use roles and expert framing effectively and honestly.
A role tells the model what perspective, vocabulary and priorities to adopt, such as a financial analyst reviewing a report or a technical editor checking documentation. Done well, it focuses the response, sets the level of detail and establishes the audience. Done poorly, it becomes a decorative sentence that adds little, or it encourages overconfident answers that sound authoritative without being correct.
You will learn to make roles concrete. Describe the responsibilities, the standards the expert would apply, the audience being served and what the expert should do when evidence is insufficient. Pair the role with a clear task, constraints and an output format, since the role alone does not guarantee quality.
We also discuss limits. A role does not give the model new knowledge, and it should not be used to imply credentials or guarantee professional advice. For high-stakes topics, outputs still need human review.
Comparing outputs with and without a role helps you decide whether it earns its place.
By the end of this lecture you will be able to write purposeful role instructions, frame expert tasks clearly and test whether the role improves results.
Few-Shot Prompting and Example Selection. Showing the model examples is often more effective than describing what you want. This lecture explains few-shot prompting and how to choose examples that teach the right pattern.
In zero-shot prompting you give only instructions. In few-shot prompting you add a small number of input and output pairs that demonstrate the task. The model infers the pattern, including format, tone, level of detail and decision rules. Examples are especially valuable for classification, extraction, style matching and unusual output structures.
Selection matters. Good examples are accurate, representative and consistent with each other. Include variety so that the model does not overfit to one surface pattern, and include edge cases, such as an input with missing information and the correct way to handle it. Avoid examples that contain mistakes, since models copy them. Watch the order and balance of labels, because a skewed set can bias results.
We discuss how many examples to use, how they consume context, and how to keep them clearly separated from real inputs. For larger libraries, examples can be selected dynamically based on similarity to the current request.
Testing is essential, so compare zero-shot and few-shot results on a small evaluation set.
By the end of this lecture you will be able to design, choose and test few-shot examples that improve reliability.
Using Delimiters, Variables, and Explicit Instructions. Small structural choices can make prompts much clearer. This lecture covers delimiters, variables and explicit instructions as practical tools for precision.
Delimiters are markers that show where one part of a prompt ends and another begins. Examples include XML-style tags, triple backticks, headings and labeled blocks. They help the model distinguish instructions from data, separate multiple documents and identify examples. Consistent delimiters also make prompts easier for people to read and for code to assemble.
Variables are placeholders filled in at runtime, such as a document, a customer name or a target language. We discuss naming conventions, escaping or handling content that might contain the delimiter itself, and validating inputs before insertion.
Explicit instructions remove guesswork. State the task, the audience, the required length, the format, what to include, what to exclude and what to do in uncertain cases. Use positive, specific wording and numbered steps for multi-part tasks. Avoid contradictory requirements and vague words such as good or short without definition.
We show how adding structure changes outputs on a sample task and how to find the minimal set of instructions that gives dependable behavior.
By the end of this lecture you will be able to apply delimiters, variables and explicit wording to create prompts that are clear, maintainable and robust.
Constraint-Based Prompting and Conditional Rules. Real tasks come with rules, and the prompt must encode them clearly. This lecture explains how to express constraints and conditional logic so that the model follows them reliably.
Constraints limit what the output may contain or how it must look. Examples include length limits, required sections, prohibited topics, allowed categories, tone requirements and rules about using only supplied sources. Conditional rules express if-then logic, such as if the document does not mention a date, return unknown, or if the request is outside scope, respond with a brief refusal and a suggested alternative.
You will learn to write constraints that are testable. Replace vague wishes with measurable statements, order rules by priority and resolve conflicts explicitly. Group related rules, keep each one short and avoid hiding critical constraints in long paragraphs. Where possible, repeat the most important rule near the output format section.
We also discuss the limits of prompt-only enforcement. Models can still break rules, so important constraints should be backed by validation in code, such as checking schema compliance or banned content after generation.
Testing should include cases designed to trigger each conditional branch.
By the end of this lecture you will be able to write precise, prioritized constraints and conditional rules and pair them with automated checks.
Self-Review, Critique, and Iterative Refinement Patterns. Models can often improve their own work when asked to review it, provided the review is structured. This lecture explains self-review, critique and iterative refinement patterns.
The basic pattern has three steps: generate a draft, critique it against explicit criteria and revise based on the critique. The criteria matter greatly. A vague request to improve the answer produces vague changes, while a checklist covering accuracy against sources, completeness, format compliance, tone and unsupported claims produces targeted improvements.
Variations include using a separate prompt or even a different model as the reviewer, which can reduce shared blind spots, asking for a list of problems before any rewriting, and limiting the number of refinement rounds to control cost and avoid drift. For factual work, the review should compare claims with supplied evidence instead of relying on the model's memory.
We also discuss risks. Self-review can add confidence without adding correctness, and repeated rewriting can remove useful detail or introduce new errors. Measure whether the refinement actually improves scores on your evaluation set.
Keep drafts, critiques and final outputs so that you can inspect what changed.
By the end of this lecture you will be able to design bounded critique and revision loops, define useful review criteria and judge whether refinement is worth its cost.
Hands-on: Create a reusable prompt template library for five business scenarios. In this exercise you apply the design patterns from this section by building a small library of tested prompt templates that a team could reuse.
The steps I would expect you to follow are these. First, choose five business scenarios, such as customer email triage, meeting summary, policy question answering, product description writing and risk classification. Second, for each scenario write a template with a clear purpose, labeled inputs, role, constraints, output format and fallback rules. Third, add one or two few-shot examples where they help. Fourth, create three to five test inputs per template, including a normal case, an edge case and a case with missing information. Fifth, run each template, score the results against a simple checklist and revise. Sixth, document each template with a name, version, owner, input description and known limitations, and store them in a consistent folder structure.
Use sample or synthetic content so that nothing confidential is shared.
Review the finished library with a colleague who did not write it, because unclear placeholders or missing fallback rules become obvious quickly when someone else tries to use a template for the first time.
By the end of this lab you will have a documented template library, test cases and a repeatable process for improving prompts over time.
Why Structured Outputs Matter for AI Applications. Free-form text is fine for people but difficult for software. This lecture explains why structured outputs are essential when AI results feed other systems.
When a model returns a paragraph, your application must guess how to extract the fields it needs, and small wording changes can break the parser. When it returns structured data, such as JSON with agreed fields, the application can validate it, store it, route it and display it predictably. Structure also makes evaluation easier, because you can compare fields against expected values automatically.
We discuss common uses: extracting information from documents, classifying support tickets, producing records for databases, generating tool arguments for agents and building reports from multiple sources. In each case, a defined contract between the model and the application reduces ambiguity and failure.
You will also see the risks of skipping structure. Missing fields, inconsistent names, mixed formats, extra commentary around the data and invented values all lead to downstream errors that can be hard to trace.
The course approach is to define the shape of the output, instruct the model clearly, validate the result and handle failures deliberately.
By the end of this lecture you will be able to explain the benefits of structured outputs, identify tasks that need them and describe the overall pattern used throughout this section.
Prompting for JSON, Markdown, CSV, and Tabular Data. Different destinations call for different formats. This lecture explains how to prompt for JSON, Markdown, CSV and tabular data and how to choose among them.
JSON suits nested, typed data exchanged between programs. Markdown suits readable documents with headings, lists and tables for people. CSV suits flat tables that open in spreadsheets, but it has pitfalls with commas, quotes and line breaks inside values. Tables in Markdown are convenient to read but not ideal for strict parsing.
You will learn prompting techniques that apply to all of them. State the exact format, list the fields or columns in order, give a short example and say that no extra commentary should appear outside the data. Specify how to represent empty values, dates, numbers and lists. For CSV, define quoting rules and the header row. For JSON, ask for valid syntax and consistent key names.
We also cover common failures, such as code fences around output, trailing commas, inconsistent column counts and invented fields, and how to detect them with simple parsing checks.
Choose the format based on the consumer of the output, not habit.
By the end of this lecture you will be able to prompt for each format reliably and test that the results parse correctly.
Understanding JSON Schema and Output Contracts. A prompt can describe the format you want, but a schema defines it precisely. This lecture introduces JSON Schema and the idea of an output contract between the model and your application.
JSON Schema is a standard vocabulary for describing the structure of JSON data. It lets you declare which properties exist, what type each has, which are required, what values are allowed, and how nested objects and arrays are shaped. Because it is machine readable, the same schema can drive validation, documentation and, with some platforms, constrained generation.
An output contract is the agreement that the model will produce data matching a schema and that the application will reject anything that does not. Contracts should be versioned, documented and tested like any interface. When the contract changes, both the prompt and the validator must change together.
You will learn to read and write simple schemas, including object, array, string, number and boolean types, descriptions of fields and examples. We discuss writing field descriptions that guide the model, since descriptions often improve accuracy as much as the type definitions.
We also cover keeping schemas as small as the task allows, because complexity increases failure rates.
By the end of this lecture you will be able to read and draft JSON Schemas and use them as clear output contracts.
Working with Required Fields, Enums, Types, and Nested Objects. Useful schemas express real business rules. This lecture explores required fields, enumerations, data types and nested objects and shows how each shapes model behavior.
Required fields state what must always be present. Making everything required can force the model to invent values, while making everything optional can hide missing data, so decide deliberately based on the task. Enumerations restrict a field to a fixed set of values, such as priority levels or ticket categories, which prevents inconsistent labels and simplifies routing. Types ensure that numbers are numbers, dates follow a format and lists contain the expected kinds of items.
Nested objects represent relationships, such as an invoice with line items or a meeting with participants and action items. They are powerful but increase complexity, so keep nesting shallow where possible and give each level clear descriptions.
You will learn to add constraints such as minimum and maximum values, string patterns and maximum lengths, and how to describe their meaning in the prompt as well as the schema. We also discuss naming conventions and avoiding ambiguous field names.
Test the design with tricky inputs, including missing data and unusual values.
By the end of this lecture you will be able to design schemas with the right balance of strictness and flexibility.
Schema-Constrained Generation vs. Prompt-Only Formatting. There are two broad ways to get structured output: ask nicely in the prompt, or have the platform enforce a schema during generation. This lecture compares them.
Prompt-only formatting relies on instructions and examples. It works with almost any model and is easy to start with, but the model may still produce invalid syntax, extra text, missing fields or invented keys, especially on long or complex inputs. Schema-constrained generation, offered by some providers and local tools, restricts the decoding process so that output conforms to the schema's structure. This greatly reduces syntax errors and missing required fields.
Constraint does not guarantee correctness of content. A response can match the schema perfectly and still contain wrong values. You still need grounding, validation of business rules and evaluation.
We discuss tradeoffs: availability across models, schema features that are supported, possible effects on answer quality, latency and the need to keep schemas simple. We also discuss fallbacks when constraints are unavailable, such as validate-and-retry loops.
A practical approach is to combine methods: use constrained generation where available, keep instructions clear, validate in code and measure failure rates.
By the end of this lecture you will be able to choose the right approach for a platform and explain the limits of each.
Handling Missing Information, Null Values, and Uncertainty. Real inputs are incomplete, and a good extraction system must say so instead of guessing. This lecture explains how to design prompts and schemas that handle missing information, null values and uncertainty honestly.
The core risk is fabrication. If a schema requires a value and the source does not contain it, a model may supply a plausible but invented answer. To prevent this, allow nulls or an explicit unknown value for fields that may be absent, and instruct the model to use them whenever the source does not state the information.
You will learn to distinguish situations. A field may be not mentioned, not applicable, ambiguous or conflicting, and each can be represented differently. Consider adding companion fields, such as a confidence level, an evidence quote or a note explaining why a value is missing, so that reviewers can check the result quickly.
We also discuss thresholds and routing. Low confidence or missing critical fields can trigger human review or a follow-up question instead of automatic processing.
Testing should include documents that deliberately lack key details, and you should measure how often the system correctly leaves them empty.
By the end of this lecture you will be able to design extraction workflows that avoid invented values and make uncertainty visible and actionable.
Validating, Repairing, and Retrying Invalid Model Responses. Even good prompts sometimes produce invalid output, so reliable systems plan for failure. This lecture covers validating, repairing and retrying model responses.
Validation is the first line of defense. Parse the response, check it against the schema, then apply business rules such as value ranges, consistency between fields and references that must exist. Treat the result as untrusted until every check passes. Record the specific errors in a structured form.
Repair comes next. Simple issues, such as surrounding text or code fences, can sometimes be fixed by deterministic code. For other issues, a retry prompt can include the original task, the invalid output and the precise validation errors, asking for a corrected version. Limit the number of attempts, because endless loops waste time and money and may drift further from the source.
When retries fail, fall back safely: return an error, use a simpler method or route to human review. Never silently accept invalid data.
We discuss monitoring repair rates, since frequent failures signal that the prompt, schema or model choice needs improvement, and logging examples for later analysis.
By the end of this lecture you will be able to build a validate, repair and retry loop that is bounded, observable and safe.
Hands-on: Build a structured information extraction workflow using JSON Schema. In this exercise you build an extraction workflow that turns unstructured text into validated JSON, applying the techniques from this section.
The steps I would expect you to follow are these. First, choose a sample set of short documents, such as synthetic invoices, job postings or support tickets. Second, design a JSON Schema with required fields, enumerations, types, a nested object or array and nullable fields for information that may be absent. Third, write a prompt that includes the schema, field descriptions, an example and rules for missing values. Fourth, run it on the documents and validate each response with a JSON Schema validator in Python or an online tool. Fifth, implement a bounded retry that sends validation errors back to the model. Sixth, compare extracted values with expected answers and compute field-level accuracy.
Include at least a few documents that lack important fields, and check that the workflow returns nulls instead of inventing values. Use sample or synthetic data only.
Keep the schema, prompt, test documents and accuracy results together in version control, so that you can rerun the workflow after any change and see immediately whether extraction quality improved or regressed.
By the end of this lab you will have a working extraction workflow, a validated schema and accuracy results that you can improve and reuse.
What Is Prompt Chaining and When Should You Use It? Some tasks are too large or too varied for a single prompt. This lecture introduces prompt chaining, in which the output of one step becomes part of the input to the next.
A prompt chain breaks a complex task into smaller steps, each with a focused instruction, its own context and a defined output. For example, a chain might extract facts from a report, analyze them for risks, validate the analysis against the source and then write a summary. Each step is easier to design, test and debug than one giant prompt.
We discuss the benefits: higher reliability, clearer failure points, the ability to use different models or settings for different steps, opportunities to insert validation and human review, and better control of context size. We also discuss costs, such as extra latency, more tokens and the need to manage intermediate data.
Use chaining when a task has distinct phases, needs verification, requires different kinds of reasoning or exceeds a comfortable context size. Avoid it when a single clear prompt already performs well, because added complexity creates additional failure modes.
You will learn a decision checklist and see a simple example compared with its single-prompt version.
By the end of this lecture you will be able to decide when chaining is justified and sketch a basic chain for a task.
Designing Sequential Prompt Chains. The most common chain runs its steps in a fixed order. This lecture teaches how to design sequential prompt chains that are clear, testable and robust.
Start by decomposing the task. Identify the distinct stages, such as gathering facts, transforming them, checking them and formatting the final result, and decide what each stage must receive and produce. Define the interface between steps precisely, ideally as structured data with a schema, so that the next prompt receives exactly what it needs and nothing more.
Keep each step focused. A step with one job is easier to prompt, easier to evaluate and easier to replace. Give each step its own instructions, constraints and failure behavior, and decide what happens when it cannot complete, for example by stopping, retrying or routing to review.
We discuss passing only necessary context forward to save tokens and reduce the chance of distraction, while retaining identifiers that allow tracing outputs back to sources. Record every step's input, output, model and settings so that you can debug and reproduce runs.
Testing happens at two levels: each step alone with fixed inputs, and the whole chain on realistic examples.
By the end of this lecture you will be able to design sequential chains with clear interfaces and measurable steps.
Parallel Prompting and Independent Task Execution. Not every step depends on the previous one. This lecture explains parallel prompting, where independent tasks run at the same time and their results are combined.
Parallelism fits cases where the same operation applies to many items, such as summarizing each section of a long report, classifying a batch of messages or extracting facts from several documents. It also fits cases where different analyses of the same input are independent, such as one prompt checking facts, another checking tone and a third checking policy compliance.
You will learn how to design the pattern. Split the work into units with no shared dependencies, run them concurrently, collect structured results with identifiers and then merge them in a later step. The merge step may itself be a prompt, for example synthesizing findings and resolving duplicates or conflicts.
We discuss practical concerns. Rate limits and costs rise with concurrency, partial failures need handling, results may arrive in different orders and consistency across units requires shared instructions. Use the same template and settings for all branches so that outputs are comparable.
Parallel designs can cut latency substantially, but they should be tested for quality, not only speed.
By the end of this lecture you will be able to identify parallelizable tasks, design the split and merge steps and handle failures in a controlled way.
Conditional Prompt Chains and Decision-Based Routing. Real workflows branch. This lecture explains conditional chains and routing, where the path depends on the content or on a decision made earlier.
A routing step examines the input and chooses what happens next. For example, a support message might be classified as billing, technical or general, and then sent to a prompt specialized for that category. A document might be routed to different extraction templates depending on its type, or sent to human review when the confidence is low.
You will learn to build reliable routers. Define a closed set of route labels, describe each clearly, include an explicit other or unknown option and require structured output so that code can act on the decision. Keep the classification prompt separate from the downstream prompts. Test the router on a labeled set, since an error at this step affects everything after it.
We also discuss using simple rules before models where possible, combining model judgments with confidence thresholds and logging each decision. Specialized prompts usually outperform a single generic one, and routing makes it easy to add new categories later.
Beware of excessive branching, which makes systems hard to test and maintain.
By the end of this lecture you will be able to design and evaluate conditional chains and routers.
Passing Structured Context Between Prompt Steps. How information moves between steps determines how reliable a chain is. This lecture explains how to pass structured context between prompt steps.
Passing raw model text forward is tempting, but it can carry formatting noise, irrelevant detail and unverified claims. A better approach is to have each step output a structured object with defined fields, validate it and then pass selected fields to the next step. This keeps contracts clear and makes each step independently testable.
You will learn what belongs in the shared state: the original input or a reference to it, extracted facts with source identifiers, decisions made and their reasons, validation results, open questions and a record of steps completed. Not everything needs to travel, and sending only what each step requires reduces cost and confusion.
We discuss preserving evidence. Keep quotes or locations that support each extracted item so later steps can verify them, and avoid replacing source material with summaries too early. Version your schemas so that changes in one step are coordinated with the next.
We also cover size management, handling large intermediate results and keeping sensitive data out of steps that do not need it.
By the end of this lecture you will be able to design clean, validated state passing for multi-step workflows.
Error Handling, Retries, and Human Review Checkpoints. Chains fail in many ways, and a reliable workflow expects it. This lecture covers error handling, retries and human review checkpoints.
We start with kinds of failures. Technical failures include timeouts, rate limits and service errors, which often justify limited retries with delays. Format failures include invalid or incomplete output, which can be handled with validation and repair. Content failures include low-confidence answers, contradictions or missing evidence, which may require a different approach or a person.
You will learn to design a policy for each stage: how many retries, what delay, when to switch to a fallback prompt or model and when to stop. Always set limits, since uncontrolled loops waste money and can repeat harmful mistakes.
Human review checkpoints are placed where the risk is highest, such as before sending a message to a customer, approving a financial figure or taking an action with side effects. A good checkpoint shows the reviewer the output, the evidence and the reasons for escalation, and records the decision.
We also discuss logging errors with enough detail to improve the system and measuring how often each path is used.
By the end of this lecture you will be able to build workflows that fail safely and involve people at the right moments.
Building Extract–Analyze–Validate–Generate Workflows. A widely useful chain pattern follows four stages: extract, analyze, validate and generate. This lecture explains the pattern and how to implement it.
In the extract stage, a prompt pulls structured facts from the source material, with evidence references and nulls for missing items. In the analyze stage, another prompt interprets those facts, for example by identifying risks, comparing options or calculating derived values, working only from the extracted data. In the validate stage, checks confirm that the analysis is consistent with the source and the schema, using code where possible and a review prompt where judgment is needed. In the generate stage, a final prompt produces the deliverable, such as a report or an email, using only validated content.
Separating these stages reduces the chance that fluent writing hides weak analysis, and it creates natural places to measure quality. If the final report is wrong, you can inspect whether the extraction, the analysis or the generation failed.
We discuss designing each interface, keeping evidence attached to claims and deciding what happens when validation fails.
The pattern adapts easily to documents, images, audio and video later in the course.
By the end of this lecture you will be able to design and test a four-stage workflow for a practical task.
Hands-on: Build a five-stage prompt chain that transforms an unstructured report into a polished deliverable. In this exercise you combine chaining, structured outputs and validation into a working five-stage workflow.
The steps I would expect you to follow are these. First, choose a sample unstructured report, such as a synthetic incident write-up or a messy set of meeting notes. Second, design the five stages, for example extract facts, classify and prioritize them, analyze causes or implications, validate against the source, and generate the final formatted report. Third, define a JSON schema for the data passed between stages. Fourth, write a focused prompt for each stage with constraints, fallback rules and clear output formats. Fifth, run the chain, log every intermediate output and add a bounded retry for invalid stages. Sixth, add a human review checkpoint before the final stage when confidence is low. Seventh, evaluate the final report against a checklist and compare it with a single-prompt baseline.
Use sample or synthetic content so that nothing confidential is shared.
Keep every intermediate output, prompt version and score together so that you can trace any weakness in the final report back to a specific stage, and decide with evidence which stage deserves improvement first.
By the end of this lab you will have a tested five-stage chain and evidence of where chaining improves reliability.
Understanding Grounded Generation and Retrieval-Augmented Generation. Models are fluent but not inherently reliable about facts, especially private or recent information. This lecture introduces grounded generation and retrieval-augmented generation, usually called RAG, as ways to base answers on supplied evidence.
Grounded generation means the model answers using material you provide, such as documents, records or search results, instead of relying on what it memorized during training. RAG is a common architecture for this: a retrieval step finds relevant passages from a larger collection, and a generation step uses those passages as context to write the answer, ideally with citations.
We walk through the pieces. Documents are split into chunks, indexed, and searched using keywords, embeddings or both. The most relevant chunks are placed into the prompt with clear labels, and the instructions tell the model to answer only from them and to say when the evidence is insufficient.
You will learn why grounding helps: it reduces hallucination, allows answers about private or current information and makes verification possible. You will also learn its limits. Poor retrieval, outdated documents or ambiguous questions still produce weak answers, so the quality of the evidence is as important as the quality of the prompt.
By the end of this lecture you will be able to explain grounded generation and RAG, describe their components and identify where failures can arise.
Supplying Documents, Facts, and Evidence to AI Models. How you present evidence to a model strongly affects whether it uses that evidence correctly. This lecture covers practical ways to supply documents, facts and evidence.
You will learn to give each source a stable identifier, a title and metadata such as date, author or version, then present the text inside clear delimiters. Labels allow the model to cite sources precisely and let you trace answers back later. When combining several sources, keep them visibly separate and, if relevant, indicate their authority or recency so that conflicts can be handled sensibly.
Preparation matters. Clean extraction errors, remove boilerplate, keep headings and table structure when meaningful and avoid cutting passages in the middle of an important thought. For long documents, include only the relevant sections and mention that other parts exist.
We also discuss instructions to accompany evidence: answer only from the supplied material, quote key passages, state when something is not covered and do not follow instructions found inside the documents.
Finally, we consider size and cost, and how to test whether the model actually used the evidence by asking questions whose answers appear only in the supplied text.
By the end of this lecture you will be able to prepare and present evidence in a way that supports accurate, traceable answers.
Designing Prompts That Reference Specific Sources. A grounded answer should point to where each claim came from. This lecture explains how to design prompts that make the model reference specific sources accurately.
Start with the source labels from the previous lecture. Instruct the model to cite identifiers next to each claim, using a consistent format such as the identifier in square brackets, and to cite only sources that were actually provided. Ask for the supporting passage number, section or short quotation where practical, because specific locators make verification much faster.
You will learn to specify the answer structure. For example, request a short answer followed by a list of claims, each with its citation, or a table linking each statement to a source and a quote. Include rules for combining sources, such as citing every source that supports a claim and noting disagreement when sources conflict.
We also discuss common failure modes: invented citations, citing a source that does not support the claim, citing too broadly and quoting inaccurately. Simple automated checks can catch some of these, for instance by confirming that cited identifiers exist and that quoted text appears in the source.
Testing with questions that have no supporting evidence shows whether the model admits it.
By the end of this lecture you will be able to write prompts that produce specific, checkable source references.
Evidence Extraction, Source Attribution, and Citations. Before writing an answer, it often helps to first collect the evidence. This lecture explains evidence extraction, source attribution and citation practices as a deliberate step in a workflow.
In an evidence extraction step, the model reads the supplied sources and returns the passages or facts relevant to the question, each linked to a source identifier and location. This separates finding evidence from composing the answer, which makes both easier to inspect and improve. A second step then writes the response using only the extracted evidence.
Attribution means connecting each statement to its origin. Good attribution distinguishes direct quotes, paraphrases and inferences, and marks inferences clearly so readers know they go beyond the text. Citations should be specific enough to locate the material, such as a document identifier with page or section.
You will learn schemas for evidence records, including fields for source, location, quote, relevance and confidence. We discuss verifying quotes against the source text with simple code, rejecting evidence that cannot be found and handling cases where evidence is partial.
This pattern improves transparency and supports review by people who need to rely on the answer.
By the end of this lecture you will be able to design extraction and attribution steps that produce traceable, verifiable citations.
Detecting Contradictions Between Multiple Sources. Real collections contain conflicting information, such as an old policy and a new one, or two reports with different figures. This lecture explains how to detect and handle contradictions.
A model that is not told to look for conflicts may blend sources into a smooth but misleading answer. You can prompt for contradiction detection explicitly by asking it to compare claims on the same topic across sources, list agreements and disagreements and cite each side.
You will learn to structure the task. First extract the relevant claims from each source with identifiers. Then group claims by topic, compare them and classify the relationship as consistent, conflicting, complementary or unrelated. Include metadata such as dates and authority to help decide which source should prevail, but avoid silently resolving conflicts when the rules are unclear.
The response should state what the sources say, where they differ, possible reasons such as version or scope differences and what additional information would resolve the issue. For high-stakes decisions, route unresolved conflicts to a human.
We discuss testing with synthetic document sets that contain planted differences, so that you can measure how often the workflow notices them.
By the end of this lecture you will be able to design prompts and steps that surface contradictions clearly and responsibly.
Preventing Unsupported Claims and Instruction Injection from Retrieved Content. Retrieved content can mislead a model in two ways: by lacking support for the answer and by containing text that tries to steer the model. This lecture explains defenses against both.
For unsupported claims, require the model to answer only from supplied evidence, cite each claim and say when the evidence does not cover the question. Add a verification step that checks each claim against its cited passage, either with a review prompt or with deterministic checks such as confirming that quotes exist. Measure the unsupported-claim rate on a test set and track it over time.
Instruction injection occurs when a retrieved document, web page or message contains text that looks like a command, such as a request to ignore earlier rules. Documents are data, not authority. At a conceptual and defensive level, the protections are to label retrieved content as untrusted, instruct the model to treat it only as material to analyze, keep privileged instructions separate, limit the tools the model can use and validate outputs before acting on them.
Testing should use harmless marker phrases placed in sample documents, in a controlled environment, to confirm that the workflow does not obey them.
By the end of this lecture you will be able to apply layered defenses against unsupported claims and instruction injection.
Hands-on: Create a document-grounded question-answering workflow with verifiable citations. In this exercise you build a grounded question-answering workflow and then check that its citations can be verified.
The steps I would expect you to follow are these. First, prepare a small set of sample documents, using public or synthetic content, and give each one an identifier, title and date. Second, write a prompt that places the documents in labeled delimiters, requires answers to come only from them and requires a citation with a short supporting quote for each claim. Third, define a JSON structure for the answer, with fields for the answer, claims, sources, quotes and a status that can be answered, partially answered or not answered. Fourth, write a simple script or checklist that verifies each quote against the source text and confirms each cited identifier exists. Fifth, test with questions that are answerable, partly answerable, unanswerable and conflicting. Sixth, record the failures and revise the prompt.
Include at least one document containing a harmless marker sentence phrased like an instruction, and confirm that the workflow treats it as data.
Keep the documents, prompts, verification script and test questions together in version control, so that you can rerun the workflow after any change and confirm that citation quality has not slipped.
By the end of this lab you will have a grounded workflow with measurable citation quality.
Why Prompt Evaluation Is Essential. Many prompts are judged by a few impressive examples, which is a poor basis for building applications. This lecture explains why systematic prompt evaluation is essential.
Without evaluation, you cannot tell whether a change improved the system, whether it works on unusual inputs or whether a new model version has quietly changed behavior. A prompt that looks excellent on three hand-picked cases may fail on a large share of real requests. Evaluation turns opinion into evidence.
We introduce the basic loop: define what good means for the task, build a set of test cases, run the prompt, score the results, analyze failures, change one thing and repeat. We discuss why you need to evaluate across different kinds of inputs, including typical, difficult, ambiguous and adversarial cases.
You will also learn why evaluation matters for cost and risk. Cheaper models or shorter prompts may be sufficient on some tasks, but only evidence can show it, and important failures such as unsupported claims or leaked data need explicit tests.
Evaluation also supports communication. Clear metrics help you explain quality to stakeholders and decide when a workflow is ready for use.
By the end of this lecture you will be able to describe the evaluation loop and explain why every serious prompt workflow needs one.
Creating Test Cases and Ground Truth Datasets. A good evaluation begins with good test cases. This lecture explains how to create test cases and ground truth datasets for prompt workflows.
A test case includes an input, any supporting context and the expected result or the criteria for judging it. Ground truth is the trusted correct answer, usually created or reviewed by a person who understands the task. For extraction tasks, ground truth may be the correct field values. For open-ended tasks, it may be a rubric describing required elements.
You will learn how to design a representative set. Include common cases, edge cases, inputs with missing information, ambiguous requests, long and short inputs and cases that should be refused or escalated. Cover different sources, formats and difficulty levels, and add adversarial cases that test security and robustness.
We discuss how many cases are enough to start, why twenty well-chosen cases beat two hundred careless ones and how to grow the set when production failures reveal gaps. Keep the data versioned, record where each case came from and avoid including real confidential information by using synthetic or anonymized material.
Split cases into a development set for tuning and a held-out set for final checks.
By the end of this lecture you will be able to build a balanced, documented evaluation dataset.
Measuring Accuracy, Completeness, Consistency, and Instruction Following. Quality has several dimensions, and a single score can hide important problems. This lecture explains four useful measures: accuracy, completeness, consistency and instruction following.
Accuracy asks whether the content is correct and supported by the source. For extraction it can be field-level correctness, and for question answering it can be the proportion of claims that are supported. Completeness asks whether the output includes everything required, such as all fields, all action items or all relevant evidence. Consistency asks whether the system behaves similarly across repeated runs and similar inputs, which is essential for reliability. Instruction following asks whether the output obeys the format, length, tone and constraint requirements.
You will learn how to define each measure concretely for your task, how to score it with simple rubrics or automated checks and how to combine results without hiding weaknesses. Track the measures separately so that tradeoffs are visible, since improving completeness may reduce accuracy or consistency.
We also discuss sampling multiple runs to estimate consistency and slicing results by input type to find weak spots.
Clear definitions allow different reviewers to score outputs the same way.
By the end of this lecture you will be able to define and apply these four measures to evaluate prompt performance.
Evaluating Structured Outputs with Automated Assertions. When outputs are structured, many quality checks can be automated. This lecture explains how to evaluate structured outputs using automated assertions.
An assertion is a check that must be true for an output to pass. Basic assertions include whether the response parses as valid JSON, whether it matches the schema, whether required fields are present and whether values fall within allowed ranges or enumerations. Business assertions go further: totals match line items, dates are in logical order, identifiers exist in a reference list and quoted evidence appears in the source text.
You will learn to write assertions as small, readable functions in Python and run them across your test set to produce pass rates per assertion. Comparing fields with ground truth gives accuracy measures, such as exact match for identifiers and tolerance-based comparison for numbers.
We discuss designing assertions that fail informatively, so that you can see what went wrong, and avoiding brittle checks that reject acceptable variation in wording. Combine automated checks with human review for aspects that require judgment.
Assertions can run in continuous integration, so every prompt change is tested before use.
By the end of this lecture you will be able to build an assertion suite that measures the quality of structured outputs quickly and repeatably.
Using Human Review and Model-Based Evaluation. Some qualities, such as clarity, helpfulness and faithfulness, need judgment. This lecture explains how to use human review and model-based evaluation together.
Human review is the gold standard but is slow and costly. To make it effective, write a rubric with clear criteria and score levels, provide examples of each level, train reviewers and have more than one person score a sample to measure agreement. Disagreements reveal unclear criteria that should be fixed.
Model-based evaluation, sometimes called using a model as a judge, scales review by having a model score outputs against the rubric. It can be useful, but judges have biases, such as preferring longer or more confident answers, and they can be inconsistent. Treat them as instruments that must be calibrated.
You will learn the calibration process: have people label a sample, run the judge on the same sample, measure agreement, refine the judge prompt and set limits on where it can be trusted. Keep the judge prompt, model and settings versioned, and keep humans in the loop for high-stakes or uncertain cases.
A common design uses automated assertions first, model judging for scale and human review for audits.
By the end of this lecture you will be able to combine these methods and know when each is appropriate.
Comparing Prompt Variants with Controlled Experiments. Choosing between two prompts by intuition is unreliable. This lecture explains how to compare prompt variants with controlled experiments.
A controlled experiment changes one thing at a time. If you alter the instruction, the examples and the output format together, you cannot tell which change mattered. Keep the model, settings, test set and scoring method identical, and vary a single element, such as the wording of a constraint or the presence of an example.
Run each variant on the full test set, and where outputs vary, run several trials. Compare scores per measure and by slice, such as input type, and look at the actual failures, not only averages. With small datasets, differences may be noise, so look for consistent improvements across measures and runs rather than celebrating a small gain.
We discuss avoiding leakage, which happens when you tune prompts on the same cases you use for the final comparison. Reserve a held-out set for confirmation. Record every experiment with the prompt version, results and conclusion, so that you build knowledge instead of repeating trials.
Also compare cost and latency, since a slightly better prompt that doubles tokens may not be worthwhile.
By the end of this lecture you will be able to run disciplined comparisons and make decisions you can defend.
Prompt Versioning, Regression Testing, and Performance Tracking. Prompts change, models change and data changes. This lecture explains how to manage that change with versioning, regression testing and performance tracking.
Version control for prompts means storing them as files in a repository, with meaningful names, change descriptions and review before merging. Each version should be linked to the model, settings, schema and test results used with it. Treat prompts, schemas and examples as code, because they determine system behavior.
Regression testing means rerunning the evaluation set whenever something changes, such as the prompt, the model version, the retrieval index or a dependency, and comparing results against the previous baseline. Define thresholds that must be met, for example no drop in accuracy beyond a set margin and zero failures on safety cases, and block releases that fail.
Performance tracking continues after deployment. Monitor quality indicators, validation failure rates, latency, token use and cost over time, and sample production outputs for review. Alert on drift, which may indicate a model update or a change in input patterns.
We discuss release notes, rollback plans and keeping a history of experiments.
By the end of this lecture you will be able to set up a lightweight versioning and regression process that keeps prompt quality stable as everything around it changes.
Hands-on: Build a prompt evaluation benchmark with 20 test cases. In this exercise you create a compact but meaningful benchmark and use it to compare two versions of a prompt.
The steps I would expect you to follow are these. First, choose a task, such as extracting action items from meeting notes or answering questions from a short policy. Second, create twenty test cases using synthetic data, including typical cases, edge cases, missing information, ambiguous inputs and at least a few designed to test refusal or escalation. Third, write ground truth answers or rubrics for each case. Fourth, implement automated assertions for format, required fields and field-level accuracy. Fifth, write a short human rubric for qualities that automation cannot judge, and score a sample. Sixth, run two prompt versions on all cases, repeating runs to measure consistency. Seventh, compare scores, inspect failures, record the results in a table and decide which version to keep.
Save the dataset, scripts and results together and tag them with a version.
Tag the benchmark with a version number and keep a short changelog, because you will reuse it in later sections whenever a prompt, model or chain changes and you need trustworthy before and after comparisons.
By the end of this lab you will have a reusable benchmark, a scoring workflow and a documented comparison that you can rerun whenever the prompt or model changes.
What Is Multimodal Prompt Engineering? So far you have worked mostly with text. This lecture introduces multimodal prompt engineering, which designs interactions that combine text with images, documents, audio and video.
A multimodal model can accept more than one kind of input and sometimes produce more than one kind of output. You might give it a screenshot and ask what is wrong, a chart and ask for the trend, a recording and ask for decisions, or a PDF and ask for a comparison. The prompt now has to say not only what to do but also how to use each piece of media.
We discuss what changes. Inputs have quality problems, such as blur, low resolution, noise and scanned layout. Models may miss small details, misread text in images or overlook things outside the frame. Prompts must direct attention, such as asking about a particular region, time range or page, and must request evidence so that claims can be verified.
You will see why the earlier skills still apply: context engineering, structured outputs, grounding, evaluation and security carry over directly, with additional care for media-specific limits.
This section lays the groundwork, and later sections cover each modality in depth.
By the end of this lecture you will be able to define multimodal prompt engineering and describe what makes it different from text-only prompting.
Text-Only Models vs. Multimodal Models. Not every model can see, hear or watch. This lecture compares text-only and multimodal models and explains how to choose between them.
Text-only models accept and produce text. They can still work with other media if you convert it first, for example by running optical character recognition on a scanned page or transcribing audio, but information is lost in conversion, such as layout, tone, visual relationships and timing. Multimodal models can process images, and in some cases documents, audio or video, directly, preserving more of the original signal.
Multimodal does not mean uniformly strong. A model might read screenshots well but struggle with dense tables, or handle short audio clips but not long recordings. Input limits, supported formats, pricing and privacy terms vary widely, and some features exist only on certain plans or platforms.
We discuss the tradeoffs of pipelines that use specialized tools, such as a speech recognition model feeding a text model, versus a single multimodal model. Pipelines can be more controllable and cheaper, while native multimodal models can capture richer relationships.
The decision should rest on evaluation with your own inputs, not marketing descriptions.
By the end of this lecture you will be able to compare the two model types and select an approach based on task needs and evidence.
How AI Models Represent Images, Documents, Audio, and Video. A basic picture of how media become model inputs helps explain both the power and the limits of multimodal systems. This lecture gives a practical, non-mathematical overview.
Images are typically divided into patches or processed by a vision encoder that produces numerical representations the language model can attend to, alongside text tokens. Resolution and cropping decisions affect how much detail survives, which is why small text in a large image can be misread. Documents may be handled as extracted text, as page images or as both, which affects how tables, layout and figures are understood. Audio is usually converted into a speech transcript, or into spectrogram-like features for models that process sound directly. Video is commonly sampled into frames, often with an audio track, which means rapid events between samples can be missed.
The practical lessons follow. Media consume many tokens. Preprocessing choices, such as resolution, frame rate and page rendering, change results. Models see a processed version of your input, not the original, so your preparation matters.
We also discuss why textual context, such as captions or a description of what to look for, helps interpretation.
By the end of this lecture you will be able to explain at a high level how media are represented and use that understanding to prepare better inputs.
Choosing the Right Model and Input Modality for a Task. Using more modalities is not always better. This lecture teaches a method for choosing the right model and the right input type for a task.
Start with the question you need answered and the evidence required. If the answer depends on exact text, a text export may be more reliable than a photo of the page. If it depends on layout, a rendered page image may preserve what matters. If tone or interruptions matter, audio carries information a transcript loses. If the question is about change over time, video or a sequence of frames may be necessary.
Then consider constraints: accuracy needs, volume, latency, cost, privacy and available tools. Sensitive recordings may need local processing. Large batches may favor a cheaper specialized pipeline. Occasional complex cases may justify a stronger multimodal model.
You will learn a simple decision table that compares options on fidelity, cost, controllability and risk, and the habit of testing candidates on a small labeled sample before committing. Often a hybrid design works best, using text extraction for most content and images only for pages or regions that need visual understanding.
By the end of this lecture you will be able to select modalities and models using clear criteria and evidence.
Preparing Multimodal Inputs: Quality, Format, and Context. Input quality limits output quality. This lecture covers practical preparation of images, documents, audio and video before they reach a model.
For images, use adequate resolution, good lighting and focus, crop to the relevant area, avoid heavy compression and provide a clear file format. For documents, prefer text-based PDFs over scans when possible, check that text extracts correctly, keep page order and consider splitting very large files. For audio, reduce background noise where possible, use a consistent format and sample rate, and break very long recordings into manageable segments. For video, choose appropriate lengths, keep the important content visible and consider extracting key frames and the audio track separately.
Context is just as important as quality. Tell the model what the media is, what the task is, where to look and what the output should be. Add metadata such as date, source, language and speaker names when known. Label multiple files clearly so that references remain unambiguous.
We also discuss privacy. Remove or mask personal details where possible, obtain consent for recordings and avoid uploading confidential material to services that do not meet your requirements.
By the end of this lecture you will be able to prepare multimodal inputs that give models the best chance of accurate, verifiable analysis.
Limitations of Multimodal Reasoning and Evidence Extraction. Multimodal models can be impressive, but they make characteristic mistakes. This lecture surveys the main limitations and how to design around them.
Common issues include misreading small or stylized text, miscounting objects, confusing spatial relationships such as left and right, overlooking fine details, misinterpreting charts with unusual axes, mishearing names and numbers in audio and missing brief events in video. Models may also describe what they expect to see instead of what is present, and they can sound equally confident whether right or wrong.
Evidence extraction is especially important. Instead of asking only for a conclusion, ask the model to list what it observed, where it observed it, such as page, region or timestamp, and how certain it is. Request separate fields for observation and interpretation, so that reviewers can check the facts before accepting the inference.
Design defenses: provide higher-resolution crops for critical details, use specialized tools like optical character recognition to cross-check, run multiple passes or models for important decisions, compare against structured data where available and route low-confidence results to people.
Testing on your own sample media reveals which limitations affect your use case most.
By the end of this lecture you will be able to anticipate common multimodal failures and build verification into your workflows.
Hands-on: Compare how different AI systems interpret the same text-and-image prompt. In this exercise you will give the same combined text and image input to several AI systems and compare how each interprets it.
The steps I would expect you to follow are these. First, choose two or three multimodal systems you can access. Second, prepare a small set of images, such as a chart, a screenshot with text and a photograph, using public or synthetic content. Third, write a prompt for each image that gives context, asks specific questions and requests a structured answer with observations, interpretation and uncertainty. Fourth, run the same prompt on every system and save the outputs along with model names and settings. Fifth, score each answer for accuracy, detail, hallucinated content, format compliance and honest handling of unclear regions. Sixth, summarize the differences and note which prompt adjustments, such as cropping or adding context, improved results.
Do not upload confidential or personal images.
Keep the images, prompts, raw outputs and scoring table together in one project folder, so that you can repeat the comparison when new model versions appear and decide with evidence whether to switch systems.
By the end of this lab you will have a comparison table, notes on model strengths and weaknesses and a method for choosing among multimodal systems.
Introduction to Image-Based Prompting. Images let you show the model exactly what you mean, but they also introduce new ways for prompts to go wrong. This lecture introduces the foundations of image-based prompting.
An image prompt usually combines one or more images with text instructions. The text should say what the image is, what you want done and what form the answer should take. A bare picture with the question what do you see invites a generic description, while a prompt that states the purpose, such as checking a product photo for visible damage or reading values from a chart, produces focused and useful results.
We discuss the main task families you will practice in this section: describing scenes and objects, answering questions about visual content, extracting data from charts and infographics, analyzing screenshots and interfaces and comparing images. Each has its own best practices, but they share principles: give context, point to regions, request evidence and ask the model to separate observations from interpretations.
You will also learn about practical constraints, including image size and resolution limits, the token cost of images, supported formats and the importance of not uploading sensitive or personal images to services that are not approved for them.
By the end of this lecture you will be able to structure a clear image prompt and describe the main categories of image tasks.
Describing Images, Objects, Scenes, and Spatial Relationships. Describing an image sounds simple, yet precise description is the foundation for every other visual task. This lecture explains how to prompt for accurate descriptions of objects, scenes and spatial relationships.
Start by telling the model the purpose and the level of detail you need. A description for accessibility differs from a description for inventory, quality inspection or content moderation. Ask for structured output where useful, for example a list of objects with attributes such as color, position and count, followed by a short scene summary.
Spatial relationships are a known weakness, so be explicit. Ask the model to describe positions using clear reference points, such as top left, center or relative to a named object, and to distinguish what is clearly visible from what is uncertain. Request that it say when something is partially hidden, blurry or ambiguous, rather than guessing.
You will learn to control hallucination by instructing the model to describe only what is visible, to avoid assumptions about identities or intentions and to flag inferences separately. For counting tasks, encourage careful enumeration and verify with a second pass or a cropped view.
By the end of this lecture you will be able to write prompts that produce reliable, structured and appropriately cautious visual descriptions.
Visual Question Answering with Image Inputs. Visual question answering means asking specific questions about an image and receiving answers grounded in what it shows. This lecture explains how to design effective visual question prompts.
Good questions are specific and answerable from the image. Compare what is in this photo with what color is the warning light in the upper right of this panel. The second is easier to verify and less likely to produce speculation. Provide context, such as the type of image and the domain, so the model interprets the details correctly.
You will learn useful patterns. Ask for the answer together with the visual evidence, such as the location and the visible text or feature that supports it. Allow an explicit not visible or cannot determine response. For multi-part questions, number them and request structured answers. For decisions, such as pass or fail inspections, define the criteria in the prompt and ask the model to apply them item by item.
We also discuss typical failure modes, including answering from general knowledge instead of the image, ignoring small details and being swayed by leading questions. Neutral phrasing and verification questions help.
Testing with a labeled set of images and expected answers shows how reliable the approach is.
By the end of this lecture you will be able to design visual question prompts that are specific, evidence-based and testable.
Extracting Information from Charts, Graphs, and Infographics. Charts compress data into visual form, and models can help translate them back into numbers and insights, but they need careful guidance. This lecture covers extracting information from charts, graphs and infographics.
Begin by asking the model to identify the chart type, title, axes, units, legend and any annotations before interpreting values. This anchors the reading and exposes misunderstandings early. Then ask for the data points or approximate values in a table, with an indication of uncertainty, since reading values from bars or lines is inherently approximate unless labels are present.
For trends and comparisons, request separate sections for observations, such as which series is highest in the last period, and interpretation, such as possible reasons. Ask the model to note truncated axes, unusual scales, missing labels and other features that can mislead.
Infographics combine text, icons and layout, so prompt for reading order and ask for structured extraction of each section. When accuracy matters, cross-check by comparing extracted values with underlying data if available, or by using optical character recognition on labeled values.
Higher resolution and cropping individual charts often improve results significantly.
Keep the extracted tables next to the original images so that reviewers can compare them quickly, and record which values were read directly from labels and which were estimated from the plotted shapes.
By the end of this lecture you will be able to extract and verify chart information and avoid common misreadings.
Analyzing Screenshots, Dashboards, and User Interfaces. Screenshots are everywhere in support, testing and product work. This lecture explains how to prompt a model to analyze screenshots, dashboards and user interfaces.
Start with context: the application, the user's goal and the question, such as why a form fails to submit or what changed in a dashboard. Ask the model to first describe the main regions, such as navigation, forms, buttons, messages and data panels, then focus on the relevant ones. For text in the image, ask it to transcribe visible messages exactly, since paraphrasing can lose important detail like an error code.
For dashboards, request extraction of key metrics with labels, units and time ranges, and a note about anything that appears abnormal. For user interface reviews, provide criteria, such as accessibility, consistency or clarity of labels, and ask for findings with locations and severity.
We discuss limits. Small fonts, scaling and compression can cause misreads, so crop and enlarge when needed. The model cannot see what is not in the screenshot, such as hidden states or the underlying system, and should say so. Remove personal or confidential information before sharing screenshots.
Structured outputs make results easier to track, for example a list of issues with location, observation and suggested next step.
By the end of this lecture you will be able to use screenshot analysis effectively and responsibly.
Comparing Multiple Images and Identifying Differences. Comparing images is common in quality control, design review and change tracking, and it is harder for models than describing a single image. This lecture explains how to prompt for comparison.
Label each image clearly, such as image A and image B, and state the comparison goal. Ask the model to describe each image separately first, using the same structure, and then list differences by category, such as layout, text, color, objects and state. This two-step approach reduces the tendency to overlook changes or invent differences.
You will learn to request evidence for each difference, with location and a description of both versions, and to separate meaningful changes from irrelevant variation, such as lighting or compression. For before and after comparisons, provide the expected change and ask whether it occurred.
We also discuss limits. Subtle pixel-level differences are often missed, models may report differences that do not exist and alignment problems between images can confuse the analysis. For precision tasks, combine model judgment with deterministic image comparison tools that highlight differences, then ask the model to explain the flagged regions.
Test on image pairs with known differences, including pairs with no real difference, to measure both misses and false alarms.
By the end of this lecture you will be able to design comparison prompts and verify their results.
Improving Visual Accuracy with Cropping, Context, and Verification. When a model misreads an image, you can often fix the problem by changing how you present it. This lecture covers three levers: cropping, context and verification.
Cropping focuses the model on the area that matters and increases the effective resolution of small details. For a dense dashboard or a document photo, send the full image for overall context and then separate crops for specific regions, naming each crop clearly. Enlarging or sharpening a region can also help, though it cannot recover detail that was never captured.
Context improves interpretation. Tell the model what kind of image it is, the domain vocabulary, what normal looks like and what decision the answer supports. Provide legends or reference data when needed, and state known facts so the model does not have to guess.
Verification catches remaining errors. Ask the model to give evidence for each claim, run a second pass that checks the first answer against the image, compare with an alternative model or tool for critical values and flag low-confidence items for people. Use optical character recognition to cross-check text.
You will also learn to measure improvement by testing the same images before and after each change.
By the end of this lecture you will be able to apply these techniques systematically to raise visual accuracy.
Hands-on: Build a visual analyst that interprets screenshots, charts, and product photos. In this exercise you build a reusable visual analysis workflow that handles several kinds of images and returns structured, verifiable results.
The steps I would expect you to follow are these. First, collect a small set of sample images, such as a screenshot of an application error, a chart with labeled values and a product photo, using public or synthetic content. Second, write a routing prompt that classifies each image by type. Third, write a specialized prompt for each type that requests observations, evidence locations, interpretation and uncertainty in a JSON structure. Fourth, validate the output with a schema and check extracted chart values against the known data. Fifth, add a verification pass that reviews the first answer against the image and flags unsupported claims. Sixth, test with cropped and uncropped versions and compare accuracy.
Record the results in a table and note which techniques improved reliability. Do not upload sensitive images.
Save the images, prompts, schema and accuracy table in one project folder, so that you can rerun the whole workflow when a model changes and see immediately whether reliability has improved or slipped.
By the end of this lab you will have a working visual analyst, a set of tested prompts and evidence about how cropping, context and verification affect accuracy.
This course contains the use of artificial intelligence.
Master Advanced Prompt Engineering, Context Engineering, Structured Outputs, Prompt Chaining, and Multimodal AI
Artificial Intelligence is evolving beyond simple text prompts. Are you ready to move beyond basic prompting and build intelligent, reliable, multimodal AI workflows?
Welcome to Advanced Prompt Engineering: Multimodal AI Workflows, a practical course designed to help you master advanced prompting techniques, context engineering, multimodal artificial intelligence, and AI workflow automation.
Whether you're an AI Engineer, Prompt Engineer, Software Developer, Product Manager, Data Scientist, or Generative AI enthusiast, this course will help you develop the skills needed to design sophisticated AI interactions and applications.
Instead of simply learning how to write better prompts, you'll discover how to build structured, reusable, and measurable AI prompting systems that work with text, images, PDFs, documents, audio, and video.
What You'll Learn
Throughout this course, you'll explore:
Advanced Prompt Engineering: Master reusable prompt templates, few-shot prompting, role-based instructions, constraint-based prompting, and iterative prompt refinement.
Context Engineering: Learn context window management, context optimization, information prioritization, conversation memory, and long-context prompting.
Structured AI Outputs: Generate machine-readable responses using JSON, JSON Schema, output validation, and structured data extraction.
Prompt Chaining: Build multi-step AI workflows using sequential prompts, conditional logic, parallel execution, and task decomposition.
Multimodal Prompt Engineering: Design effective prompts for image understanding, visual question answering, document intelligence, audio analysis, and video understanding.
Document AI: Analyze PDF files, research papers, business reports, contracts, tables, and presentations using Generative AI.
Image Prompting: Extract insights from screenshots, dashboards, charts, photographs, and visual information.
Audio and Video Prompting: Explore speech transcription, meeting summarization, speaker identification, video summarization, and timestamp-based analysis.
Retrieval-Augmented Generation (RAG): Understand grounded prompting, evidence extraction, source attribution, and document-based question answering.
Agentic AI and Tool Calling: Explore prompt design for AI agents, automated tool execution, and multi-step intelligent workflows.
AI Evaluation and Security: Learn prompt testing, hallucination detection, prompt injection prevention, guardrails, and reliability optimization.
Learn Through Real-World Hands-On Projects
This isn't just another theoretical Generative AI course.
You'll complete practical exercises involving prompt optimization, JSON extraction, document analysis, image interpretation, meeting intelligence, video processing, and AI workflow orchestration.
You'll also explore popular tools and technologies, including ChatGPT, Claude, Google Gemini, Python, Ollama, and open-source large language models (LLMs), with techniques that can transfer across platforms.
Your final capstone project brings everything together: designing an end-to-end multimodal AI analysis system that processes different input types, extracts insights, validates outputs, and produces structured reports.
Why Take This Course?
Modern AI applications require more than clever instructions. They demand effective context management, dependable structured responses, intelligent prompt workflows, robust evaluation, and responsible handling of multimodal information.
By completing this course, you'll understand how to move from basic AI conversations toward designing production-oriented Generative AI applications.
Whether you're advancing your career in Artificial Intelligence, exploring AI automation, or building your next AI-powered product, this course provides practical techniques you can apply immediately.
Go beyond prompting. Learn to engineer intelligent AI workflows that understand more, process more, and deliver more reliable results.
Enroll today and take your Prompt Engineering and Multimodal AI skills to the next level!