Skip to content
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

Add Validation failure information to Validation Outcome #1085

Merged
merged 15 commits into from
Oct 3, 2024

Conversation

AlejandroEsquivel
Copy link
Contributor

@AlejandroEsquivel AlejandroEsquivel commented Sep 23, 2024

Added:

  • Validation Summaries to Validation Outcome which contains information relating to validator failures, successful validations are omitted due to the fact they don't contain information we are interested in, and in the case of streaming will bloat the validation outcomes in each chunk

Example:

ValidationOutcome(
    call_id='5221586160',
    raw_llm_output='OpenAI is great',
    validation_summaries=[
        ValidationSummary(
            validator_name='RegexMatch',
            validator_status='fail',
            property_path='$',
            failure_reason='Result must match \\(?\\d{3}\\)?-? *\\d{3}-? *-?\\d{4}',
            error_spans=None
        )
    ],
    validated_output='OpenAI is great',
    reask=None,
    validation_passed=False,
    error=None
)

Associated PRs:

Needs to get merged after this is merged:

@AlejandroEsquivel AlejandroEsquivel changed the title wip: validation summary integration Add Validation failure information to Validation Outcome Sep 25, 2024
@zsimjee zsimjee self-requested a review September 30, 2024 17:14
zsimjee
zsimjee previously approved these changes Oct 2, 2024
Copy link
Contributor

@dtam dtam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does async_guard or the other places we yield a ValidationOutcome like in async_stream_runner or stream_runner need updates?

@AlejandroEsquivel
Copy link
Contributor Author

does async_guard or the other places we yield a ValidationOutcome like in async_stream_runner or stream_runner need updates?

so Async Guard should, but ValidationOutcome not yielded yet on streaming (sync/async) that's going to come after (but soon). needs a bit more care to avoid introducing performance issues due to the need to iterate through validation logs in each chunk

@dtam dtam merged commit fe2c0b7 into main Oct 3, 2024
13 checks passed
@dtam dtam deleted the feat/validation-summary branch October 3, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants