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.

  • A Rely on a retrievable text field with the document content, which is enough for citations to include a link
  • B Create a separate HR index and point the same Azure AI Search tool at both indexes
  • C Set the tool's filter parameter, for example department eq 'HR', which applies to every query the agent makes to the index ✓ Correct answer
  • D Set the filter, but repeat it in the agent instructions, because it applies only to the agent's first query in each conversation
  • E Make sure the index has a retrievable field that contains the source URL (and optionally a title) ✓ Correct answer

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:

Ready to test yourself? The quiz asks this and every other AI-103 question, with instant feedback. Practice this in a quiz →

All Information extraction questions · AI-103 study guide

Thanks for your feedback!