How agentic RAG works: find the question a travel document cannot answer
Start here
In this lesson
- What does basic RAG supply?
- Read the top three results for the insurance question
- Name the gap in the Maldives result
- Split the last answer into two claims
What does basic RAG supply?
The application retrieves material related to a request and adds it to the context the model uses to answer. Company-specific travel insurance is a good example of information that the model’s training alone cannot reliably supply. The agentic example adds a decision: is the retrieved material sufficient? If a piece is missing, the agent can break the request into tasks and use another source or tool.
Separate an answer into its sources
At 03:58 the dictionary contains three sample values: Maldives 28 °C, Swiss Alps 7 °C and African safaris 24 °C. These fixed inputs cannot answer a traveller asking about today’s weather. They do, however, make a good test of whether the agent used the correct destination key.
The prompt combining search context and the user query 03:02 · Microsoft Learn
Three steps at the screen
- For insurance coverage, locate the supporting passage.
- For temperature, a matching place name is insufficient.
- For a two-condition recommendation, identify distinct evidence for the offering and the temperature.
Read the top three results for the insurance question
The notebook uses a small travel index. When the traveller asks about Contoso’s coverage, the application requests three results. Expand the context panel and inspect the first in particular. Three relevant hits do not mean three documents establish coverage. Identify the passage that supports the question before reading the model’s explanation.
Retrieved documents for the insurance request. 05:04 · Microsoft Learn
Name the gap in the Maldives result
Search shows that the company offers the destination. It does not supply the requested average temperature. The instructions direct the agent to review the context and try another function when needed. A temperature plugin takes the destination as input and returns a sample value. It is neither a current measurement nor a forecast. The demonstrated result is that the missing kind of information was obtained from a second source.
Three sample values in the temperature plugin 03:58 · Microsoft Learn
Write down the conditions for a cold-destination recommendation before reading it. Knowing that the Swiss Alps are cold cannot establish that the company offers them. You need the catalogue entry and the temperature result together.
Split the last answer into two claims
The traveller wants a cold destination offered by the company and its average temperature. First establish which destinations are in the offering; then obtain temperature information for the selected place. The run suggests the Swiss Alps. Write the document-backed claim and function-backed value separately. The number of steps taken cannot establish correctness. Each part of the answer needs evidence you can point to.
The cold-destination request and the company’s offerings in context. 06:46 · Microsoft Learn
Compare the tool value with the response
At 05:51 the Maldives line returns 82 °F and 28 °C. Check that the assistant carries those values into its reply. A changed unit, a different place or the addition of “today” would misrepresent the sample. Fahrenheit and Celsius express the same entry; they are not two independent sources of evidence.
Expanded Maldives call and return value 05:51 · Microsoft Learn
Worked example · Read the run at three stops
Pause | Where to look | How to interpret it |
|---|---|---|
Insurance policy | Inspect the three retrieved results. Mark the document supporting a claim about coverage. A matching word in another document does not make it policy evidence. | |
Maldives temperature | The company serves the destination, but its document lacks the temperature. Put the missing information and the plugin that supplies it in separate columns. | |
Cold place on offer | Check two things about the Swiss Alps recommendation. Is it in the catalogue? Which call supplied the temperature? Even with the first established, the temperature remains open without the second. |
Try it yourself · Run a missing-evidence experiment
Answer the final request twice. First allow only the destination document; next allow only the temperature plugin. The first answer can establish what the company offers but cannot supply the temperature. The second can return a value for a place but cannot prove the company serves it. Combine the results and write the supporting source beside each claim.
Check your reasoning
If one source is unavailable, decide which statement can stand and which must remain unverified. This avoids turning a missing result into an invented recommendation.
Troubleshooting
Observation | Check | Expected result |
|---|---|---|
Place name found, no temperature | Does the retrieved passage give a measurement and unit? | Use a suitable tool or report the missing information. |
A fixed value becomes a forecast | Inspect how the plugin defines its data. | Limit the conclusion to the sample average. |
Two review questions
- Should the weather tool run for the insurance question?
- If the temperature tool fails, what can still be reported?
Check your reasoning
- If the context establishes coverage, there is no need for it.
- The document-backed destination information, with the temperature marked unverified. Do not fill the gap with a guess.
Short glossary
Index: searchable documents. Retrieved context: passages available to ground an answer. Plugin: a separate operation that can supply missing information.
Sources and version note
Azure AI Search documentation explains retrieval and grounding. The recording combines search with a separate plugin; it is not a setup tutorial for a managed agentic retrieval product. Microsoft