Skip to content

Adding validation summary schema #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions schemas/core/validation-outcome.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
"type": "string",
"description": "The raw, unchanged string content from the LLM call."
},
"validationSummaries": {
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/guardrails-ai/interfaces/main/schemas/core/validation-summary.json"
}
},
"validatedOutput": {
"description": "The validated, and potentially fixed, output from the LLM call after undergoing validation.",
"anyOf": [
Expand Down
34 changes: 34 additions & 0 deletions schemas/core/validation-summary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$id": "https://raw.githubusercontent.com/guardrails-ai/interfaces/main/schemas/core/validator-summary.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ValidationSummary",
"type": "object",
"properties": {
"validatorName": {
"type": "string",
"description": "The class name of the validator.",
"format": "PascalCase"
},
"validatorStatus": {
"type": "string",
"enum": [
"pass",
"fail"
]
},
"failureReason": {
"type": "string",
"description": "The error message indicating why validation failed."
},
"errorSpans": {
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/guardrails-ai/interfaces/main/schemas/core/error-span.json"
}
}
},
"required": [
"validatorName",
"validatorStatus"
]
}