Skip to content

Domain 2: Fundamentals of Generative AI (24%) โ€‹

โ† Domain 1 ยท Next Domain โ†’


2.1: What is Generative AI? โ€‹

Traditional ML: Analyzes and classifies (discriminative)

  • Input: Email โ†’ Output: Spam/Not Spam

Generative AI: Creates new content (generative)

  • Input: "Write a poem about clouds" โ†’ Output: Original poem

Key Concepts โ€‹

GenAI Core Concepts

1 / 4
โ“

What is a Token?

(Click to reveal)
๐Ÿ’ก
Basic unit of text for LLMs
Roughly 1 token โ‰ˆ 0.75 words
Example: "Hello world" = 2 tokens
Affects cost and processing.

Foundation Models (FMs) โ€‹

  • Large models trained on vast amounts of data
  • Can perform multiple tasks without task-specific training
  • Examples: GPT-4, Claude, Llama, Stable Diffusion

Large Language Models (LLMs) โ€‹

  • Foundation models specifically for text
  • Trained on text from books, websites, articles
  • Understand and generate human-like text

Transformers โ€‹

  • Architecture behind modern LLMs
  • Key innovation: Attention mechanism
    • Allows model to focus on relevant parts of input
    • Enables understanding of context

2.2: Capabilities and Limitations โ€‹

Capabilities of Generative AI โ€‹

Text Generation:

  • โœ… Write articles, stories, emails
  • โœ… Summarize documents
  • โœ… Translate languages
  • โœ… Answer questions

Code Generation:

  • โœ… Write code from descriptions
  • โœ… Debug and explain code
  • โœ… Generate unit tests

Reasoning:

  • โœ… Multi-step problem solving
  • โœ… Chain-of-thought reasoning
  • โœ… Mathematical calculations (with limitations)

Few-Shot Learning:

  • โœ… Learn from just a few examples in prompt
  • โœ… Adapt to new tasks without retraining

Multimodal:

  • โœ… Process text + images
  • โœ… Generate images from text
  • โœ… Understand and describe images

Limitations of Generative AI โ€‹

GenAI Limitations

1 / 3
โ“

What is Hallucination in GenAI?

(Click to reveal)
๐Ÿ’ก
Generating false or nonsensical information presented as fact
Why: Model predicts next token, not accessing knowledge database
Mitigation: Use RAG, implement guardrails, human review.

Critical Exam Concept: Hallucinations

Hallucination: When model generates false or nonsensical information presented as fact.

Why it happens:

  • Model is predicting next token, not accessing knowledge database
  • Trained to be helpful and complete responses
  • No built-in fact-checking

Mitigation:

  • Use RAG to provide factual context
  • Implement guardrails
  • Human review for critical applications

Other Limitations:

  1. Training Data Cutoff

    • Models don't know events after training
    • Solution: Use RAG for current data
  2. Context Window Limits

    • Can't process extremely long documents
    • Solution: Chunking, summarization
  3. Computational Cost

    • Expensive to train and run
    • Larger models = higher cost
  4. Bias in Training Data

    • Reflects biases in training data
    • Solution: Careful data curation, testing
  5. No Real-Time Data

    • Can't access internet or databases
    • Solution: RAG, function calling
  6. Lack of True Understanding

    • Pattern matching, not reasoning
    • Can make logical errors

2.3: AWS Generative AI Services โ€‹

Amazon Bedrock โ€‹

Fully managed service to access foundation models via API

Key Features:

  • Multiple model providers (Anthropic, AI21, Cohere, Meta, Stability AI, Amazon)
  • Pay-per-use pricing
  • No infrastructure management
  • Data privacy (your data doesn't train models)

Bedrock Models

1 / 3
โ“

Which Bedrock model has the longest context window?

(Click to reveal)
๐Ÿ’ก
Anthropic Claude
200K token context window
Best for: Long document analysis, reasoning, code generation.

Models Available:

ProviderModelStrengths
AnthropicClaudeLong context (200K), reasoning, code
AmazonTitan TextCost-effective, AWS-optimized
AmazonTitan EmbeddingsText embeddings for search
AmazonTitan Image GeneratorImage generation
AI21 LabsJurassicMultilingual text
CohereCommandText generation, summarization
MetaLlama 2Open-source, customizable
Stability AIStable DiffusionImage generation

Use Cases:

  • Chatbots and virtual assistants
  • Content generation
  • Document summarization
  • Code generation
  • Image generation

Amazon Q โ€‹

AI-powered assistant for business

Capabilities:

  • Answer questions about your business data
  • Generate content
  • Summarize documents
  • Connect to enterprise data sources

Use Cases:

  • Internal knowledge base queries
  • Customer support
  • Employee assistance
  • Business intelligence

Amazon CodeWhisperer โ€‹

AI coding companion

Features:

  • Real-time code suggestions
  • Supports multiple languages (Python, Java, JavaScript, etc.)
  • Security scanning
  • Reference tracking (avoids IP issues)

Use Cases:

  • Accelerate development
  • Learn new APIs
  • Generate boilerplate code
  • Unit test generation

โ† Domain 1 ยท Next Domain โ†’

Happy Studying! ๐Ÿš€ โ€ข Privacy-friendly analytics โ€” no cookies, no personal data
Privacy Policy โ€ข AI Disclaimer โ€ข Report an issue