Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Lesson 7 of 39
❮Prev Next❯

Monitor Models, Agents and Search Indexes

Module 1: Plan & Manage ⏱ 10 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    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 needed

    Exam 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.

    Azure portal: Monitor models, agents and search indexes Open the agent dashboard, set continuous evaluation and check an index.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    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
    1. Open Operate ➜ Monitoring. Operational numbers come from Azure Monitor and Application Insights; groundedness and safety come from continuous evaluation of live traffic.
    2. 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.
    3. Quality drift shows up as a falling score. Add an alert rule so you hear about it before customers do.
    4. Check the search side. Search for AI Search and open the service behind the knowledge base.
    5. Type search in the search bar and pick AI Search under Services.
    6. 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).
    7. 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.

    😟 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
    🛠️ Solved with: Foundry monitoring, Application Insights and AI Search 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

    LayerToolWhat it tells you
    PlatformAzure Monitor metricsRequests, processed tokens, latency, errors and 429s per deployment
    BehaviourApplication Insights tracesEvery step of a run: model call, tool call, approval, retrieved passages
    Quality and safetyContinuous evaluation, guardrail eventsGroundedness, 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:

    1. Run continuous evaluation on a sample of live runs (for example 10%).
    2. Track groundedness, relevance and a safety evaluator over time.
    3. Alert when a score falls below your threshold.
    4. Open traces of low-scoring runs and see what was retrieved.
    5. Compare against the last known good change: version, prompt, index.

    Search health

    For the Azure AI Search index behind your knowledge base:

    SignalWhereAction
    Indexer status and failed itemsIndexer run historyFix unreadable files or permissions, rerun
    Document count vs sourceIndex statisticsA gap means ingestion is missing data
    Search latencySearch metricsAdd replicas or reduce query cost
    Throttled queriesSearch metricsAdd replicas
    RelevanceTest queries with expected results, click-throughTune 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

    Legal services

    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.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    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.

    Question 1

    Question 1 of 5

    Answer quality from a production agent has declined, but latency and error rates are normal. Which feature detects this kind of change?

    Question 2

    Question 2 of 5

    Groundedness scores fell after a policy update. The model version and prompt have not changed.

    What should you check first?

    Question 3

    Question 3 of 5

    Where can you inspect each model call, tool call and approval for a single agent run?

    Question 4

    Question 4 of 5

    Search queries on an Azure AI Search service are throttled during peak hours while the index size is small. What should you add?

    Question 5

    Question 5 of 5

    You want an alert when safety guardrails block an unusual number of requests. Which signals should you use?

    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. 1.Where do agent traces end up?Show

      In Application Insights.

    2. 2.Which evaluator measures support from retrieved content?Show

      Groundedness.

    3. 3.What do you add to a search service to handle more queries?Show

      Replicas.

    4. 4.Where do you see which documents an indexer couldn't process?Show

      The indexer run history.

    5. 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

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    Install MSDEVBUILD Azure

    Free · no account · works offline

    Save the whole course for offline ›

    Hi, I’m your Nimbus

    Your study buddy. Pick what we do next.

    MSDEVBUILD · Multi-Stack Dev Build

    Sign in to MSDEVBUILD

    One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.