Skip to content

CICD-431 · Structured output validation ​

Encyclopedia · AI and LLM application pipelines · All snippets

Previous · CICD-430 · Next · CICD-432

1. Where it fits ​

  • Placement CI evaluation run step.
  • Prerequisites approved synthetic evaluation data, authorized model artifacts and pinned runtime tools.
  • Platforms local-linux, github-actions, gitea-actions.

2. Copy the snippet ​

bash
python -m jsonschema -i reports/model-response.json schemas/model-response.schema.json

3. How it works ​

The validator compares the parsed model response with the declared schema. Bad shape or type fails the command before the application trusts the payload.

4. Verify the result ​

Validate the exact parsed output and fail on wrong types or unexpected fields if the schema forbids them.

Validation syntax-validated (Bash parse). Status definitions.