Ordinance answers must retrieve, generate, then schema-validate before residents see them. How should serving be managed?
Select an answer to reveal the explanation.
Short Explanation
Retrieve the ordinance, draft the answer, then stamp the schema—three stations on one factory floor. Wire them as Kubernetes services in an ensemble so nothing skips a checkpoint before residents see it.
Full Explanation
Ordinance answers that must retrieve, generate, then schema-validate before residents see them should be orchestrated as coordinated Kubernetes services in an ensemble workflow so each stage has clear interfaces, retries, and monitoring. Retrieval grounds generation in adopted text; generation drafts the answer; schema validation enforces structure and policy before publication. Collapsing retrieve, generate, and validate into one unmonitored shell script on a laptop loses isolation, scaling, and auditability for civic release gates. Skipping retrieval and validation to generate from empty context invites hallucinations and malformed payloads reaching the public. Validating schema first against no documents, then retrieving after sending the answer, publishes ungounded content and uses validation in the wrong order. Exam caveat: ensemble orchestration adds failure modes between services—define timeouts, dead-letter handling, and whether validation failures regenerate or block the resident response. Operational check: trace a sample ordinance query through retrieve, generate, and validate service spans, inject a schema failure, and confirm the resident-facing path blocks until validation passes while metrics mark the failed stage.