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-services/agents/how-to/tools/bing-grounding.md
+32-13Lines changed: 32 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: 'How to use Azure AI Agent service with Bing Grounding resources'
2
+
title: 'How to use Grounding with Bing Search in Azure AI Agent service'
3
3
titleSuffix: Azure OpenAI
4
-
description: Learn how to ground Azure AI Agents using Bing web search.
4
+
description: Learn how to ground Azure AI Agents using Bing Search results.
5
5
services: cognitive-services
6
6
manager: nitinme
7
7
ms.service: azure
@@ -17,11 +17,14 @@ recommendations: false
17
17
18
18
::: zone pivot="overview"
19
19
20
-
Grounding with Bing Search allows your Azure AI Agents to incorporate real-time public web data when generating responses. To start with, you need to create a Grounding with Bing Search resource, then connect this resource to your Azure AI Agents. When a user sends a query, Azure AI Agents will decide if Grounding with Bing Search should be leveraged or not. If so, it will leverage Bing to search over public web data and return relevant chunks. Lastly, Azure AI Agents will use returned chunks to generate a response.
20
+
**Grounding with Bing Search** allows your Azure AI Agents to incorporate real-time public web data when generating responses. You need to create a Grounding with Bing Search resource, and then connect this resource to your Azure AI Agents. When a user sends a query, Azure AI Agents decide if Grounding with Bing Search should be leveraged or not. If so, it will leverage Bing to search over public web data and return relevant chunks. Lastly, Azure AI Agents will use returned chunks to generate a response.
21
21
22
-
Citations show links to websites used to generate response, but don't show links to the Bing query used for the search. Developers and end users don't have access to raw content returned from Grounding with Bing Search.
22
+
You can ask questions such as "*what is the weather in Seattle?*" or "*what is the recent update in the retail industry in the US?*", which require real-time public data.
23
23
24
-
You can ask questions such as "*what is the weather in Seattle?*" or "*what is the recent update in the retail industry in the US?*" require real-time public data.
24
+
Developers and end users don't have access to raw content returned from Grounding with Bing Search. The response, however, includes citations with links to the websites used to generate the response, and a link to the Bing query used for the search. These two *References* must be retained and displayed in the exact form provided by Microsoft, as per Grounding with Bing Search's [Use and Display Requirements](https://www.microsoft.com/en-us/bing/apis/grounding-legal#use-and-display-requirements). See the [how to display Grounding with Bing Search results](#how-to-display-grounding-with-bing-search-results) section for details.
25
+
26
+
>[!IMPORTANT]
27
+
> Your usage of Grounding with Bing Search may incur costs. See the [pricing page](https://www.microsoft.com/bing/apis/grounding-pricing) for details.
25
28
26
29
## Setup
27
30
@@ -30,14 +33,21 @@ You can ask questions such as "*what is the weather in Seattle?*" or "*what is t
30
33
31
34
1. Ensure you've completed the prerequisites and setup steps in the [quickstart](../../quickstart.md).
32
35
36
+
1. Create a new Grounding with Bing Search resource. <!--You can find the template file [here](./bingsearch_arm.json) and parameter file [here](./bingsearch_para.json).-->
37
+
You can do this directly in [Azure portal](https://portal.azure.com/#create/Microsoft.BingGroundingSearch), and select the different fields in the creation form.
38
+
39
+
Alternatively, you can create the resource through Azure CLI. By using this method, you automatically agree to be bound by and comply with the [Terms of use and Use and Display Requirements](https://www.microsoft.com/en-us/bing/apis/grounding-legal).
40
+
41
+
Make sure you create this Grounding with Bing Search resource in the same resource group as your Azure AI Agent, AI Project, and other resources.
42
+
33
43
1. Ensure you have logged in to Azure, using `az login`
34
44
35
45
1. Register the Bing Search provider
36
46
```console
37
47
az provider register --namespace 'Microsoft.Bing'
38
48
```
39
49
40
-
1. Create a new Grounding with Bing Search resource.<!--You can find the template file [here](./bingsearch_arm.json) and parameter file [here](./bingsearch_para.json).--> Make sure you have replaced "BING_RESOURCE_NAME" in the parameter file. You can use Azure CLI command:
50
+
1. Create the resource.
41
51
42
52
```console
43
53
az deployment group create
@@ -54,22 +64,25 @@ You can ask questions such as "*what is the weather in Seattle?*" or "*what is t
54
64
--template-file bingsearch_arm.json
55
65
--parameters bingsearch_para.json
56
66
```
57
-
Make sure you have created this Grounding with Bing Search resource in the same resource group of your Azure AI Agent, AI Project, etc.
58
-
1. After you have created a Grounding with Bing Search resource, you can find it in [Azure portal](https://ms.portal.azure.com/#home). Going to the resource group you have created the resource at, search for the Grounding with Bing Search resource you have created.
67
+
68
+
1. After you have created a Grounding with Bing Search resource, you can find it in [Azure portal](https://portal.azure.com/#home). Going to the resource group you have created the resource at, search for the Grounding with Bing Search resource you have created.
59
69
60
70
:::image type="content" source="../../media/tools/bing/resource-azure-portal.png" alt-text="A screenshot of the Bing resource in the Azure portal." lightbox="../../media/tools/bing/resource-azure-portal.png":::
61
71
62
-
1. Click the Grounding with Bing Search resource you have created and copy any of the API key
72
+
1. Select the Grounding with Bing Search resource you have created and copy any of the API keys.
63
73
64
74
:::image type="content" source="../../media/tools/bing/key-endpoint-resource-azure-portal.png" alt-text="A screenshot of the key and endpoint screen for the Bing resource in the Azure portal." lightbox="../../media/tools/bing/key-endpoint-resource-azure-portal.png":::
65
75
66
76
67
77
68
-
1. Go to [Azure AI Foundry Portal](https://ai.azure.com/) and select the AI Project(make sure it's in the same resource group of your Grounding with Bing Search resource). Click **Settings**
78
+
1. Go to [Azure AI Studio](https://ai.azure.com/) and select the AI Project(make sure it's in the same resource group of your Grounding with Bing Search resource). Click **Settings**.
69
79
70
80
:::image type="content" source="../../media/tools/bing/project-settings-button.png" alt-text="A screenshot of the settings button for an AI project." lightbox="../../media/tools/bing/project-settings-button.png":::
71
81
72
-
1. Select **+new connection** in the settings page.
82
+
1. Select **+ new connection** in the settings page.
83
+
84
+
>[!NOTE]
85
+
> If you re-generate the API key at a later date, you need to update the connection with the new key.
73
86
74
87
:::image type="content" source="../../media/tools/bing/project-connections.png" alt-text="A screenshot of the connections screen for the AI project." lightbox="../../media/tools/bing/project-connections.png":::
75
88
@@ -85,12 +98,18 @@ You can ask questions such as "*what is the weather in Seattle?*" or "*what is t
85
98
- Connection name: `YOUR_CONNECTION_NAME` (You will use this connection name in the sample code below.)
86
99
- Access: you can choose either *this project only* or *shared to all projects*. Just make sure in the sample code below, the project you entered connection string for has access to this connection.
87
100
88
-
## Terms of use and display requirements
101
+
## How to display Grounding with Bing Search results
89
102
90
-
According to Terms of use and display requirements, you need to display both website URLs and Bing search query URLs in your custom interface. You can find website URLs through `annotations` parameter in API response and Bing search query URLs through `runstep` details.
103
+
According to Grounding with Bing's [terms of use and use and display requirements](https://www.microsoft.com/en-us/bing/apis/grounding-legal#use-and-display-requirements), you need to display both website URLs and Bing search query URLs in your custom interface. You can find website URLs through `annotations` parameter in API response and Bing search query URLs through `runstep` details.
Microsoft will use data you send to Grounding with Bing to improve Microsoft products and services. Where you send personal data to this service, you are responsible for obtaining sufficient consent from the data subjects. The Data Protection Terms in the Online Services Terms do not apply to Grounding with Bing.
110
+
111
+
Your use of Grounding with Bing Search will be governed by the Terms of Use. By using Grounding with Bing Search, you agree to be bound by and comply with these Terms of Use.
0 commit comments