AWSAWS Certified Generative AI Developer - Professional2026-102.1 Implement agentic AI solutions and tool integrations
Validate specialist answers before combining decisions
Completed by the knowledge check
Learning objective
Coordinate specialized FMs or agents with model selection frameworks, ensemble aggregation, and validation of conflicting answers
Core idea
For an architect coordinating specialists, the central decision is whether a request needs one selected foundation model (FM) or several independently evaluated contributions. Routing chooses an eligible responder. An ensemble produces multiple candidates. Aggregation decides what those candidates jointly establish. Validation determines whether any resulting claim deserves acceptance.
These decisions require different contracts. A router’s quality prediction does not validate the answer it selects. Several matching answers do not establish independent evidence if they repeat the same source error. An aggregator must preserve disagreement until an evidence check resolves it or the application chooses a safe terminal outcome.
Coordination topology is covered in 2.1.2. This lesson focuses on model selection and the boundary between specialist outputs and the accepted result. Keep the final decision under an explicit application policy even when an agent proposes which specialist should run next.
How it works
Select only eligible model paths
Start with a selection framework that separates mandatory eligibility from ranking. Mandatory checks include the required modality, interface, tool-use support, processing boundary, and allowed model route. Ranking compares task-specific quality and operating cost among the eligible options. Shortlisting and benchmarking are covered in 1.2.1 and 1.2.2.
Implement a registry of approved task categories and invocation configurations. A Step Functions Task can run a selection Lambda that returns a validated route; the downstream caller sets Bedrock Converse.modelId from that route. Do not accept an arbitrary model identifier generated by the agent. The registry is application configuration, not an AWS API named “model selection framework.”
Strands Agents supports model selection across providers and specialized autonomous tasks. Its documented multi-agent patterns include Swarm, Graph, and Workflow. Those patterns organize collaboration; they do not remove the need to define which model and tools a specialist may use. Keep a specialist’s allowed inputs and output contract narrower than the parent request whenever possible.
Amazon Bedrock intelligent prompt routing provides a managed alternative for a narrower selection problem: routing between exactly two supported models within the same model family. CreatePromptRouter uses models, fallbackModel, and routingCriteria.responseQualityDifference. The fallback model is used when the routing criterion is not met. This is quality-based selection, not your general recovery policy for an unavailable model.
The prompt router predicts response quality and forwards a request to a selected model. It is not a cross-provider specialist dispatcher and does not return an ensemble of answers to compare. Check the documented model-family and Region support before choosing it. Use application coordination when the work requires different domains, tools, or evidence sources.
Collect independent specialist products
Use an ensemble when several contributions can improve a decision enough to justify extra calls. A financial specialist might calculate a total, a policy specialist might identify eligibility, and a risk specialist might identify missing evidence. These are complementary roles, not interchangeable voters.
Step Functions Parallel.Branches runs a fixed set of branches and waits for their completion; use Map when specialists are represented by items in a request-derived dataset. Each branch receives a copy of the state’s input, subject to input filtering, and the state’s result is an array containing the branch outputs. Normalize those outputs into a common application schema before aggregation. Branch-specific prose is difficult to compare reliably.
Include the specialist identity, task version, candidate claims, evidence references, uncertainty, and validation status in that schema. Record which model path actually ran rather than assuming the requested route always identifies the responder. For Bedrock Converse, capture the returned token usage for the execution ledger; see 2.1.7 for shared admission limits.
Decide how branch failures affect the ensemble. An unhandled branch failure fails the entire Parallel state and stops its branches. Invoked Lambda functions can continue running after that failure. If partial results are acceptable, handle eligible errors within each branch and return an explicit unavailable result. Do not turn a failed specialist into an empty successful answer that the aggregator mistakes for agreement.
Validate conflict before aggregation
Apply deterministic checks first. Check required fields, calculate arithmetic from authoritative values, compare dates and units, and reject claims whose cited evidence does not support them. Run these checks in a validation Lambda Task and return application-owned fields such as conflict, validated_claims, and missing_evidence. These fields are your schema, not predefined Step Functions outputs.
Choose an aggregation rule that fits the output. Majority voting can fit comparable classification labels after each vote passes validation. Weighted aggregation requires weights established from representative evaluation, rather than a model’s self-reported confidence. Evidence-based selection fits claims tied to source versions. A synthesis FM can explain accepted contributions, but should receive validated claims rather than being asked to smooth away conflicts in raw answers.
Separate factual disagreement from complementary scope. “The subtotal is 100” and “tax is excluded” may describe the same calculation boundary. “The customer is eligible” and “the policy excludes this customer” cannot both determine an automated decision. Require source date, applicability, and authoritative record identity before treating either as accepted.
A second model can critique an answer, but its criticism remains another candidate product. It cannot make unsupported evidence authoritative. If a bounded recheck cannot resolve a consequential conflict, return uncertainty or request human review. The workflow should preserve which claim failed and why, rather than emitting a confident blended conclusion.
Specialist outputs fan in through normalization and deterministic checks, and only validated claims reach the synthesis FM; a conflict that a bounded recheck cannot resolve goes to uncertainty or human review instead.
Key distinctions and trade-offs
The following choices divide the architecture:
| Choice | Appropriate use | Acceptance boundary |
|---|---|---|
| Application model selection | Different task capabilities or approved model paths | Validated route from trusted configuration |
| Intelligent prompt routing | Quality and cost selection within supported model pairs | One selected response still needs validation |
| Specialist ensemble | Complementary evidence or independent candidate decisions | Normalized, individually checked outputs |
| FM synthesis | Explain accepted specialist contributions | Evidence validation precedes synthesis |
Ensembles add calls and coordination time. Their value depends on useful diversity: different expertise, evidence, or failure modes. Repeating the same prompt against closely related paths can increase agreement without increasing correctness. Measure the accepted result and unresolved-conflict rate against a single-responder baseline.
Architecture / decision scenario
An insurance assistant prepares a claim recommendation. A selection Lambda routes routine policy questions to an approved model configuration. For those eligible requests, a configured Bedrock prompt router can choose between a supported same-family pair. It produces one answer, which still passes evidence validation.
A disputed claim requires an ensemble instead. A Step Functions Parallel state invokes a policy specialist, an invoice specialist, and a coverage-date specialist. Each returns claims and source identifiers under the same schema. The validation task verifies invoice arithmetic and compares the policy’s effective date with the incident date.
The policy specialist cites a version that took effect after the incident. The aggregator rejects that contribution because it does not apply on the incident date; the recommendation lacks a valid policy basis, whatever the other branches say. It performs one budgeted recheck against the applicable policy. If a conflict remains, the workflow sends the case to human review; otherwise, a final FM call explains the accepted evidence. Neither managed routing nor agent coordination overrides the validation gate.
Common exam traps
- Treating intelligent prompt routing as a multi-agent ensemble.
- Assuming routing supports arbitrary cross-provider model pairs.
- Confusing the prompt router’s quality fallback with availability failover.
- Treating majority agreement or self-reported confidence as proof.
- Letting synthesis erase differences in dates, units, or policy applicability.
- Assuming failed
Parallelbranches cancel already running Lambda work.
What to remember
- Filter by eligibility before ranking models.
- Routing selects; ensembles collect; aggregation decides; validation establishes support.
- Preserve evidence identity and disagreement through every specialist boundary.
- Define partial-failure behavior before running parallel work.
- Escalate unresolved consequential conflicts instead of averaging them away.
Knowledge check
A disputed insurance claim needs a policy specialist, an invoice specialist, and a coverage-date specialist, each with its own tools and evidence, and the team must compare their findings. An engineer proposes Amazon Bedrock intelligent prompt routing as the coordinator. Why does that design not fit?
Parallel state, does that work.Three specialists agree that a claim is eligible, and all three cite the same policy revision, which took effect after the incident date. How should the aggregator treat the result?
A Parallel state runs three specialist branches. Partial results are acceptable if they are labeled, but one branch’s Lambda sometimes throws an unhandled error. What should the design do?
Parallel returns the other branches’ outputsParallel state and stops its branches, while invoked Lambda functions can keep running. Handling the error inside the branch keeps the state alive, and an explicit unavailable result keeps the aggregator from reading an empty or borrowed answer as agreement.A team configures a Bedrock prompt router with fallbackModel set to the smaller model of the pair, expecting it to take traffic whenever the larger model is throttled or unavailable. What does the fallback model actually do?
responseQualityDifference . Recovering from an unavailable or throttled model is a separate failover policy the application still needs.