ProjectTech4DevAI / ProjectTech4DevAI/kaapi-guardrails

Validation: Improve topic relevance checks

Open
#97 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
5
Forks
3
Avg merge
9d 13h
Merged PRs (30d)
2

Description

Describe the bug
if along with topic relevance validator we send some other validator such as lexical slur match or PII remover to the run guardrails endpoint, then if the input text has slur words or some PII, then respectively those validators will replace the specific words with [REDACTED_SLUR] or the pii entity tag such as [PHONE_NUMBER], after the words are detected and tagged, when the fixed input text goes to topic relevance validator, it will fail even if the rest of the context of the input still contained something related to the topic scope only.

Expected behavior
The fixed input text with redacted slur and pii entity tags should not be going to the topic relevance validator, because even if the main context is accurate to the scope, it will fail.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the run guardrails endpoint and trace how the topic relevance, lexical slur, and PII-removal validators are sequenced. Reproduce the case with redacted tags and verify that topic relevance is not run on the fixed text when the remaining context matches the topic scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai-infra-agents, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.