1. Foundation Models vs LLMs

Foundation models are massive neural networks trained on diverse data (text, code, audio, video, images) so they can be adapted to many downstream tasks. Large Language Models (LLMs) are a subset focused on token-based language tasks. Use the matrix below for quick exam recall.

Dimension Foundation Model Large Language Model (LLM)
Scope Multi-modal (text, audio, image, video, code) or unimodal Primarily language + code; some add image adapters
Training Task Generic self-supervised objectives (masking, contrastive learning, etc.) Autoregressive next-token prediction
Input / Output Any supported modality, embeddings, or metadata Tokens (text/code) with optional tool-calls
Adaptation Task-specific fine-tuning, adapters, RLHF Prompting, instruction tuning, RLHF, guardrails
Use Cases Vision, audio, multi-modal search, robotics Chatbots, Q&A, summarization, agents, code-gen

2. Training Hyperparameters You Must Know

Remember: adjusting these three knobs is often enough to fix unstable training before you consider changing the model architecture.


3. Why Transformers Matter

Transformers replaced recurrent networks by relying on self-attention, which lets every token weigh every other token in the sequence to build contextual embeddings. Positional encodings preserve word order, and encoder/decoder stacks process inputs in parallel so latency scales well on GPUs. This architecture powers modern translation, summarization, speech, and vision-language models—and is the backbone of Bedrock and SageMaker JumpStart offerings.


4. Steering LLM Output

Exam tip: Control hallucinations by lowering temperature/top-p and grounding answers with retrieved context.


5. Retrieval-Augmented Generation (RAG)

RAG keeps foundation models up to date without re-training:

  1. Ingest documents (PDFs, FAQs, catalogs) and chunk them with metadata.
  2. Create embeddings and store them in a vector index such as OpenSearch Serverless, Aurora Postgres + pgvector, or Knowledge Bases for Amazon Bedrock.
  3. When the user asks a question, retrieve the most relevant chunks.
  4. Pass the question + retrieved context to the LLM so the answer cites fresh data.

This pattern is cheaper than fine-tuning every time the knowledge base changes and is the default recommendation on the exam for “most current answers at low cost.”

Exam tip: Always justify RAG when the requirement is “fresh data without retraining.”


6. Specializing a Foundation Model

6.1 Domain Adaptation Fine-Tuning

6.2 Continued Pre-Training

Exam tip: choose fine-tuning for adapting behavior on known tasks; choose continued pre-training when the base knowledge is insufficient.


7. Embeddings and BERT

Embedding models convert words, sentences, or images into dense vectors so that similar items land close together in multi-dimensional space. BERT (Bidirectional Encoder Representations from Transformers) generates contextual embeddings by looking at words both before and after the target token. Because embeddings change with context, BERT excels at intent detection, entity recognition, and semantic search where static word vectors fail.


8. AWS AI Services Cheat Sheet

Service Category What to Remember
Amazon Bedrock Foundation Models Serverless access to Titan, Anthropic, Meta, Cohere, Mistral models; built-in RAG and guardrails.
Amazon SageMaker Build/Train/Deploy Custom training, fine-tuning, autopilot, and JumpStart model zoo.
Amazon Transcribe Speech-to-Text Streaming/batch transcription with channel identification and redaction.
Amazon Comprehend Natural Language Entity detection, sentiment, key phrases, PII redaction; supports custom classification.
Amazon Rekognition Vision Image/video labels, face search, unsafe content, text detection.
Amazon Textract Document AI Structured extraction (forms, tables) beyond OCR.
Amazon Polly Text-to-Speech Neural voices, Speech Marks for lip-sync, Lex integration.
Amazon Lex Conversational Build chat/voice bots with slots, Lambda fulfillment, multi-lingual support.
Amazon Translate Machine Translation Real-time and batch translation with active custom terminology.

Exam tip: Know the basic capability of each managed AI service—questions often ask you to swap Rekognition (vision) vs Textract (document parsing) vs Comprehend (text NLP).

9. LLM Conversation Flow Diagram

Use this UML snippet to visualize how user prompts move through retrieval, inference, and back to the UI.

llm_conversation_flow
🧠 LLM Conversation Flow

9. Prompt Engineering Essentials

Exam tip: Keep prompts short, move reusable policy text to templates, and cap max_tokens to avoid surprise billing.


10. RAG Architecture & Tuning

rag_architecture
🧱 RAG Architecture

Exam tip: Answer “Use Bedrock Knowledge Bases” whenever the question stresses managed ingestion + retrieval.


11. Agents & Tool Use

agent_tool_chain
🤖 Agent Tool Chain

Exam tip: If the requirement says “call internal APIs and external SaaS with reasoning,” pick Bedrock Agents with Lambda tools.


12. Evaluation & Hallucination Control

Exam tip: When compliance reviewers are mentioned, respond with “human-in-the-loop evaluation plus logged citations.”


13. Responsible AI, Privacy, Security


14. Cost Optimization for GenAI

Exam tip: Mention “use Bedrock serverless invocation + caching” whenever the question references “spiky demand” or “cost control.”


15. Decision Matrix

Approach When to Choose Exam Trigger Words
Prompting General knowledge, low customization, rapid experimentation. “No training budget,” “quick prototype.”
RAG Fresh proprietary data, citations, large document sets. “Latest manuals,” “ground answers,” “no retraining.”
Fine-tuning Strict formats, domain tone, curated labeled data. “Consistent summaries,” “approved style guide.”
Continued Pretraining Missing vocabulary/jargon, massive unlabeled domain corpus. “Industry-specific terms,” “expand base knowledge.”
Agents Multi-step reasoning, tool invocation, integrations. “Plan workflow,” “call APIs,” “take actions.”

Contents