Monitor Models, Agents and Search Indexes
30-second answer
Use Azure Monitor metrics for requests, tokens, latency and errors, Application Insights for traces of every model and tool call, and continuous evaluation to score a sample of live answers for groundedness, relevance and safety, which is how you spot drift. Alert on content filter and guardrail events. For Azure AI Search, watch indexer run history and failed items, document counts, search latency, throttled queries and relevance (click-through, evaluation with test queries). When groundedness falls, check the index before you blame the model.
Simulate it » No Azure account neededExam objective: 1.3.2 Monitor model performance, drift, safety events and grounding quality. 1.3.3 Monitor data ingestion quality, search index health and relevance performance. (Skills measured as of April 16, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
Open <strong>Operate ➜ Monitoring</strong>. Operational numbers come from <strong>Azure Monitor</strong> and <strong>Application Insights</strong>; groundedness and safety come from <strong>continuous evaluation</strong> of live traffic.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Open Operate ➜ Monitoring. Operational numbers come from Azure Monitor and Application Insights; groundedness and safety come from continuous evaluation of live traffic.
- In Settings, connect an Application Insights resource and turn on continuous evaluation for a sample of runs, so it doesn't cost as much as scoring every answer.
- Quality drift shows up as a falling score. Add an alert rule so you hear about it before customers do.
- Check the search side. Search for AI Search and open the service behind the knowledge base.
- Type search in the search bar and pick AI Search under Services.
- Indexers show each run: documents succeeded, failed and warnings. 120 PDFs failed, so the index is stale. Open the run to see why (here, password-protected files).
- Metrics show search latency, queries per second and throttled search queries percentage. Send logs to Log Analytics with a diagnostic setting to see slow queries.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Monitor models, agents and search
Azure Monitor metrics show requests, tokens, latency and errors. Application Insights holds traces, and continuous evaluation scores a sample of live answers for groundedness and safety. For Azure AI Search, watch indexer runs, document counts, search latency and throttled queries.
🤔 What happens if…
Read this tour as text
- Pick the right model or tool. A router in your app sends each job to the cheapest thing that does it well: a reasoning model for multistep problems, a small language model for high-volume labelling, a multimodal model for photos, and a Foundry Tool such as Content Understanding for invoices.
- Where an agent gets its facts. Curated company content lives in a Foundry IQ knowledge base on Azure AI Search. Files a user drops into the chat go to file search. What the agent learns about the user across sessions goes to memory (user profile, chat summary).
- Resource, projects and deployment types. One Foundry resource holds deployments, networking and keys. Projects inside it isolate teams. Global deployments may process anywhere, Data Zone stays in the EU or US zone, Standard stays in one region. The standard agent setup keeps threads, files and vectors in your own Cosmos DB, Storage and AI Search.
- Configure deployments and agent versions. A deployment pins a model, a model version, a deployment type, capacity (TPM) and a guardrail. An agent gets a new version every time you change it; the endpoint serves the version you choose, so you can roll back.
- CI/CD with an evaluation gate. The agent definition, prompts and Bicep live in Git. The pipeline signs in with workload identity federation (no secret), runs an evaluation on a test set, and only then promotes from dev to test to prod projects.
- Quotas, 429s, spillover and budgets. Quota is tokens per minute per model, per region, per deployment type. Each deployment gets a slice; RPM comes with it. Go over and you get HTTP 429 with a retry-after header. Provisioned throughput can spill over to a standard deployment, and a cost control can stop a project at its token budget.
- Monitor models, agents and search. Azure Monitor metrics show requests, tokens, latency and errors. Application Insights holds traces, and continuous evaluation scores a sample of live answers for groundedness and safety. For Azure AI Search, watch indexer runs, document counts, search latency and throttled queries.
- Keyless and private. The app uses a managed identity and Microsoft Entra ID tokens, with the Foundry User role on the resource. Local (key) auth is turned off. Public network access is disabled and a private endpoint in your VNet is the only way in.
- Guardrails at four intervention points. A guardrail is a set of controls: a risk (hate, violence, prompt attacks, indirect attacks, protected material, PII), the intervention point (user input, tool call, tool response, output) and the action (annotate, or annotate and block).
- Evaluate, red team and trace. Evaluators score answers: groundedness, relevance, coherence, safety, and agent ones like tool call accuracy and task adherence. The AI red teaming agent attacks before launch. Traces in Application Insights record every model call, tool call and approval for audit.
- Govern what the agent may do. Give the agent only the tools it needs (allowed tools), make risky tools require approval from a human, let the tool call guardrail check what it sends, and limit where a hosted agent can connect with network egress controls.
Traffic triples at noon and users see errors. Read quota, reproduce the 429s, fix them three ways, set a token budget, then check metrics, evaluation scores and the search index.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
Answers got worse after a policy update and nobody noticed for two weeks.
😊 THE SOLUTION
Watch quality and safety scores next to latency and tokens, and check the search index.
- Silent quality drift✓ Continuous evaluation with an alert
- Stale index✓ Indexer run history and failed documents
- Slow searches at peak✓ Search latency and throttling metrics
Start with a question
How do you know the agent got worse before the customers tell you?
Ravi runs the support agent. In the first week, answers were crisp and cited the right policy. In the fourth week, tickets started saying “the bot told me something wrong”. No alarm had fired. Latency was fine, errors were zero, and the model hadn’t changed.
What had changed was the policy library. A nightly import had been failing on 120 PDFs, so the agent kept answering from last quarter’s rules. You can’t see that in a latency chart. You need to watch quality and the data under it.
Explain it like I’m 10
The technical explanation
Three layers to watch
| Layer | Tool | What it tells you |
|---|---|---|
| Platform | Azure Monitor metrics | Requests, processed tokens, latency, errors and 429s per deployment |
| Behaviour | Application Insights traces | Every step of a run: model call, tool call, approval, retrieved passages |
| Quality and safety | Continuous evaluation, guardrail events | Groundedness, relevance and safety scores on live samples; blocked and flagged content |
Turn on tracing for the project by connecting an Application Insights resource, then use the Monitoring and Tracing pages in the Foundry portal. Set alerts on error rate, latency, token spikes, falling evaluation scores and guardrail blocks.
az monitor metrics list --resource <foundry-resource-id> --metric ProcessedPromptTokens GeneratedTokens TotalErrors --interval PT1H
Model and agent drift
Quality changes for ordinary reasons: a prompt edit, a new model version, new content in the index, or different questions from users. To catch it:
- Run continuous evaluation on a sample of live runs (for example 10%).
- Track groundedness, relevance and a safety evaluator over time.
- Alert when a score falls below your threshold.
- Open traces of low-scoring runs and see what was retrieved.
- Compare against the last known good change: version, prompt, index.
Search health
For the Azure AI Search index behind your knowledge base:
| Signal | Where | Action |
|---|---|---|
| Indexer status and failed items | Indexer run history | Fix unreadable files or permissions, rerun |
| Document count vs source | Index statistics | A gap means ingestion is missing data |
| Search latency | Search metrics | Add replicas or reduce query cost |
| Throttled queries | Search metrics | Add replicas |
| Relevance | Test queries with expected results, click-through | Tune analyzers, semantic ranker, chunking, or hybrid weights |
Replicas serve queries and give availability. Partitions hold more documents and speed up indexing. Turn on diagnostic settings to send search logs to Log Analytics so you can query them with KQL.
Architect level Why evaluate a sample and not every answer
Evaluators that use a model cost tokens and time, and they run on top of your own traffic. Scoring every live answer would add a large bill. A steady sample is enough to see a trend. When a score drops, increase the sample for a while and open the traces of the failing runs.
Real-world business scenario
Contoso Legal (fictional)
- The problem
- Lawyers started getting answers that cited superseded clauses, and nobody noticed for three weeks.
- What they used
- Application Insights tracing, continuous evaluation on 10% of runs with an alert when groundedness fell below 4.0, indexer failure alerts, and a search dashboard for latency and throttled queries.
- Why that choice
- The groundedness alert fired within a day of the failed import, and the indexer history showed 120 unreadable PDFs.
- The result
- The index was fixed in an afternoon, and the same alert caught a similar issue a month later in hours.
When to use it and when not to
✓ Use it when…
- The agent answers from data that changes.
- Wrong answers have a cost: legal, financial or safety.
- You want evidence of quality over time, not a gut feeling.
✕ Think twice when…
- You watch only latency and error counts.
- You turn tracing on but never review low-scoring runs.
- You evaluate every live answer and pay for it needlessly.
↔ Alternatives to consider
- Human review samples for high-risk domains, next to automated scores.
- Pre-release evaluation only for a small internal tool with static data.
- Third-party observability if your team already standardises on it through OpenTelemetry.
Test yourself with exercises
5 original practice questions in the AI-103 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner What would you look at first when users say answers got worse?
Model answer
I'd look at the continuous evaluation scores, mostly groundedness and relevance, and whether anything changed recently: a model version, a prompt, or the indexed content. The traces for a bad answer show what was retrieved and what the model saw.
Intermediate How do traces help you debug an agent?
Model answer
A trace shows each step in order: the user message, the model call with token counts, each tool call with its arguments, approvals, and the final answer. I can see that a bad answer came from an empty retrieval result, not from the model, for example.
Experienced developer Groundedness dropped from 4.6 to 3.4 after a policy update. How do you find the cause?
Model answer
I'd check the search index first. Did the nightly indexer fail, are the new policy documents missing, or are old and new versions both indexed? Then I'd compare traces of failing answers for their retrieved passages. If retrieval is fine, I'd test the prompt and the model version. Index problems are the most common cause.
Scenario Search is fast in the morning and slow at 3 PM. What do you check and change?
Model answer
Search latency and throttled queries in the metrics at that hour. If queries are throttled, I'd add replicas, because replicas serve queries. If the index is too large for the partitions, I'd add partitions. I'd also look at query shape, such as large top values or heavy semantic ranking.
Quick revision
Key points
- Azure Monitor gives metrics, Application Insights gives traces, continuous evaluation gives quality scores.
- Drift shows up as falling groundedness or relevance. Check recent changes first.
- Alert on safety and guardrail events, error rates and latency.
- For search, watch indexer failures, document counts, latency and throttled queries.
- Replicas scale query load. Partitions scale storage and indexing.
Important terminology
- Continuous evaluation
- Scoring a sample of live agent responses with evaluators such as groundedness and safety, so quality changes show up as a metric.
- Drift
- A slow change in answer quality or behaviour over time, caused by new data, changed prompts, a new model version or shifting user questions.
- Application Insights
- The Azure Monitor feature that stores traces, requests, dependencies and logs. Foundry sends OpenTelemetry traces of model and tool calls to it.
- Indexer run history
- A record of each indexer execution in Azure AI Search with status, documents processed, and the items that failed and why.
- Throttled queries
- Search requests rejected because the service is at capacity. A sign that replicas are too few for the query load.
- Grounding quality
- How well an answer is supported by the retrieved content. Measured by the groundedness evaluator.
Common mistakes
- Blaming the model when the index was stale.
- Monitoring latency only and never answer quality.
- Having traces on but never checking failed indexer items.
Exam tips
- "Detect quality decline in production" = continuous evaluation.
- "See why an agent chose a tool" = traces in Application Insights.
- "Search queries are throttled at peak" = add replicas.
- "Documents missing from answers" = check indexer run history.
Five quick revision questions
-
1.Where do agent traces end up?Show
In Application Insights.
-
2.Which evaluator measures support from retrieved content?Show
Groundedness.
-
3.What do you add to a search service to handle more queries?Show
Replicas.
-
4.Where do you see which documents an indexer couldn't process?Show
The indexer run history.
-
5.What can cause drift besides the model?Show
Changed prompts, new data and shifting user questions.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Secure Foundry: Managed Identity, Keyless Auth and Private Networking
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.