Skip to content

Commit 11c9c71

Browse files
committed
fixed links
1 parent 488ed37 commit 11c9c71

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

articles/search/search-agentic-retrieval-how-to-pipeline.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This article describes an approach or pattern for building a solution that uses
1919

2020
This article supports the [agentic-retrieval-pipeline-example](https://github.com/Azure-Samples/azure-search-python-samples/tree/main/agentic-retrieval-pipeline-example) Python sample on GitHub.
2121

22-
This exercise differs from the [Agentic Retrieval Quickstart](search-get-started-agentic-retrieval.md) in how it uses Azure AI Agent to determine whether to retrieve data from the index, and how it uses an agent tool for orchestration.
22+
This exercise differs from the [Agentic Retrieval Quickstart](search-get-started-agentic-retrieval.md) in how it uses Azure AI Agent to retrieve data from the index, and how it uses an agent tool for orchestration.
2323

2424
## Prerequisites
2525

@@ -33,7 +33,7 @@ The following resources are required for this design pattern:
3333

3434
+ A project in Azure AI Foundry, with a deployment of a supported large language model and an Azure AI Agent in a Basic setup.
3535

36-
Follow the steps in [Create a project for Azure AI Foundry](/azure/ai-foundry/how-to/create-project). Deploy one of the chat completion models listed below. We recommend a minimum of 100,000 token capacity for your model. You can find capacity and the rate limit in the model deployments list in the Azure AI Foundry portal.
36+
Follow the steps in [Create a project for Azure AI Foundry](/azure/ai-foundry/how-to/create-projects). Deploy one of the chat completion models listed below. We recommend a minimum of 100,000 token capacity for your model. You can find capacity and the rate limit in the model deployments list in the Azure AI Foundry portal.
3737

3838
### Supported large language models
3939

@@ -83,7 +83,7 @@ You can find the project endpoint in the Azure AI Foundry portal:
8383

8484
1. In the **Overview** tile, find and copy the Azure AI Foundry project endpoint.
8585

86-
A hypothetical endpoint might look like this: https://your-foundry-resource.services.ai.azure.com/api/projects/your-foundry-project
86+
A hypothetical endpoint might look like this: `https://your-foundry-resource.services.ai.azure.com/api/projects/your-foundry-project`
8787

8888
If you don't have an Azure OpenAI resource in your Foundry project, revisit the model deployment prerequisite. A connection to the resource is created when you deploy a model.
8989

@@ -120,9 +120,28 @@ print(f"AI agent '{agent_name}' created or updated successfully")
120120

121121
An end-to-end pipeline needs an orchestration mechanism for coordinating calls to the retriever and knowledge agent. You can use a [tool](/azure/ai-services/agents/how-to/tools/function-calling) for this task. The tool calls the Azure AI Search knowledge retrieval client and the Azure AI agent, and it drives the conversations with the user.
122122

123+
```python
124+
from azure.ai.agents.models import FunctionTool, ToolSet, ListSortOrder
125+
126+
from azure.search.documents.agent import KnowledgeAgentRetrievalClient
127+
from azure.search.documents.agent.models import KnowledgeAgentRetrievalRequest, KnowledgeAgentMessage, KnowledgeAgentMessageTextContent, KnowledgeAgentIndexParams
128+
129+
agent_client = KnowledgeAgentRetrievalClient(endpoint=endpoint, agent_name=agent_name, credential=credential)
130+
131+
thread = project_client.agents.threads.create()
132+
retrieval_results = {}
133+
134+
# AGENTIC RETRIEVAL DEFINITION OMITTED
135+
136+
functions = FunctionTool({ agentic_retrieval })
137+
toolset = ToolSet()
138+
toolset.add(functions)
139+
project_client.agents.enable_auto_function_calls(toolset)
140+
```
141+
123142
## How to structure messages
124143

125-
The prompt sent to the LLM includes instructions for including chat history and results obtained during retrieval on Azure AI Search. The response is passed as a large single string with no serialization or structure.
144+
The messages sent to the agent tool include instructions for chat history and using the results obtained from [knowledge retrieval](/rest/api/searchservice/knowledge-retrieval/retrieve?view=rest-searchservice-2025-05-01-preview&preserve-view=true) on Azure AI Search. The response is passed as a large single string with no serialization or structure.
126145

127146
```python
128147
def agentic_retrieval() -> str:

0 commit comments

Comments
 (0)