Skip to content

Conversation

@farzad528
Copy link
Contributor

Added optimized agent instructions for knowledge base retrieval, including a Python template for effective usage and citation formatting.

Added optimized agent instructions for knowledge base retrieval, including a Python template for effective usage and citation formatting.
@prmerger-automator
Copy link
Contributor

@farzad528 : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. @farzad528

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit aff4987:

✅ Validation status: passed

File Status Preview URL Details
articles/ai-foundry/default/agents/how-to/tools/knowledge-retrieval.md ✅Succeeded

For more details, please refer to the build report.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the knowledge base retrieval documentation by adding a new section on optimizing agent instructions for knowledge base retrieval. The changes provide developers with a recommended instruction template designed to improve MCP tool invocation rates and ensure proper citation formatting, along with explanatory guidance on why the template is effective.

Key changes:

  • Added a new "Optimize agent instructions for knowledge base retrieval" section with a Python template showing recommended instruction patterns
  • Updated existing code examples in both Python and REST sections to use the optimized instruction template
  • Included guidance on customizing instructions for specific use cases

@v-dirichards
Copy link
Contributor

@haileytap

Can you review the proposed changes?

Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator bot added the aq-pr-triaged C+L Pull Request Review Team label label Nov 20, 2025

To maximize the accuracy of knowledge base invocations and ensure proper citation formatting, use optimized agent instructions. Based on our experiments, we recommend the following instruction template as a starting point:

```python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we convert this code snippet to plain text? Configuring agent instructions isn't specific to Python.

In other words, changing python to plaintext and removing the instructions = """ portion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Updated the instruction template for knowledge base retrieval to improve accuracy and citation formatting.
Updated the instruction template for knowledge base invocations to improve accuracy and citation formatting.
@farzad528
Copy link
Contributor Author

#sign-off

@prmerger-automator
Copy link
Contributor

Invalid command: '#sign-off'. Only the assigned author of one or more file in this PR can sign off. @haileytap

@v-dirichards
Copy link
Contributor

Hi @farzad528 - Thanks for your review. In the public repo, pull requests should be signed off by the author, another member of the content team, or a PM.


@haileytap Could you take a look? Thanks!

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit f946f2c:

✅ Validation status: passed

File Status Preview URL Details
articles/ai-foundry/default/agents/how-to/tools/knowledge-retrieval.md ✅Succeeded

For more details, please refer to the build report.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 6cb280f:

✅ Validation status: passed

File Status Preview URL Details
articles/ai-foundry/default/agents/how-to/tools/knowledge-retrieval.md ✅Succeeded

For more details, please refer to the build report.

@haileytap
Copy link
Contributor

#sign-off

@haileytap
Copy link
Contributor

@v-dirichards: By the way, @farzad528 is both a PM and the ms.reviewer for this article. He might want to submit future PRs to the public repo, so I think he should be cleared to sign off. Thanks!

@ktoliver ktoliver merged commit 45c4824 into MicrosoftDocs:main Nov 21, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants