Skip to content

LLM Critic: User-friendly on_fail messages #104

@rkritika1508

Description

@rkritika1508

Is your feature request related to a problem?
When using the LLM Critic validator with the rephrase on_fail action, the response provided is not user-friendly. It presents technical details instead of a clear message, which can confuse users.

Describe the solution you'd like

  • Provide a user-friendly response for all on_fail actions in LLM Critic.
  • Ensure that messages are clear and understandable, rather than technical.
Original issue

Describe the bug
A clear and concise description of what the bug is.
When using the LLM Critic validator, if we use the rephrase on_fail action, we don't receive a user-friendly response. It's something like -

{
"success": true,
"data": {
"response_id": "30a0c27c-8cab-43dc-b5e0-b023dffa98e9",
"rephrase_needed": true,
"safe_text": "Please rephrase the query without unsafe content. The response is missing or has invalid evaluations for the following metrics: ['query']."
}
}

Instead, we should have a user friendly response for all on_fail actions.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions