AIF-C01 Fundamentals of Generative AI Practice Question
A team is using Amazon Bedrock with a Claude model and wants to ensure responses adhere to a specific output format such as JSON. Which technique should be applied?
⚠ Common exam trap
Candidates may confuse guardrails (which enforce content safety policies) with output formatting controls, or assume that RAG or fine-tuning are necessary for simple structural constraints, when in fact a well-crafted system prompt is the standard and most efficient approach.
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
✓
Include a system prompt with explicit formatting instructions
Amazon Bedrock with Claude models supports system prompts that can include explicit formatting instructions, such as 'Respond in valid JSON format.' This technique directly controls the model's output structure without requiring external tools or retraining, making it the simplest and most effective method for enforcing a specific output format like JSON.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use a retrieval-augmented generation (RAG) approach
Why it's wrong here
RAG adds context but does not enforce output format.
- ✗
Attach a guardrail with a JSON schema
Why it's wrong here
Guardrails apply content filtering and safety policies, not output schema enforcement, so a JSON schema attached there will not constrain the model's response structure. It is tempting because guardrails sound like output control, but they are the right choice for blocking harmful or denied topics.
- ✓
Include a system prompt with explicit formatting instructions
Why this is correct
A system prompt supplies persistent instructions that condition every response, so Claude structures output as JSON rather than prose. This constrains generation at inference time, satisfying the requirement for enforcing a specific output format without retraining or fine-tuning the model.
- ✗
Customize the model with a JSON training dataset
Why it's wrong here
Fine-tuning with a JSON dataset teaches stylistic patterns but cannot guarantee every response validates against a schema, and it is costly and slow. It is tempting because training on examples feels like enforcement, but it is the correct choice when adapting tone or domain behaviour, not format compliance.
Go deeper
Related to this question
About these practice questions
This AIF-C01 question is part of Courseiva's 862-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.