Repository navigation
[Teams Chatbot] Add help or action requests with support contacts - #17453
Jialin Huang (JialinHuang803) wants to merge 10 commits into
Conversation
Introduce a shared Blob support catalog, model-generated contact targets and validated per-turn routing metadata without confidence assessment dependencies or notification delivery. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 1 pipeline(s). 70 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟡 Changes recommended
The blob loader bypasses injected candidate settings, and malformed-envelope detection can turn valid legacy answers containing fenced JSON examples into HTTP 500 errors.
2 open issues
What changed in this PR
Adds an opt-in, non-notifying guided-next-step preview to the QA bot, pairing a single model-written answer with support targets grouped by logical contact.
Changes:
- Adds structured response models and agent instructions for grouped next steps.
- Loads and caches a shared Blob catalog, injects per-turn snapshots, and validates routing without resolving contact placeholders.
- Documents rollout compatibility and adds focused validation, recovery, serialization, and mention-behavior tests.
| File | Description |
|---|---|
tools/sdk-ai-bots/azure-sdk-qa-bot-agent/tsp/models.tsp |
Defines next-step API metadata. |
tools/sdk-ai-bots/azure-sdk-qa-bot-agent/tests/guided_next_step_test.py |
Tests guided responses, catalog handling, and compatibility. |
tools/sdk-ai-bots/azure-sdk-qa-bot-agent/services/support_contact_service.py |
Loads, validates, and caches the support catalog. |
tools/sdk-ai-bots/azure-sdk-qa-bot-agent/services/chat_service.py |
Injects catalog snapshots and processes structured answers. |
tools/sdk-ai-bots/azure-sdk-qa-bot-agent/README.md |
Documents configuration, preview behavior, and rollout. |
tools/sdk-ai-bots/azure-sdk-qa-bot-agent/models/guided_next_step.py |
Defines catalog and response validation rules. |
tools/sdk-ai-bots/azure-sdk-qa-bot-agent/models/chat.py |
Adds optional next-step response metadata. |
tools/sdk-ai-bots/azure-sdk-qa-bot-agent/config/support-contact.example.yaml |
Provides a synthetic catalog template. |
tools/sdk-ai-bots/azure-sdk-qa-bot-agent/agents/chat_agent/next_step.md |
Guides grouped, non-notifying follow-up generation. |
tools/sdk-ai-bots/azure-sdk-qa-bot-agent/agents/chat_agent/init.py |
Loads preview instructions and enables structured output. |
Review effort: Balanced
Use ordinary answers and existing verified mentions with a repository-owned support catalog loaded through a cached configuration helper. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply the approved artifact with scoped support areas, verified GitHub contacts, and consolidated management SDK review and release ownership. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Simplify next-action guidance, prefer concise action sections, address owners directly, and keep informational contacts as plain text. Align tenant and identity-tool guidance with unit coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
| @@ -1 +1 @@ | |||
| import { Activity, CardFactory, MessageFactory, TurnContext } from 'botbuilder'; | |||
There was a problem hiding this comment.
Will rename this file to ReplyHandler.ts or something like that. Keep it this name so the code can be reiviewed more easily.
| - key: dotnet_management_api_review | ||
| description: ".NET management SDK PR and APIView review, including management-library release approval and related generated SDK review. Excludes general .NET core and data-plane issues." | ||
| github_username: arthurma1978 | ||
|
|
||
| - key: dotnet_management_codegen | ||
| description: ".NET management SDK code generation, migration and compatibility issues, build failures and release troubleshooting." | ||
| github_username: live1206 | ||
|
|
||
| - key: dotnet_management_pr_review | ||
| description: ".NET management SDK PR review, release preparation and generated or custom-code issues." | ||
| github_username: arcturuszhang |
There was a problem hiding this comment.
let us use arthurma1978 live1206 and arcturuszhang
|
|
||
| - key: apiview_reviewhub_release_gates | ||
| description: "APIView and ReviewHub tooling, review-status interpretation and release-gate integration or troubleshooting. Actual API approval belongs to the relevant reviewer." | ||
| github_username: tjprescott |
There was a problem hiding this comment.
Suggest to have multiple person if we are able to get the list. Even in the future, there are some changes, we could still find at least one person that could help.
There was a problem hiding this comment.
Can we make 'github_username' as a list even we only have one person.
| Add a next step only when needed to resolve the request; routine instructions do not require an extra request. | ||
|
|
||
| - Prefer a human action that can already proceed; ask for missing user facts only when they determine the next action. | ||
| - Prefer qualified owners established by current target-specific tools or authoritative guidance, such as requested reviewers or matching `CODEOWNERS`. |
There was a problem hiding this comment.
For spec PR or SDK PR, could the people in the requested reviewers help to solve the real problem? I think we shall prioritize to use the support_contact.
| @lru_cache(maxsize=1) | ||
| def get_support_catalog() -> SupportContactCatalog | None: | ||
| try: | ||
| catalog = parse_support_catalog(SUPPORT_CONTACT_PATH.read_bytes()) |
There was a problem hiding this comment.
If we made any change to support_contact, how to ensure chatbot could load the latest information? Do we need to rebulid, or restart the chat_agent?
| @@ -69,10 +69,34 @@ after reading the PR and its check runs: | |||
| Stay within the tool-call budget: diagnosing a PR already requires reading the PR and its check runs; only if needed, add a single `get_file_contents` call to read `CODEOWNERS`. | |||
There was a problem hiding this comment.
Please add more integration tests to cover different scenarios.
We could start with the common asks from api-spec-review channel and gradually cover boarder scenarios.

Summary
Adds focused clarification and human-help requests to ordinary QA bot answers, backed by repository-owned support contacts.
CODEOWNERS, or authoritative guidance; use the support catalog as a fallback.plain_textfor informational contacts andtext/mentionedfor direct participation requests.Configuration
config/support-contact.yamldefines support areas, descriptions, and individual GitHub usernames. Models, strict YAML validation, and the process-cached loader are inmodels/support_contact.py. Catalog context is supplied on every turn, including conversation recovery; an emptysupport_areaslist disables catalog-based referrals.ENABLE_TEAMS_MENTIONdefaults totrue. Setting it tofalseomits mention metadata while preserving the answer, including its<at>text. App Configuration settings are loaded at backend startup, so changes require a backend restart.The catalog guides the model's contact selection; the backend verifies identity mappings, not expertise or approval authority.
Deployment
Deploy the hosted chat agent and backend with the same
users/errorsidentity-tool result schema, and deploy the frontend for new-message answer delivery.Relates to Azure/azure-sdk-pr#3149.