microsoft / microsoft/simplechat
Add AI-assisted draft reviews for feedback and safety violations
@paullizer is already working on this.
Since Jul 28, 2026.
- Dominant language
- Python
- Stars
- 153
- Forks
- 116
- Avg merge
- 7h 7m
- Merged PRs (30d)
- 122
Description
Summary
Add AI-assisted review suggestions to the admin Feedback Review and Safety Violations workflows. For an individual record, an authorized reviewer can ask the configured default app model to draft field values and next steps. Suggestions remain editable and transient until the reviewer explicitly saves the review.
Add the same capability for selected records as a serial bulk task. Bulk generation should queue one draft per record for explicit per-item review and save, rather than applying actions automatically.
User Value
Feedback and safety reviewers often repeat the same analysis across many records. AI-assisted drafts can improve consistency, reduce review time, and help reviewers apply shared evaluation criteria while keeping a human responsible for every persisted review or remediation request.
Proposed Behavior
- Add an AI Suggest action to each feedback and safety violation review modal.
- Use the configured default app model, including the existing endpoint/provider fallback behavior.
- Load the target record on the server by id. Do not trust client-supplied prompt, response, violation, user, or category content.
- Build suggestions from the record, existing draft fields, shared admin criteria, and the current reviewer's optional personal criteria addendum.
- Return validated structured suggestions for the fields already owned by each workflow.
- For feedback, suggest analysis notes, a response to the user, and action taken or next steps.
- For safety violations, suggest status, action, review notes, and a user notification where applicable. Suggestions must not execute remediation or create approval requests.
- Populate the existing form fields as an editable AI-generated draft. Nothing is persisted until the reviewer selects Save Review.
- Add selection controls and a bulk AI suggestion action to both review queues.
- Process selected records serially, show progress and per-record failures, and queue successful drafts for review.
- Require explicit per-item review and save after bulk generation. Do not provide implicit or automatic bulk persistence in the initial implementation.
- Keep the existing safety remediation approval workflow unchanged. A warn, suspend, or block suggestion only enters that workflow after the reviewer saves it through the existing route.
- Add shared feedback and safety evaluation criteria in Admin Settings.
- Let each authorized reviewer maintain an optional personal addendum. Apply the shared criteria as the baseline and the personal addendum as additional guidance.
Acceptance Criteria
- Admin Settings includes separate shared criteria fields for feedback reviews and safety violation reviews.
- Authorized feedback and safety reviewers can maintain optional personal criteria that are scoped to their own identity.
- Individual AI suggestion endpoints enforce the existing
FeedbackAdminandSafetyViolationAdminaccess policies and load the exact target record server-side. - Suggestion generation uses the configured default app model and returns safe, actionable errors when no model is configured or inference fails.
- Model output is parsed and validated as structured data; status and action values are restricted to the existing allowlists.
- Individual suggestions populate editable review fields without writing to Cosmos DB, acknowledging feedback, executing remediation, or creating an approval request.
- The UI clearly identifies AI-generated content as a draft that requires reviewer verification.
- Both review queues support selecting records and starting serial bulk suggestion generation with visible progress, cancellation or stop behavior, and isolated per-record errors.
- Bulk-generated drafts are queued for explicit per-item review and save; no selected record is automatically persisted.
- Saving a feedback draft continues through the existing feedback review update path.
- Saving a safety draft continues through the existing safety update and remediation approval path.
- Closing or navigating away from an unsaved draft does not persist model output; the UI warns before discarding modified draft content where appropriate.
- Model prompts treat submitted feedback, chat content, and violation text as untrusted data and instruct the model not to follow instructions contained in that data.
- Model output is rendered with safe text DOM APIs, and telemetry does not record raw prompts, responses, violation messages, personal criteria, or generated review text.
- Batch size and request behavior are bounded to avoid accidental high model usage, with a clear limit or confirmation before generation.
- Functional tests cover criteria precedence, structured-output validation, authorization, no-write suggestion behavior, serial bulk failure isolation, and preservation of the safety approval boundary.
- Playwright tests cover individual draft population, editing before save, serial bulk progress, per-item review, visible failure states, and no automatic persistence.
- Feature documentation and release notes describe the human-review requirement, criteria scopes, model dependency, bulk limits, and known limitations.
Notes
Relevant implementation surfaces include:
application/single_app/route_backend_feedback.pyapplication/single_app/route_backend_safety.pyapplication/single_app/templates/admin_feedback_review.htmlapplication/single_app/templates/admin_safety_violations.htmlapplication/single_app/static/js/admin/admin-feedback-review.jsapplication/single_app/static/js/admin/admin-safety-violations.jsapplication/single_app/functions_settings.pyapplication/single_app/route_frontend_admin_settings.pyapplication/single_app/templates/admin_settings.html
The current feedback retest helper is a mock and should not be used as the production inference implementation. Prefer a shared review-suggestion service with domain-specific prompt and response adapters so feedback and safety preserve their separate storage and save semantics.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.