You have a set of documents.
You want to enrich the information in these documents before using this information in your searchable index.
You use enrichment pipelines in Azure for this purpose.
You review the built-in skills in Azure, like sentiment analysis and key-phrase extraction.
However, you realize that your specific needs cannot be addressed using the built-in skills in Azure.
Hence, you decide to call your own code through a web API, as part of the enrichment process in Azure cognitive search.
Review the JSON code given below and complete it by choosing the parameters and values from the answer choices given below.
[select three choices]
{ "@odata.type": "............................................................", "description": "Call a custom code to identify all image files in the data source", "uri": "https://indexer-e2e-webskill.azurewebsites.net/api/InvokeTextAnalyticsV3?code=tstskill", "httpHeaders": { "Ocp-Apim-Subscription-Key": "key1" }, "context": "/document/store/*", "............................................................": [ { "name": "query", "source": "/document/store/*" } ], "............................................................": [ { "name": "filetype", "targetName": "filextension" } ] }
Click on the arrows to vote for the correct answer
A. B. C. D. E.Correct Answers: A, B and E
Here is the completed JSON response.
<pre>{
"@odata.type": "#Microsoft.Skills.Custom.WebApiSkill",
"description": "Call a custom code to identify all image files in the data source",
"uri": "https://indexer-e2e-webskill.azurewebsites.net/api/InvokeTextAnalyticsV3?code=tstskill",
"httpHeaders": {
"Ocp-Apim-Subscription-Key": "key1"
},
"context": "/document/store/*",
"inputs": [
{
"name": "query",
"source": "/document/store/*"
}
],
"outputs": [
{
"name": "filetype",
"targetName": "filextension"
}
]
}
</pre>Option A is correct because, as per the given scenario, a custom skill would call the custom code through a WebApiSkill (#Microsoft.Skills.Custom.WebApiSkill) referencing the url.
Option B is correct because the “inputs” parameter will source documents to the Web API call for the custom skill.
In this case, the input source is /document/store.
Option C is incorrect because the requirement here is to use a custom skill.
However, #Microsoft.Skills.Text.EntityRecognitionSkill is a built-in skill.
Option D is incorrect because the datastore is not a correct parameter for the custom skill.
Option E is correct because “outputs” define the target where the custom skill output is written.
In this case, it is written to a file.
Reference:
To learn more about how to add a custom skill to the cognitive search enrichment pipeline, use the link given below:
The JSON code is defining a skillset that will be used to enrich a set of documents in Azure cognitive search. The skillset includes multiple skills that can be executed in sequence. The JSON code provided is incomplete and requires the user to fill in the missing parameters.
The following are the missing parameters and their values that need to be selected from the answer choices:
"@odata.type": "A. #Microsoft.Skills.Custom.WebApiSkill" This parameter specifies the type of skill that is being used. In this case, the user wants to call a custom code through a web API, so they need to select the value "A. #Microsoft.Skills.Custom.WebApiSkill".
"inputs": [ { "name": "query", "source": "/document/store/" }] This parameter specifies the input to the custom code that is being called through the web API. In this case, the user wants to pass a query parameter to the custom code, so they need to select the value "B. inputs" and then specify the parameter name as "query" and the source as "/document/store/".
"outputs": [ { "name": "filetype", "targetName": "filextension" }] This parameter specifies the output of the custom code that is being called through the web API. In this case, the user wants to extract the file type of the image files in the data source, so they need to select the value "E. outputs" and then specify the output name as "filetype" and the target name as "filextension".
The remaining parameters in the JSON code are already filled in: