-
Notifications
You must be signed in to change notification settings - Fork 112
Description
As discussed in Lost in the Middle, the order in which content is inserted into a prompt can influence the response in RAG systems when grounding external information. The MCP client (LLM/Agent) may prefer to place important content at the end of the prompt to prioritize it.
However, the current response from ‘microsoft_docs_search‘ does not mention how the results are sorted. As a result, the client must treat all information equally and is forced to consume up to 10 x 500 = 5K tokens unconditionally.
Proposal:
Please ensure that the response from microsoft_docs_search
(the list of content) is sorted by relevance, so the client can pick up a portion of the response for the sake of the context window.
Better Proposal:
Include a ranking score in the response from microsoft_docs_search
, like @search.rerankerScore
or @search.score
from Azure AI Search.
Ref: https://learn.microsoft.com/en-us/azure/search/semantic-search-overview