microsoft / microsoft/simplechat

Let assigned-knowledge agents choose search, analyze, or compare by intent

Open
#941 0 comments 0 reactions 1 assignee View on GitHub

@paullizer is already working on this.

Since Jun 26, 2026.

enhancement
Dominant language
Python
Stars
152
Forks
116
Avg merge
7h 7m
Merged PRs (30d)
122

Description

Summary

Assigned Knowledge currently lets an agent search across configured workspace knowledge, and it can allow users to add their own workspace documents as task context for search/analyze/compare actions. Customers are asking for agents with assigned knowledge to choose the right workspace action from the user's intent, instead of requiring the user to explicitly pick a workspace action every time.

User Value

Users often ask questions that require more than top-N retrieval, such as "find all instances of X across these documents," "how many documents contain this clause," "what is the total value across all assigned documents," or "compare document A and document B." These requests need broader document analysis or comparison, while normal factual questions should remain lightweight search. The agent should help choose the right mode and make that choice visible so users can retry with another mode when needed.

Proposed Behavior

Assigned-knowledge agents should route document-grounded requests to search, analyze, or compare based on the user's natural-language request and the configured allowed actions.

  • Use search for targeted retrieval, factual lookup, and questions that can be answered from a small set of relevant chunks.
  • Use analyze for exhaustive or aggregate requests across assigned or user-supplied documents, including counts, totals, summaries over all matching documents, and "find all" style prompts.
  • Use compare when the request asks to compare two or more documents, versions, proposals, contracts, or sources.
  • Tell the user which mode was used and offer a clear retry path with a different mode.
  • Respect existing assigned-knowledge source, document, tag, public workspace, and user workspace context restrictions.

Acceptance Criteria

  • Assigned-knowledge agent requests can automatically choose between search, analyze, and compare without requiring the user to manually select a workspace action first.
  • The routing honors the agent's assigned knowledge configuration and any allowed_user_workspace_actions restrictions.
  • Search remains the default for normal retrieval questions and does not force expensive full-document analysis unnecessarily.
  • Analyze is selected for aggregate, exhaustive, or "across all documents" requests when the required action is enabled.
  • Compare is selected for multi-document comparison requests when the required action is enabled.
  • The chat response or metadata clearly indicates which mode was used and gives the user a way to retry with another mode.
  • Behavior is covered by focused functional tests for search/analyze/compare routing and restriction handling.

Notes

The likely product direction is to make this part of assigned-knowledge agent behavior in general rather than only the built-in SimpleChat action. The SimpleChat action can still expose workspace operations on a user's behalf, but assigned knowledge already owns the agent's configured source pool, document/tag filters, and allowed user workspace actions. Existing implementation surfaces include functions_assigned_knowledge.py for assigned-knowledge configuration, route_backend_chats.py for document action metadata and assigned-knowledge search arguments, and the agent modal's Search/Analyze/Compare controls for user workspace context.

Open design questions:

  • Should the routing be model-driven via agent instructions/tool choice, deterministic via a classifier, or a hybrid where explicit user wording wins over model inference?
  • Should users be able to override the selected mode inline after a response, or should retry be implemented as a regenerated request with a forced action type?
  • How should cost/latency be communicated when the agent chooses analyze across many documents?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.