Exams / AIF-C01 / D4 Applications of Foundation Models
D4.4
Applications of Foundation Models (part 4 of 6)
- Exam domain: Applications of Foundation Models
Improving an FM on Amazon Bedrock
Amazon Bedrock "is a fully managed service that provides secure, enterprise-grade access to high-performing foundation models from leading AI companies, enabling you to build and scale generative AI applications."
| Need | Technique | Why |
|---|---|---|
| Better answers, lowest cost | Prompt engineering | "High-quality prompts condition the" model; no training |
| Fresh or private data (inventory, policies) | RAG / knowledge base | Retrieves external data at query time, no retraining |
| Better on specific tasks with labeled examples | Fine-tuning | Labeled input/output pairs |
| Domain knowledge or updates from unlabeled text | Continued pre-training | "extends the pre-training phase" of the FM with unlabeled text |
| Customized elsewhere (SageMaker AI) | Custom Model Import | Imports the model into Bedrock |
| Serve a Bedrock custom model | Provisioned Throughput | Dedicated capacity at a fixed cost |
- Evaluation datasets for Bedrock live in Amazon S3 (JSON Lines).
- Metrics: ROUGE for summarization, BLEU for translation. RMSE is regression, F1 classification.
Agents and knowledge bases
- Agent orchestration "Interprets the user input, invokes action groups and queries knowledge bases".
- Action group = OpenAPI schema + Lambda function.
- Multi-step workflow with tools (query, create CSV, upload to S3) = agent. Lookup of documents = agent + knowledge base.
Choosing the right AWS AI service
| Task | Service |
|---|---|
| FMs as an API | Amazon Bedrock |
| Text to SQL / code | LLM (GPT-style transformer) |
| Graph ML, fraud patterns | Amazon Neptune ML |
| Human data labeling | SageMaker Ground Truth |
| No-code ML | SageMaker Canvas |
| Prebuilt ML solutions | SageMaker JumpStart |
| Managed model hosting | SageMaker endpoint |
| Charts from natural language | Amazon Q in QuickSight |
| Coding help, AWS Glue help | Amazon Q Developer |
| Translate text | Amazon Translate |
| Call audio to text and insights | Amazon Transcribe (Call Analytics) |
| Clinical notes from conversations | AWS HealthScribe |
| Images from text | Diffusion model |
| Locate objects in images | Object detection (Rekognition labels) |
| Text + image input | Multimodal LLM (Nova Lite; Nova Micro is text-only) |
Exam traps
- "Retrain" or "train a new FM" is almost never the cost-effective answer.
- Labeled data = fine-tuning; unlabeled data = continued pre-training.
- Rapidly changing data = RAG, not training.
- Nova Micro is text-only; image or video input needs Nova Lite or higher.
- A custom Bedrock model cannot be invoked without Provisioned Throughput.
- Business-impact metrics (conversion rate) beat engagement or technical metrics.
Docs
- https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html
- https://docs.aws.amazon.com/nova/latest/userguide/nova-cpt.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-prompt-engineering.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/agents-how.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/custom-model-use-pt.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
- https://docs.aws.amazon.com/nova/latest/userguide/what-is-nova.html