What Is Generative AI?
Traditional AI classifies or predicts: "Is this email spam or not?" Generative AI creates entirely new content: "Write a marketing email for this product."
Generative AI produces novel content — text, images, code, music, video — that didn't exist before.
---
Understanding Large Language Models (LLMs)
LLMs are the core technology behind generative AI. They learn by reading vast amounts of text and predicting "what word comes next?" After training, they can generate fluent, contextual text on almost any topic.
Parameters represent the knowledge the model has internalized during training. More parameters generally means more capability but requires more compute.
Foundation Models (FMs) are large, general-purpose AI models pre-trained on massive datasets. They can perform many tasks (writing, translation, summarization, code generation) and can be fine-tuned for specific domains. Training them costs millions to billions of dollars, making third-party access via Amazon Bedrock the practical choice.
---
Amazon Bedrock In Depth
Amazon Bedrock provides access to multiple foundation models through a single API.
Available Models
| Provider | Model | Strength | |---|---|---| | Anthropic | Claude series | Long documents, safety | | Amazon | Titan series | Text, embeddings, images | | Meta | Llama series | Open-source based | | Mistral AI | Mistral series | Lightweight, high-performance | | Stability AI | Stable Diffusion | Image generation | | Cohere | Command series | Enterprise text |
Key Bedrock Features
Model Invocation: Generate text, summaries, translations via API Knowledge Base: Connect enterprise documents for RAG; auto-implements retrieval-augmented generation Agents: Autonomous multi-step task execution with API calls Model Evaluation: Compare and benchmark model responses automatically Guardrails: Filter harmful content, block topics, ensure policy compliance
---
Prompt Engineering Basics
A prompt is the instruction you give an AI. The same model produces very different results based on how you write the prompt.
Key Prompting Techniques
| Technique | Description | Example | |---|---|---| | Zero-shot | Direct instruction, no examples | "Summarize this text" | | One-shot | One example provided | "Summarize like this: [example]" | | Few-shot | Multiple examples provided | "Write like these 3 examples" | | Chain-of-Thought | Induce step-by-step reasoning | "Think step by step" | | System Prompt | Set the model's role and behavior | "You are a friendly customer service agent" |
Hallucination
LLMs sometimes generate plausible-sounding but false information. Mitigations: use RAG to ground answers in documents, instruct the model to say "I don't know," and use Bedrock Guardrails.
---
RAG (Retrieval-Augmented Generation)
RAG overcomes LLM limitations by combining search with generation.
LLM limitations: doesn't know events after training cutoff, doesn't know enterprise-internal information, can hallucinate.
RAG workflow: User question Convert to embedding vector Search vector database for relevant documents Pass retrieved documents + question to LLM LLM generates accurate answer grounded in the documents
AWS implementation: Amazon Bedrock Knowledge Base + Amazon OpenSearch Serverless or Aurora (vector store).
---
Fine-tuning vs RAG
| Aspect | Fine-tuning | RAG | |---|---|---| | Method | Updates model weights | Retrieves and references external docs | | Cost | High (retraining needed) | Relatively low | | Fresh info | Requires retraining | Update docs only | | Best for | Specific style/domain knowledge | Latest info, enterprise documents | | AWS tool | Bedrock Model Customization | Bedrock Knowledge Base |
!Fine-tuning versus RAG compared side by side
Ethics and Responsible AI
Key risks: Bias: training data biases reflected in outputs Hallucination: generating false information Privacy: potential leakage of sensitive data Copyright: unclear ownership of AI-generated content Deepfakes: realistic fake content generation
AWS mitigation tools: Bedrock Guardrails: block harmful content and topics Bedrock Model Evaluation: assess bias and quality Amazon Macie: detect sensitive data in S3 AWS AI Service Cards: transparency documentation
---
Exam Key Takeaways
Generative AI = creates new content (text, images, code) LLM = language model trained on massive text data Foundation Model (FM) = general-purpose pre-trained model; accessed via Bedrock Bedrock Knowledge Base = RAG implementation for enterprise documents Bedrock Agents = autonomous multi-step task execution Bedrock Guardrails = harmful content filtering Zero/One/Few-shot = classification by number of examples in prompt Chain-of-Thought = step-by-step reasoning prompt Hallucination = AI generating false information RAG = retrieval + generation (best for latest/internal info) Fine-tuning = weight update (best for specific style/domain) Responsible AI risks: bias, hallucination, privacy, copyright