You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-foundry/agents/how-to/tools/fabric.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Learn how to perform data analytics in Azure AI Foundry Agents usin
5
5
author: aahill
6
6
ms.author: aahi
7
7
manager: nitinme
8
-
ms.date: 04/07/2025
8
+
ms.date: 06/17/2025
9
9
ms.service: azure-ai-agent-service
10
10
ms.topic: how-to
11
11
ms.custom:
@@ -37,12 +37,15 @@ You need to first build and publish a Fabric data agent and then connect your Fa
37
37
## Setup
38
38
> [!NOTE]
39
39
> * The model you selected in Azure AI Foundry Agent setup is only used for agent orchestration and response generation. It doesn't impact which model Fabric data agent uses for NL2SQL operation.
40
-
> * To help your model invoke your Microsoft Fabric tool in the expected way, please make sure you update agent instructions with descriptions of your Fabric data agent and what data it has access to. An example is "for customer and product sales related data, please use the Fabric tool". We recommend using a smaller AI model such as `gpt-4o-mini`. You can also use `tool_choice` parameter in SDK or API to force Fabric tool to be invoked at each run.
40
+
> * To help your model invoke your Microsoft Fabric tool in the expected way, make sure you update agent instructions with descriptions of your Fabric data agent and what data it can access. An example is "for customer and product sales related data, please use the Fabric tool". We recommend using a smaller AI model such as `gpt-4o-mini`. You can also use `tool_choice` parameter in SDK or API to force Fabric tool to be invoked at each run.
41
41
42
42
1. Create an Azure AI Foundry Agent by following the steps in the [quickstart](../../quickstart.md).
43
43
44
44
1. Create and publish a [Fabric data agent](https://go.microsoft.com/fwlink/?linkid=2312910)
45
45
46
+
> [!NOTE]
47
+
> * Make sure you have **published** the data agent in Fabric.
48
+
46
49
:::zone pivot="portal"
47
50
48
51
You can add the Microsoft Fabric tool to an agent programmatically using the code examples listed at the top of this article, or the Azure AI Foundry portal. If you want to use the portal:
@@ -370,10 +373,10 @@ for await (const m of messagesIterator) {
370
373
-->
371
374
:::zone pivot="rest"
372
375
373
-
Follow the [REST API Quickstart](../../quickstart.md?pivots=rest-api#api-call-information) to set the right values for the environment variables `AGENT_TOKEN`, `AZURE_AI_FOUNDRY_PROJECT_ENDPOINT` and `API_VERSION`. For `API_VERSION`, please make sure you are using `2025-05-15-preview`.
376
+
Follow the [REST API Quickstart](../../quickstart.md?pivots=rest-api#api-call-information) to set the right values for the environment variables `AGENT_TOKEN`, `AZURE_AI_FOUNDRY_PROJECT_ENDPOINT` and `API_VERSION`. For `API_VERSION`, make sure you are using `2025-05-15-preview`.
374
377
> [!IMPORTANT]
375
378
> The following samples are applicable if you are using **Azure AI Foundry Project** resource with Microsoft Fabric tool through REST API call
376
-
> Your connection id should be in this format: `/subscriptions/<sub-id>/resourceGroups/<your-rg-name>/providers/Microsoft.CognitiveServices/accounts/<your-ai-services-name>/projects/<your-project-name>/connections/<your-fabric-connection-name>`
379
+
> Your connection ID should be in this format: `/subscriptions/<sub-id>/resourceGroups/<your-rg-name>/providers/Microsoft.CognitiveServices/accounts/<your-ai-services-name>/projects/<your-project-name>/connections/<your-fabric-connection-name>`
377
380
378
381
### Create an agent with the Microsoft Fabric tool enabled
Copy file name to clipboardExpand all lines: articles/ai-foundry/agents/how-to/tools/overview.md
+34-3Lines changed: 34 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ services: cognitive-services
6
6
manager: nitinme
7
7
ms.service: azure-ai-agent-service
8
8
ms.topic: how-to
9
-
ms.date: 05/08/2025
9
+
ms.date: 06/17/2025
10
10
author: aahill
11
11
ms.author: aahi
12
12
ms.custom: azure-ai-agents
@@ -45,7 +45,16 @@ When a user sends a query to the agent, it will create a [thread, run, and messa
45
45
46
46
There are various ways to influence how your AI agent invokes tools:
47
47
48
-
- The `tool_choice` parameter: Most deterministic, controls which (if any) tool is called by the model. By default, it is set to `auto`, which means the AI model will decide. If you want to **force** the model to call a specific tool, you can provide the specification of this tool, for example `{"type": "function", "function": {"name": "my_function"}}`.
48
+
- The `tool_choice` parameter: Most deterministic way of controlling which (if any) tool is called by the model. By default, it is set to `auto`, which means the AI model will decide. If you want to **force** the model to call a specific tool, you can provide the specification of this tool, for example
49
+
50
+
```python
51
+
run = project_client.agents.runs.create_and_process(
52
+
thread_id=thread.id,
53
+
agent_id=agent.id,
54
+
tool_choice={"type": "bing_grounding"} # specify the tool to use
55
+
)
56
+
```
57
+
49
58
- The `instructions` parameter: Nondeterministic. Use the instructions to help the AI model understand your use case and the purposes of each tool. You want to tell the AI model what information or actions each tool can do. For example "*use the AI Search tool `<tool_name>` for product related information, use the Fabric tool `<tool_name>` for sales related information*." Sometimes the user query can be responded by the model's base knowledge or by the tools, you want to provide instructions like "*use the tool outputs to generate a response, don't use your own knowledge.*"
50
59
51
60
## Prerequisites
@@ -65,7 +74,7 @@ The Foundry Agent Service provides the following built-in tools. You can use the
65
74
|[File Search](file-search.md)| Augment agents with knowledge from outside its model, such as proprietary product information or documents provided by your users. |
66
75
|[Function calling](function-calling.md)|Describe the structure of functions you create to an agent and have them be called when appropriate during the agent's interactions with users. |
67
76
|[Grounding with Bing Search](bing-grounding.md)| Enable your agent to use Grounding with Bing Search to access and return information from the internet. |
68
-
|[Grounding with Bing Custom Search](bing-custom-search.md)| Enhance your Agent response with selected web domains |
77
+
|[Grounding with Bing Custom Search (preview)](bing-custom-search.md)| Enhance your Agent response with selected web domains |
69
78
|[Microsoft Fabric (preview)](fabric.md)| Integrate your agent with the [Microsoft Fabric data agent](https://go.microsoft.com/fwlink/?linkid=2312815) to unlock powerful data analysis capabilities. |
70
79
|[OpenAPI 3.0 Specified tool ](openapi-spec.md)| Connect your Azure AI Agent to external APIs using functions with an OpenAPI 3.0 specification. |
71
80
@@ -88,3 +97,25 @@ The following tools are authored by third-party partners. Use the links below to
88
97
|[Morningstar](https://github.com/azure-ai-foundry/foundry-samples/tree/main/samples/microsoft/python/getting-started-agents/3p-tools/Morningstar)| Access up-to-date investment research and data such as analyst research, expert commentary, and essential Morningstar data. |
89
98
|[Trademo](https://github.com/azure-ai-foundry/foundry-samples/tree/main/samples/microsoft/python/getting-started-agents/3p-tools/Trademo_Glocal_trade)| Provide latest duties and past shipment data for trade between multiple countries |
90
99
|[Tripadvisor](https://github.com/azure-ai-foundry/foundry-samples/tree/main/samples/microsoft/python/getting-started-agents/3p-tools/Tripadvisor)| Get travel data, guidance and reviews |
100
+
101
+
## Best Practices
102
+
103
+
### Use system instruction to help model invoke the right tool
104
+
105
+
In order for the model to understand which tools to use, you want to provide detailed instruction for the model to describe when and how to use the tool. You might want to consider providing the following information:
106
+
- Primary Objective: what is the objective of this agent? what is the goal of related tasks? what are the expected outcomes?
107
+
- Your responsibilities: what tasks you expect the agent to perform. For example, calling Grounding with Bing Search tool to get the latest information about local events.
108
+
- Inputs you may receive: what inputs do you expect the agent to receive?
109
+
- For each tool:
110
+
- The tool name
111
+
- A description of the tool
112
+
- Triggers: when do you expect this tool to be called? What type of information will be searched? What will queries contain?
113
+
- An example of a query
114
+
115
+
For example, you might provide tool instructions like the following for the Grounding with Bing Search tool:
116
+
117
+
Grounding with Bing Search tool
118
+
- Use: Gather external trends or news to enrich the post with real-time insights.
119
+
- Trigger this when:
120
+
- The user asks to reference recent data or competitive context.
121
+
- Example: "Can you reference the latest industry trends?" or "What are competitors doing?".
Copy file name to clipboardExpand all lines: articles/ai-foundry/agents/how-to/tools/sharepoint.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,9 @@ Integrate your agents with the **Microsoft SharePoint** to chat with your privat
44
44
1. Click to add a new connection. Once you have added a connection, you can directly select from existing list.
45
45
1. To create a new connection, you need to find `site_url` in your SharePoint site. You can add either a SharePoint site or a SharePoint folder. For a SharePoint site, it will look like `https://microsoft.sharepoint.com/teams/<site_name>`. For a SharePoint folder, it will look like `https://microsoft.sharepoint.com/teams/<site_name>/Shared%20documents/<folder_name>`
46
46
47
+
> [!NOTE]
48
+
> * Your `site_url` needs to follow the format above. If you copy the entire value from the address bar of your SharePoint, it won't work.
49
+
47
50
1. Then, you can add it to your connection. Make sure you have selected the **is secret** option.
|[DeepSeek-V3](https://aka.ms/azureai/landing/DeepSeek-V3)| April 10, 2025 | May 31, 2025 | August 31, 2025 |[DeepSeek-V3-0324](https://aka.ms/azureai/landing/DeepSeek-V3-0324)|
247
247
248
+
#### Gretel
249
+
250
+
| Model | Legacy date (UTC) | Deprecation date (UTC) | Retirement date (UTC) | Suggested replacement model |
* USGov DataZone provides access to the model from both usgovarizona and usgovvirginia.
35
35
* Data stored at rest remains in the designated Azure region of the resource.
@@ -39,17 +39,17 @@ Data zone standard deployments are available in the same Azure OpenAI resource a
39
39
40
40
To request quota increases for these models, submit a request at [https://aka.ms/AOAIGovQuota](https://aka.ms/AOAIGovQuota). Note the following maximum quota limits allowed via that form:
| GPT-4o max images per request (# of images in the messages array/conversation history) | 50 |
52
+
| GPT-4o and GPT-4.1 max images per request (# of images in the messages array/conversation history) | 50 |
53
53
| GPT-4 `vision-preview` & GPT-4 `turbo-2024-04-09` default max tokens | 16 <br><br> Increase the `max_tokens` parameter value to avoid truncated responses. GPT-4o max tokens defaults to 4096. |
54
54
| Max number of custom headers in API requests<sup>1</sup> | 10 |
messages=[KnowledgeAgentMessage(role=msg["role"], content=[KnowledgeAgentMessageTextContent(text=msg["content"])]) for msg in messages],
255
+
messages=[KnowledgeAgentMessage(role=msg["role"], content=[KnowledgeAgentMessageTextContent(text=msg["content"])]) for msg in messagesif msg["role"] !="system"],
messages=[KnowledgeAgentMessage(role=msg["role"], content=[KnowledgeAgentMessageTextContent(text=msg["content"])]) for msg in messages],
419
+
messages=[KnowledgeAgentMessage(role=msg["role"], content=[KnowledgeAgentMessageTextContent(text=msg["content"])]) for msg in messagesif msg["role"] !="system"],
0 commit comments