guardrails-ai / guardrails

Adding guardrails to large language models.
https://www.guardrailsai.com/docs
Apache License 2.0
3.69k stars 271 forks source link

[feat] Provenance - Add metadata with underlying numbers to the PassResult and FailResult #575

Open zsimjee opened 5 months ago

zsimjee commented 5 months ago

https://github.com/guardrails-ai/guardrails/discussions/574

yadomkar commented 4 months ago

I've updated the validate_each_sentence and validate_full_text methods in the ProvenanceV0 validator to include cosine similarity values in the validation metadata, enhancing validation process with quantitative analysis of text relevance. These changes allow users to access detailed similarity measures directly in the validator_logs, improving transparency and facilitating deeper insights into the validation outcomes.

If this approach proves beneficial, should I consider applying similar updates to ProvenanceV1 as well?

PR Link