Conversation
…val output Surfaces overall precision/recall/f1/accuracy (not just per-entity) and the PIIRemover config (entity types, threshold, NLP engine, model, on_fail) used for the run, so metrics.json is self-describing for external readers.
Clarifies that this is PII's overall detection-level score alongside entity_metrics, distinct from the shared compute_binary_metrics() helper used as the sole metric in other eval scripts.
…s output Mirrors the pii_remover eval script, which already records the config used (entity types, threshold, etc.) alongside the metrics for reproducibility. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…valuations Introduces build_validator_config() in common/helper.py, which reads on_fail from validator.on_fail_descriptor (set by every guardrails Validator base class) and normalizes any extra constructor params passed in (enums -> their .value). PII and gender_assumption_bias now use it instead of hand-rolled dicts, and ban_list, lexical_slur, topic_relevance, and toxicity gain a config block in their metrics.json for the first time.
…s to topic relevance eval Lets topic_relevance/run.py target a single validator backend without installing llm_critic, and adds a shared helper to aggregate per-domain binary metrics into one combined report. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: ProjectTech4DevAI/kaapi-guardrails/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--backendflag to the topic relevance eval so a single backend (topic_relevanceortopic_relevance_llm) can be run instead of bothtopic_relevance(theLLMCritic-based validator) is now imported lazily, so--backend topic_relevance_llmworks without thellm_critichub validator installedcombine_binary_metrics()to the shared helper and writes acombined-metrics.jsonaggregating the education + healthcare domain results by summing confusion-matrix countsTest plan
python3 -m app.evaluation.topic_relevance.run --backend topic_relevance_llmcombined-metrics.jsontotals match the sum of the two per-domain metrics files🤖 Generated with Claude Code