Testing, validation, and troubleshooting
AWS Certified Generative AI Developer - Professional exam topic, about 11% of the exam. Updated .
Prove it works, then find out why it does not
Traditional tests check exact outputs. GenAI outputs vary, so you measure quality instead of equality. The smallest domain is also the one that decides whether anyone trusts your app after launch.
Evaluating quality
Build a golden dataset of representative prompts with reference answers or rubrics, and run it on every change to prompts, models, chunking or retrieval. Amazon Bedrock Model Evaluation supports automatic evaluation with built-in metrics, human evaluation workflows, and LLM-as-a-judge, where a stronger model scores outputs for things like correctness, completeness and helpfulness. RAG evaluations score retrieval and generation separately, because a bad answer can come from either. For agents, measure task completion, tool selection and reasoning quality across steps, not only the final text.
Compare options with A/B and canary tests, and weigh quality against latency and token cost. Collect user feedback (ratings, annotations) and feed it back into the dataset. Turn all of it into quality gates in CI so a regression blocks deployment instead of reaching users. Synthetic user workflows against staging catch drift after a model update.
Troubleshooting
Work from the outside in. Truncated answers point at maxTokens or the context window. A ValidationException about input length means the prompt overflowed the model's context, so shrink history, retrieve fewer chunks or chunk differently. ThrottlingException means quota or burst limits, so use backoff, request an increase or add Cross-Region inference. Malformed JSON points at missing schema enforcement, so use tool-based structured output and validate.
When answers are wrong, check retrieval before blaming the model. Read the logged prompt, look at which chunks were retrieved, and test queries against the vector store directly. Poor chunking, mismatched embedding models, missing metadata filters and stale indexes cause most hallucinations. Only then iterate on the prompt, and keep each version testable. Logs Insights, X-Ray and invocation logs are your detective kit.