Skip to content

Conversation

@Dhruvkumar-Microsoft
Copy link
Contributor

Purpose

This pull request introduces updates to the rai_success function and its usage across the codebase to enhance Responsible AI (RAI) checks. Key changes include adding a new parameter to distinguish between task creation and other contexts, refining the RAI evaluation logic, and updating endpoints to handle RAI failures more robustly.

Enhancements to RAI functionality:

  • src/backend/utils_kernel.py: Updated rai_success to accept a new is_task_creation parameter, allowing for context-specific evaluation. The function now uses a dynamic content_prompt tailored to either general input validation or task creation. [1] [2] [3]

Updates to endpoints for RAI integration:

  • src/backend/app_kernel.py: Modified input_task_endpoint to pass True for the is_task_creation parameter when calling rai_success.
  • src/backend/app_kernel.py: Enhanced human_clarification_endpoint to invoke rai_success with False for non-task-related clarification. Added robust error handling and event tracking for RAI failures.

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

@Roopan-Microsoft Roopan-Microsoft merged commit cc650b1 into dev Jul 30, 2025
7 checks passed
@Roopan-Microsoft Roopan-Microsoft deleted the psl-bug-19304 branch July 30, 2025 04:47
blessing-msft pushed a commit that referenced this pull request Aug 1, 2025
fix: added RAI check in user clarification endpoint
@github-actions
Copy link

🎉 This PR is included in version 2.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants