AWS Certified Generative AI Developer – Professional
Bedrock model evaluation: automatic, human, LLM judge (AIP-C01)
Automatic jobs compute fixed algorithmic metrics such as accuracy, robustness and toxicity. Human-based jobs send responses to your own work team to rate. Judge-based jobs use a second LLM to score responses on metrics such as Correctness and Faithfulness. Pick by who must score and whether the score must be deterministic.
Automatic (programmatic) jobs
You pick a task type and metrics, and use a built-in dataset or your own. How a metric is calculated depends on the task type. For text summarization, accuracy is BERTScore, which compares candidate and reference text using BERT embeddings and cosine similarity. For general text generation, accuracy is a real world knowledge score instead.
Robustness perturbs each prompt about 5 times, with lower case, typos, numbers as words, random upper case and whitespace changes, and measures how much the output changes. A lower score is better. Toxicity uses the detoxify algorithm.
Metrics that compare to a ground truth need the referenceResponse key in each prompt record. Example: to score two models against 400 editor-approved court ruling summaries without people or another LLM, run an automatic job per model with the text summarization task type, the accuracy metric, and the approved summaries as referenceResponse.
Human-based jobs
A human-based job sends responses to a work team, such as your own subject matter experts, to rate. You can select up to two inference sources, and one can be a Bedrock model while the other is your own stored responses. That lets specialists compare a Bedrock FM side by side with a self-hosted model's existing outputs.
Judge-based jobs
A second LLM scores each response and explains the score. Built-in metrics include Correctness and Completeness (which use a reference response if you supply one), Faithfulness, Helpfulness, Logical coherence, Relevance, Following instructions, Professional style and tone, Harmfulness, Stereotyping and Refusal. You can also define custom metrics.
Faithfulness identifies whether the response contains information not found in the prompt. It needs no reference answer, so it fits RAG prompts that already contain the retrieved passages.
Evaluation jobs can evaluate foundation models, Marketplace models, customized and imported models, prompt routers and models with Provisioned Throughput.
Where the exam catches people
- Believing the general text generation task type scores summaries against references: its accuracy is a real world knowledge score. The summarization task type uses BERTScore.
- Believing an LLM judge gives the same score every time like an algorithm: use an automatic job when the score must be algorithmic.
- Believing a judge job can take ratings from your specialists: people rating responses is a human-based job with a work team.
- Believing Correctness measures hallucination against the retrieved context: Faithfulness checks for information not found in the prompt.
- Believing a high robustness score is good: robustness measures output change under perturbation, so lower is better.