Courseiva
Applications of Foundation ModelseasyMultiple ChoiceObjective-mapped

AIF-C01 Applications of Foundation Models Practice Question

A company is using Amazon Bedrock to generate code snippets. Developers report that the generated code sometimes contains security vulnerabilities. Which action should the team take to mitigate this risk?

⚠ Common exam trap

AWS often tests the misconception that reducing temperature or isolating the environment can fix output quality issues, when in fact only prompt-level guidance directly addresses the model's generation behavior.

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

Add a system prompt that instructs the model to follow security best practices and avoid known vulnerabilities.

Adding a system prompt that instructs the model to follow security best practices and avoid known vulnerabilities directly influences the model's output at inference time. Amazon Bedrock supports system prompts that act as high-level instructions to guide the foundation model's behavior, making this a proactive, scalable mitigation that does not require manual intervention or architectural changes.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Deploy the model in a sandbox environment to limit its access to sensitive systems.

    Why it's wrong here

    Sandboxing prevents exploitation but does not stop the model from generating vulnerable code.

  • Implement a manual code review process after generation.

    Why it's wrong here

    Code review is important but is a detection measure; it's better to prevent vulnerabilities at generation time.

  • Add a system prompt that instructs the model to follow security best practices and avoid known vulnerabilities.

    Why this is correct

    A system prompt sets expectations and can reduce the likelihood of insecure code generation.

  • Reduce the temperature parameter to 0 to make the output deterministic.

    Why it's wrong here

    Low temperature may produce repetitive code but does not inherently improve security.

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 →

How Courseiva writes practice questions · Editorial policy

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.