AAIA study materials
AAIA study resources

AAIA: Fundamentals of Generative AI

AAIA · Work through your exam, one topic at a time.

All guide sections

Fundamentals of Generative AI

What this domain tests

How foundation models are built and how their controls affect cost, latency, and quality - plus when Bedrock, SageMaker JumpStart, or a prebuilt generative feature is the right vehicle.

Core rules

  • Transformers use self-attention to weigh relationships among all tokens at once. Tokens are subword units; the context window caps combined input and output length.
  • Pre-training learns general patterns from massive text; fine-tuning adapts weights to a domain; instruction tuning and RLHF align responses with human preference.
  • Embeddings are dense vectors where semantic similarity maps to geometric closeness - the basis of semantic search and RAG.
  • Sampling controls: higher temperature and top-p increase randomness and creativity; lower them for deterministic extraction. Max tokens caps output length and therefore cost.
  • Hallucination is fluent but unsupported output; mitigate with grounding (RAG), guardrails, and low temperature rather than longer prompts alone.
  • Diffusion models generate images by iterative denoising; latent diffusion works in compressed space for speed.

Worked example

A team needs short, consistent JSON extracted from invoices at low cost. Reasoning: determinism matters, so temperature near zero; the task is narrow, so prompt engineering comes before fine-tuning; volume is high, so a smaller mid-tier model beats a frontier model on cost per token; grounding is unnecessary because the source text is supplied. Choose Bedrock with a small model, near-zero temperature, and a strict JSON schema in the prompt.

Traps

  • Believing a larger model is always better.
  • Confusing fine-tuning (changes weights) with RAG (changes context).
  • Assuming Bedrock trains base models on your prompts - it does not.
  • Forgetting that tokens drive both billing and context limits.