Implement generative AI and agentic solutions 2.1 Build generative applications by using Foundry

A Foundry IQ knowledge base has four knowledge sources and uses low retrieval reasoning…

Study guide skill: Implement retrieval-augmented generation (RAG) in an application

Question B4-016

A Foundry IQ knowledge base has four knowledge sources and uses low retrieval reasoning effort (preview), so the LLM decides which sources to query. A compliance-policy knowledge source must be searched on every request, even when the LLM wouldn't select it. What should you do?

Select one answer.

  • A Add retrievalInstructions telling the LLM to prefer the compliance-policy source
  • B Set alwaysQuery to true on the compliance-policy knowledge source ✓ Correct answer
  • C Move the compliance-policy content into a second knowledge base on another search service
  • D Rename the compliance-policy knowledge source so the LLM is more likely to select it

Answer: B

Setting alwaysQuery to true includes a knowledge source in every query, regardless of the retrieval reasoning effort. At low and medium effort, the source name, the index description, and retrievalInstructions only inform or guide the LLM's selection, so they can't guarantee it. A knowledge source and its knowledge base must be on the same search service.

Deep dive

How it works

In a Foundry IQ knowledge base, the retrieval reasoning effort (preview) controls how much LLM processing each query gets. At low and medium effort, an LLM picks which knowledge sources to query, and the page lists what informs that choice:

  • The name of the knowledge source.
  • The description of the index (for indexed knowledge sources).
  • The retrievalInstructions in the knowledge base definition or the retrieve action. They guide which sources the LLM selects or skips, and work like a prompt.

All three only inform or guide the LLM. None of them guarantees a source is chosen on a given request.

For a hard guarantee there's a dedicated switch: set alwaysQuery to true on the knowledge source definition, and it's included in every query, regardless of the retrieval reasoning effort. The other three sources stay subject to the LLM's selection.

The other options, and when you'd use them

  • retrievalInstructions: They guide the LLM's selection like a prompt, so they can't guarantee the source is queried every time.
  • A second knowledge base on another search service: A knowledge source and its knowledge base must be on the same search service, and splitting them still doesn't force the source into each query.
  • Rename the source: The name is one factor that informs selection. It makes selection more likely, not certain.

Exam tip

"Must be searched on every request" = alwaysQuery: true. Names, descriptions and retrievalInstructions only steer the LLM.

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 Generative AI & agents questions · AI-103 study guide

Thanks for your feedback!