Implement information extraction solutions 5.1 Build retrieval and grounding pipelines
A Foundry agent uses the Azure AI Search tool on a shared index that holds documents from…
Study guide skill: Connect retrieval pipelines directly to workflows and agent tools
Question B5-025
A Foundry agent uses the Azure AI Search tool on a shared index that holds documents from many departments. The agent must only ever retrieve documents whose department field is HR, and its answers must include citations that link to the source documents. Which two actions should you take? (Choose two.)
Select 2 answers.
Answer: C, E
The tool's filter parameter applies to all queries the agent makes to the index, not just the first one, so it restricts retrieval itself. Citations need a retrievable text field with the content to cite and, for a link, a separate retrievable field with a source URL (and optionally a title). A single Azure AI Search tool can target only one index.
Deep dive
How it works
Two requirements, two settings on the Azure AI Search tool.
Restrict retrieval with filter. The tool's filter parameter applies to all queries the agent makes to the index. An OData filter such as department eq 'HR' is enforced on every retrieval, so the agent can't retrieve other departments' documents, whatever the user asks. Unlike an instruction, it isn't something the model can ignore.
Make citations linkable with index fields. Per the tool's prerequisites, the index needs:
- one or more searchable, retrievable Edm.String fields, plus searchable vector fields;
- at least one retrievable text field with the content the agent should cite;
- a retrievable field with a source URL (optionally a title) so citations can include a link.
Then check the result: ask a question answered in a specific document and confirm the response includes citations.
The other options, and when you'd use them
- A retrievable content field alone: That gives text to cite, but for a link the index also needs a retrievable source-URL field.
- A separate HR index, with the same tool on both indexes: The Azure AI Search tool can only target one index.
- Repeat the filter in instructions because it only covers the first query: Wrong premise. The filter applies to all queries the agent makes to the index.
Exam tip
Azure AI Search tool: filter = always-on restriction for every query. Linked citations need a retrievable URL field. One tool, one index.
References
Last reviewed: