AWS Certified AI Practitioner - 24% of exam

Fundamentals of Generative AI

What you will learn

In this domain, you learn the concept of generative AI foundation models, the characteristics of Transformers and LLMs, the basics of prompt engineering, and core technologies such as Retrieval-Augmented Generation (RAG) and fine-tuning. It is a frequently tested domain that accounts for 24% of the AIF-C01 exam and is the central theme of modern AI use.

Key points

  • Foundation Model - a general-purpose model pre-trained on large-scale data that can be repurposed for a variety of tasks
  • Large Language Model (LLM) - a foundation model that handles text. Representative examples include GPT, Claude, and Llama
  • Transformer - an architecture that uses the self-attention mechanism and is the standard structure of today's LLMs
  • Prompt engineering - the technique of designing instructions (prompts) that elicit the desired output from an LLM
  • Zero-shot / few-shot - techniques that have an LLM perform a task with no examples / a few examples
  • RAG (Retrieval-Augmented Generation) - retrieves relevant information from an external knowledge base and adds it to the LLM's prompt to improve the accuracy of answers
  • The difference between fine-tuning and pre-training - pre-training learns from scratch on large-scale data, while fine-tuning additionally trains an existing model for a specific use
  • Hallucination - the phenomenon in which an LLM plausibly generates content that is not factual. It is suppressed with RAG and verification

Terms and concepts

Foundation Model

A large-scale model pre-trained on a large amount of general-purpose data that can be applied to a variety of tasks through fine-tuning or prompts. Its uses are expanding to LLMs for text, image generation, audio, and multimodal applications. With Bedrock, you can use multiple foundation models via an API.

Prompt engineering

The technique of crafting the instructions that elicit the desired output from an LLM. Techniques include specifying a role ("you are a doctor"), specifying the output format ("answer in JSON"), adding examples (few-shot), and prompting step-by-step thinking (Chain-of-Thought).

RAG (Retrieval-Augmented Generation)

A technique that searches an external knowledge base (internal documents, databases, etc.) for information relevant to a question, adds that information to the LLM's prompt, and then generates an answer. It supplements information the LLM lacks or that is outdated, and it can suppress hallucinations. It is implemented in combination with Bedrock Knowledge Bases or Kendra.

Fine-tuning and pre-training

Pre-training is the process of training a foundation model from scratch on large-scale data and requires enormous computational resources. Fine-tuning is the process of additionally training a pre-trained model on a small amount of data from a specific domain (law, medicine, etc.), increasing expertise while keeping costs low.

Hallucination

The phenomenon in which an LLM plausibly generates information not in the training data or content that differs from the facts. The cause lies in the model's nature of generating "the characters most likely to come next." Its impact is mitigated by providing evidence with RAG, validating output with guardrails, and human review.

Check your understanding

Check what you have learned with 5 questions