page_type | languages | products | name | description | azureDeploy | ||||
---|---|---|---|---|---|---|---|---|---|
sample |
|
|
Bing Entity Search sample skill for AI Search |
This custom skill finds rich and structured information about public figures, locations, or organizations. |
This custom skill finds rich and structured information about public figures, locations, or organizations.
In addition to the common requirements described in the root README.md
file, this function requires access to an Azure Bing Entity Search service.
This function requires a BING_API_KEY
setting set to a valid Azure Bing Entity Search API key.
If running locally, this can be set in your project's debug environment variables (go to project properties, in the debug tab). This ensures your key won't be accidentally checked in with your code.
If running in an Azure function, this can be set in the application settings.
{
"values": [
{
"recordId": "foobar2",
"data":
{
"name": "Pablo Picasso"
}
},
{
"recordId": "foo1",
"data":
{
"name": "Microsoft"
}
}
]
}
{
"values": [
{
"recordId": "foobar2",
"data": {
"name": "Pablo Picasso",
"description": "Pablo Ruiz Picasso was a Spanish painter, sculptor, [...]",
"imageUrl": "https://www.bing.com/th?id=AMMS_e8c719d1c081e929c60a2f112d659d96&w=110&h=110&c=12&rs=1&qlt=80&cdv=1&pid=16.2",
"url": "http://en.wikipedia.org/wiki/Pablo_Picasso",
"licenseAttribution": "Text under CC-BY-SA license",
"entities": "{...}"
}
},
"..."
]
}
In order to use this skill in a AI Search pipeline, you'll need to add a skill definition to your skillset. Here's a sample skill definition for this example (inputs and outputs should be updated to reflect your particular scenario and skillset environment):
{
"@odata.type": "#Microsoft.Skills.Custom.WebApiSkill",
"description": "Our new Bing entity search custom skill",
"context": "/document/merged_content/organizations/*",
"uri": "[AzureFunctionEndpointUrl]/api/entity-search?code=[AzureFunctionDefaultHostKey]",
"batchSize": 1,
"inputs": [
{
"name": "name",
"source": "/document/merged_content/organizations/*",
"sourceContext": null,
"inputs": []
}
],
"outputs": [
{
"name": "description",
"targetName": "description"
}
],
"httpHeaders": {}
}