guardrails icon indicating copy to clipboard operation
guardrails copied to clipboard

[feat] Request response refusal validator

Open railsstudent opened this issue 1 year ago • 6 comments

Description Request a validator that determines whether or not a LLM refuses a prompt and generates an output that starts with texts such as "I cannot", "I can't", and "It is illegal"

Why is this needed If the response is refused, it should not be returned to the client application to display. The validator should throw a validation error that the application should handle appropriately.

Implementation details I suppose Huggingface provides models for response refusal checking.

End result After a LLM generate a text, the validator is used to validate whether the response is refused by having but not limited to texts such as "I can not", "I can't", "It is not legal", etc.

railsstudent avatar Dec 09 '24 09:12 railsstudent

Ooh. That's a neat idea. It's not on the current sprint listing but I'd like to take a swing at it.

JosephCatrambone avatar Dec 09 '24 18:12 JosephCatrambone

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Jan 09 '25 03:01 github-actions[bot]

this is not stale

railsstudent avatar Jan 09 '25 15:01 railsstudent

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Feb 09 '25 03:02 github-actions[bot]

this is a good feature to have. Azure openai can detect response refusal.

railsstudent avatar Feb 10 '25 04:02 railsstudent

I have to drop this, sadly. :( Feels like an inelegant handoff but perhaps someone on the team wants to pick this up? I don't have the permissions to unassign myself.

JosephCatrambone avatar Mar 13 '25 16:03 JosephCatrambone

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar May 13 '25 03:05 github-actions[bot]

unstale

zsimjee avatar Jun 04 '25 00:06 zsimjee

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Aug 03 '25 04:08 github-actions[bot]

This issue was closed because it has been stalled for 14 days with no activity.

github-actions[bot] avatar Sep 03 '25 03:09 github-actions[bot]