AIF-C01 Applications of Foundation Models Practice Question
A company is using Amazon Bedrock to build a text-to-SQL application. They want to ensure that the generated SQL queries are valid and safe. Which approach is BEST?
⚠ Common exam trap
The AIF-C01 exam often tests the misconception that fine-tuning or output length limits can solve safety and validity requirements, when in fact guardrails are the purpose-built AWS service for content filtering and validation at inference time.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Configure a guardrail to filter and validate the generated SQL
Amazon Bedrock guardrails provide a native, configurable mechanism to filter and validate model outputs, including SQL queries, against defined policies such as regex patterns, denied topics, and content filters. This approach directly addresses both validity and safety without requiring additional model training or external validation services, making it the most integrated and efficient solution for ensuring generated SQL is syntactically correct and free of harmful operations like DROP or DELETE.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Fine-tune the model on a dataset of valid SQL queries
Why it's wrong here
Fine-tuning improves accuracy but does not guarantee safety.
- ✗
Use a separate model to validate the SQL after generation
Why it's wrong here
Post-generation validation adds latency and may not catch all issues.
- ✓
Configure a guardrail to filter and validate the generated SQL
Why this is correct
Guardrails can enforce rules and reject invalid queries.
- ✗
Limit the max_tokens to 50 to reduce complexity
Why it's wrong here
Token limit does not ensure SQL validity.
Go deeper
Related to this question
About these practice questions
This AIF-C01 question is part of Courseiva's 619-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AIF-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AIF-C01 exam.