Applications of Foundation Models
Choosing, prompting, customizing and evaluating foundation models, and the designs that put them to work.
3.1Task
Describe design considerations for applications that use foundation models (FMs).
You should be able to: Choose a foundation model, tune its responses with inference parameters, ground it with RAG and vector stores, and compare ways to customize it.
3.1Task
Describe design considerations for applications that use foundation models (FMs).
You should be able to: Choose a foundation model, tune its responses with inference parameters, ground it with RAG and vector stores, and compare ways to customize it.
- Choosing a foundation modelThe checklist for picking a foundation model: cost, modality, latency, language, size, customization, length and caching.
- Inference parametersSettings you change at request time, such as temperature, that make answers steadier or more creative.
- Retrieval Augmented Generation (RAG)Look up facts first, add them to the prompt, then let the model answer from them.
- Amazon Bedrock Knowledge BasesManaged RAG: Bedrock reads your documents, stores them as vectors and retrieves them for the model.
3.1 Describe design considerations for applications that use foundation models (FMs).
- Vector databasesA store that finds items by meaning, which RAG needs to look up the right passages.
Amazon OpenSearch ServiceSearch and analytics engine that can also store embeddings and run vector search.
Amazon AuroraManaged relational database whose PostgreSQL edition can store vectors next to your rows.
Amazon NeptuneGraph database used for graph-based RAG and for vector search over connected data.
Amazon RDSManaged relational databases; Amazon RDS for PostgreSQL can store embeddings.
- Customization cost tradeoffsFive ways to adapt a model, from cheapest to costliest, and when each one is the answer.
- AI agentsA foundation model that plans, calls tools and takes actions to finish a goal.
Amazon Bedrock AgentsA managed agent in Amazon Bedrock: the model plans the steps, calls your APIs and looks up your documents.
3.1 Describe design considerations for applications that use foundation models (FMs).
3.2Task
Choose effective prompt engineering techniques.
You should be able to: Write prompts that work, name the main techniques, and know the risks and how Amazon Bedrock Prompt Management helps.
3.2Task
Choose effective prompt engineering techniques.
You should be able to: Write prompts that work, name the main techniques, and know the risks and how Amazon Bedrock Prompt Management helps.
- Prompt engineeringSteer a foundation model with better instructions, without training it.
- Parts of a promptThe building blocks of a prompt: instruction, context, input data, output format and negative prompts.
- Prompting techniquesZero-shot, few-shot, chain-of-thought, negative prompts, templates, roles, chaining and ReAct, with one clue each.
- Prompt best practicesHabits that raise answer quality: be specific, keep it short, give examples, test and add guardrails.
3.3Task
Describe the training and fine-tuning process for FMs.
You should be able to: Describe how a foundation model is trained, the ways to fine-tune it, and how to prepare the data.
3.3Task
Describe the training and fine-tuning process for FMs.
You should be able to: Describe how a foundation model is trained, the ways to fine-tune it, and how to prepare the data.
- Training a foundation modelPre-training, continued pre-training, fine-tuning and distillation: who does what, and what it costs.
- Fine-tuning methodsWays to adapt a pre-trained model: instruction tuning, domain adaptation, transfer learning and continued pre-training.
- Preparing fine-tuning dataCuration, governance, size, labeling and representativeness: what makes training data good.
- RLHFReinforcement learning from human feedback: people rank answers and the model learns to give the kind they prefer.
- Model distillationA large teacher model trains a small student model that is faster and cheaper to run.
3.4Task
Describe methods to evaluate FM performance.
You should be able to: Measure a foundation model and the applications built on it, with human review, benchmarks, metrics and business measures.
3.4Task
Describe methods to evaluate FM performance.
You should be able to: Measure a foundation model and the applications built on it, with human review, benchmarks, metrics and business measures.
- Ways to evaluate a modelHuman review, benchmark data sets and automatic scoring: what each one is for.
- Amazon Bedrock Model EvaluationRun automatic, human or LLM-as-a-judge evaluation jobs on models, and evaluate knowledge bases.
- FM metrics: ROUGE, BLEU, BERTScore and benchmarksScores for the text a model writes: ROUGE, BLEU, BERTScore, perplexity and named benchmarks.
- LLM-as-a-judgeOne model grades another model's answers, with scores and reasons.
3.4 Describe methods to evaluate FM performance.
- Judge metrics: correctness, completeness and moreThe built-in scores a judge model gives in Amazon Bedrock, from correctness and completeness to harmfulness, plus the RAG metrics.
- Evaluating RAG, agents and workflowsTest each part of an FM application: retrieval, generation, agent actions and the whole workflow.
- Business objective metricsMeasure whether a model helps the business: productivity, engagement, task completion, satisfaction and cost.