↑ ↓ to move, Enter to open, Esc to close

    awsAIF-C01AI Practitioner

    Switch exam

    Microsoft Azure

    aws Amazon Web Services

    Google Cloud

    ServiceNow

    Databricks

    Cisco

    Salesforce

    All exams and search
    Free exam

    Exams / AIF-C01 / D4 Applications of Foundation Models

    D4.3

    Applications of Foundation Models (part 3 of 6)

    • 2 min read
    • 5 sections
    • 33 questions
    • Exam domain: Applications of Foundation Models

    Customizing a foundation model

    "Model customization is the process of providing training data to a model to improve its performance for specific use-cases." Pick the method from the data you have.

    Situation Method
    Labeled prompt/completion pairs, specific task Supervised fine-tuning ("Provide labeled data to train a model to improve performance on specific tasks.")
    Only unlabeled domain text Continued pre-training
    Too little labeled data Data augmentation (synthetic data)
    Human ratings or preferences RLHF ("RLHF incorporates human feedback in the rewards function")
    Knowledge that changes often RAG, no retraining

    Fine-tuning data is a set of records with a prompt field and a completion field. During training, more epochs (passes over the data) raise accuracy until it plateaus; temperature is only an inference setting.

    Fine-tuning versus continued pre-training

    RAG with Amazon Bedrock

    Knowledge Bases implement "the entire RAG workflow, from ingestion to retrieval and prompt augmentation". Documents are chunked, "converted to embeddings", and stored in a vector store; at question time similar chunks augment the prompt. Vector search services: Amazon OpenSearch Service (k-NN by Euclidean distance or cosine similarity).

    RAG flow

    Inference options and tools

    Need Answer
    Many prompts, not urgent Bedrock batch inference ("generate responses asynchronously", output in S3)
    Model chosen per request behind one endpoint Intelligent prompt routing
    Pretrained models, solution templates, notebooks SageMaker JumpStart
    Automated hyperparameter tuning SageMaker automatic model tuning
    Human labeling SageMaker Ground Truth
    Bias detection SageMaker Clarify
    Safeguards for GenAI Bedrock Guardrails
    Human evaluation of outputs Bedrock model evaluation with a work team
    Video generation Amazon Nova Reel
    Multimodal (text, image, video) fine-tunable Amazon Nova Pro
    Coding assistant Amazon Q Developer
    BI executive summaries Amazon Q in QuickSight

    Evaluation metrics

    Metric Use
    ROUGE Word overlap of a summary with a ground-truth summary
    BERTScore Semantic similarity using an ML model
    Inference latency Time to respond

    AI services mapping

    Task Service
    Speech to text, subtitles (WebVTT, SRT) Transcribe
    Text translation Translate
    Text to speech Polly
    Sentiment Comprehend (or an LLM on Bedrock)
    Personalized recommendations Personalize
    Synthetic data GAN (generator + discriminator)

    Exam traps

    • Fine-tuning needs labeled prompt/completion data; Provisioned Throughput is for serving, not training.
    • Unlabeled data points to continued pre-training; scarce labeled data points to augmentation.
    • Subtitles: Transcribe (+ Translate); voice-over: Polly. Translate and Textract never produce speech.
    • Changing FAQ or documents: RAG, not repeated fine-tuning.
    • Video: Nova Reel; images: Nova Canvas or Titan Image Generator; Nova Pro does not generate video.
    • "Fully automated tuning" is SageMaker, not Personalize or Comprehend.
    • A higher CFG scale makes Stable Diffusion follow the prompt more closely (not found in the AWS docs quoted here).

    Docs

    The rest of this chapter is part of the AIF-C01 premium course

    Unlock every chapter, all 555 questions and spaced review with All access or a 90-day exam pass. Every Fundamentals exam stays free, and the first chapter of every exam is open.

    Chapters