Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add limit to rephrase on_fail action

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

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
ai, security

Research direction

Start by locating the rephrase on_fail action and the code that invokes it for successive queries; the issue names no files or tests. Determine where per-query invocation counts are tracked and what existing tests cover, then verify that repeated harmful input stops after a defined limit without creating an endless loop.

Written by the indexing model from the issue text.

Description

Which feature or component needs enhancement?
The rephrase on_fail action has no limits of calling. In each successive iteration, harmful text can keep on getting detected and in the worse case, it might mean an endless loop of nudging the user / LLM to rephrase their response. We need to put a limit on how many times this can be called for a single query.

Describe the current behavior
We have added a custom on_fail action called "rephrase" which nudges the user or LLM to rephrase their query since we have detected harm in the message. However, we don't have a limit as to how many times this "rephrase" on_fail action can be called if it keeps on detecting harmful text.

Dominant language
Python
Stars
5
Forks
4
Avg merge
11d 19h
Merged PRs (30d)
1

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

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.

More from ProjectTech4DevAI/kaapi-guardrails

All issues in ProjectTech4DevAI/kaapi-guardrails

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.