Skip to content
calwm

Applications of foundation models

AWS Certified AI Practitioner exam topic, about 28% of the exam. Updated .

The Case Files: play by chapter

  1. Chapter 1: Choosing the approach

    2 questions

  2. Chapter 2: Asking the right way

    2 questions

  3. Chapter 3: Teaching it the language

    1 question

  4. Chapter 4: Is it any good?

    2 questions

Storyline: The Case Files

A law firm builds an AI assistant for its lawyers and learns how to ground it, prompt it, teach it the firm's language, and prove it works.

The firm is Calder & Wright, with 200 people. You meet Hannah (managing partner, wants answers lawyers can trust at a sensible cost), Omar (ML engineer, builds the assistant), Grace (knowledge manager, owns the policies and precedents) and Luis (paralegal, tests it every day). Across four chapters, you are their advisor.

Chapter 1: Choosing the approach

When knowledge changes often, don't bake it into the model. Retrieval Augmented Generation (RAG) looks up the relevant documents at question time and adds them to the prompt; Amazon Bedrock Knowledge Bases manages this, with citations. Customising the model costs more as you go deeper: in-context learning and RAG cost least, fine-tuning and continued pre-training more, and pre-training from scratch by far the most. Inference parameters shape the output: a lower temperature gives more consistent, deterministic answers; a higher one gives more variety.

Chapter 2: Asking the right way

A prompt combines instructions, context, examples and input. Zero-shot prompts give instructions only; few-shot prompts add worked examples, which is the quickest way to pin down a format. Chain-of-thought asks the model to reason step by step. Treat prompts like code: Amazon Bedrock Prompt Management stores, tests and versions them, so you know what's live and can roll back.

Chapter 3: Teaching it the language

Continued pre-training trains a foundation model further on large amounts of unlabelled domain text, so it learns the vocabulary. Fine-tuning uses labelled input-output examples to teach a specific task. RLHF aligns behaviour using people's ratings, and distillation transfers ability from a large model to a smaller, cheaper one.

Chapter 4: Is it any good?

Compare generated text with human references: ROUGE for summaries, BLEU for translation, BERTScore for meaning. At scale, LLM-as-a-judge scores responses against criteria such as helpfulness and correctness (for example with Amazon Bedrock Model Evaluation), while people review a sample. Tie it back to the business with measures such as task completion, user satisfaction and cost per interaction.