Skip to content

Evaluation: Update scoring semantics #129

Closed

Description

@rkritika1508

Is your feature request related to a problem?
The TopicRelevanceOpenAI validator has hardcoded scoring instructions, leading to false positives for forbidden-topic configurations. This misalignment causes confusion when users configure the system prompt with excluded topics.

Describe the solution you'd like

  • Update the scoring semantics to ensure high scores reflect "clearly NOT forbidden" for exclusion-based prompts.
  • Revise the TopicRelevanceOpenAI validator to eliminate conflicts in scoring.
  • Conduct testing to confirm the new scoring aligns with user intent.
Original issue

Which feature or component needs enhancement?
Clearly identify the existing feature/component that needs improvement.
The TopicRelevanceOpenAI validator had hardcoded scoring instructions that caused false positives for forbidden-topic configurations. When a user configured the system prompt with forbidden topics (e.g. "do not answer queries about gender detection"), the model was misled by the scoring semantics — score 3 meant "clearly in scope", which conflicted with the intent of an exclusion-based prompt where a high score should mean "clearly NOT forbidden".

Describe the current behavior
A clear description of how it currently works and what the limitations are.

Describe the enhancement you'd like
A clear and concise description of the improvement you want to see.

Why is this enhancement needed?
Explain the benefits (e.g., performance, usability, maintainability, scalability).

Additional context
Add any other context, metrics, screenshots, or examples about the enhancement here.

Activity

  1. changed the title [-]Guardrails: Topic relevance improvement[/-] [+]Evaluation: Update scoring semantics[/+] on Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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