Courseiva
Implementing AI SolutionshardMultiple ChoiceObjective-mapped

AI0-001 Implementing AI Solutions Practice Question

A team is evaluating an LLM-based code generation assistant. They want to measure the quality of generated code for correctness, security, and efficiency. Which evaluation framework is BEST suited for this task?

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

Pass@k metric using unit tests from benchmarks like HumanEval

HumanEval and similar frameworks (e.g., MBPP) use unit tests to automatically assess functional correctness of generated code, which is the most objective measure for code generation tasks.

Answer analysis

Option-by-option breakdown

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

  • Human evaluation by a panel of experienced developers

    Why it's wrong here

    Human evaluation is subjective, expensive, and not scalable for continuous evaluation.

  • Pass@k metric using unit tests from benchmarks like HumanEval

    Why this is correct

    Pass@k measures the probability that any of k generated samples pass a set of unit tests, directly assessing correctness.

  • Perplexity of the model on a code corpus

    Why it's wrong here

    Perplexity measures language modeling ability but does not directly evaluate correctness or security of generated code.

  • BLEU score comparing generated code to reference code

    Why it's wrong here

    BLEU measures n-gram overlap, which is poor for code; syntactically different but functionally correct code would score low.

About these practice questions

One of 754 original AI0-001 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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 AI0-001 practice question is part of Courseiva's free CompTIA 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 AI0-001 exam.