Sari la conținut
aiqbenchInformații despre AI & calcul cuantic
ȘtiriAnalizeBenchmark-uriSkill-uriÎntreabă AIÎnvațăDespre
...Se încarcă sesiunea
ȘtiriAnalizeBenchmark-uriSkill-uriÎntreabă AIÎnvațăDespre

Română · beta. Traducerea a fost făcută automat și este încă în curs de revizuire. Citește pagina în engleză

  1. Joburile viitorului
  2. ›
  3. AI Security Engineer
  4. ›
  5. Lecția 6 din 8

Lecțiile acestui traseu sunt publicate deocamdată doar în engleză, așa că lecția de mai jos apare în engleză. Restul — module, quiz și materiale — funcționează la fel.

Detection, Monitoring and Incident Response for AI Systems

Intermediar¶ Citire · 5 min⚑ Misiune · 35 min◆ Quiz · 4 întrebări

Vei putea să:

You can specify what an AI system must log to be investigable (prompts, retrieved context, tool calls, model versions, policy decisions), place input/output classifiers where they help without pretending they are a boundary, and run an incident through the NIST lifecycle with AI-specific containment steps such as revoking tool credentials and rolling back a model or index.

You cannot investigate what you did not record

Traditional incident response assumes the system is deterministic: replay the request, see the bug. An AI system is not. The same prompt can produce different outputs, the "code" includes a model version and an index snapshot that both change, and the harmful event may have been a perfectly well-formed request that the model simply obeyed. Detection and response for AI therefore start with one decision: what gets logged.

The minimum investigable record

For every model call, capture:

  1. Identity and session — which user, which tenant, which agent run.
  2. The full prompt as assembled — system prompt version, the user message, and the exact retrieved chunks or tool results that were included. Not "the query"; the context the model actually saw.
  3. The model identifier and parameters — provider, model version, temperature, any safety settings.
  4. The raw output — before post-processing, and the post-processed version.
  5. Tool calls — name, arguments, result, and whether a gate was shown and what the human chose.
  6. Policy decisions — which classifiers ran, their scores, and what the application did with them.

The OpenTelemetry semantic conventions for generative AI define attribute names for most of this, which matters because consistent naming is what lets you query across services during an incident rather than grepping four log formats. Retention and access to these logs is itself a privacy question — prompts contain personal data — so they need the same controls as any sensitive store, and a stated retention period.

Detection: what good signals look like

Few AI attacks are detectable from a single request. Patterns are.

  • Injection attempts often appear as instruction-like text inside retrieved content or tool results. A classifier such as Llama Guard, or a simpler rule set, scoring the context rather than only the user's message, gives a signal; the Llama Guard paper is a clear account of how such input/output safeguards are built and, importantly, how they are evaluated. Treat scores as telemetry — a rise in flagged documents from one source is an alert — not as a boundary (module 2).
  • Extraction shows up as query volume and coverage: one client systematically sweeping the input space, or many accounts with correlated traffic.
  • Data leakage shows as outputs that contain patterns from the sensitive class — account numbers, another tenant's identifiers. Output-side scanning for known formats is cheap and catches the embarrassing cases.
  • Agent anomalies: tool calls to destinations never seen before, an unusual sequence (read many records, then one outbound call), or an approval rate that jumps to 100% overnight.
  • Drift: a sudden change in the distribution of outputs, categories or refusal rates after a model or index update is often the first sign that something upstream changed under you.

Alert on changes relative to a baseline rather than on absolute values; the baseline for an AI system moves with every model release, so re-establish it deliberately after each one.

Response: the NIST lifecycle, with AI-specific steps

NIST SP 800-61 Rev. 2 structured response as preparation, detection and analysis, containment, eradication and recovery, and post-incident activity; Rev. 3 (April 2025) replaces that cycle with a new model built on the CSF 2.0 functions — Govern, Identify and Protect as preparation, which NIST treats as broader risk management rather than incident response itself; Detect, Respond and Recover as the response (incident analysis, containment and eradication are Respond categories); and Identify's Improvement category taking lessons learned from every function continuously rather than only after the incident. The old phases still work as a checklist; the content changes.

Containment for an AI system means removing capability fast: revoke or rotate the agent's tool credentials; switch consequential tools to require approval or disable them; pin the model to a known-good version; take a suspect index or document source offline. Because a compromised model or index affects every user, containment is usually broader and faster than for a conventional bug.

Eradication asks which artefact was the problem. A poisoned document in the retrieval index is removed and the source quarantined. A backdoored or regressed model is rolled back using the registry record from module 3, which is why that record must exist before the incident. A leaked system prompt is rotated along with any secrets it contained — and it should never have contained secrets.

Recovery restores capability with the fix verified: replay the incident's logged prompts against the fixed system and confirm the behaviour is gone.

Worked example: the cross-tenant quote

A user reports that the RAG assistant quoted another customer's contract.

  1. Detection: the report. What should have caught it: an output scanner for tenant identifiers that do not match the session's tenant.
  2. Triage: pull the logged context for the session. Did the retrieved chunks include the other tenant's document? If yes, the fault is in retrieval filtering (a missing tenant filter on the vector query), not the model.
  3. Containment: disable retrieval for the affected corpus, or enforce the tenant filter at the query layer immediately.
  4. Eradication: fix the filter; audit the index for cross-tenant chunks; check whether the bug existed since the index was built.
  5. Recovery: replay the logged query; confirm only the correct tenant's chunks return.
  6. Post-incident: add the tenant check to the retrieval layer's tests, add the output scanner, and estimate exposure from the logs — which users saw which foreign chunks — for disclosure obligations.

Without the retrieved-chunks log, step 2 takes days of guesswork; with it, an hour.

What is still unsettled

There is no agreed standard for what counts as an "AI security incident" versus a model quality issue, which complicates disclosure. Prompt logging conflicts with data-minimisation obligations, and organisations resolve it differently. Detection of subtle manipulation of outputs — a model persuaded to give slightly wrong advice — has no reliable signal today.

What to remember

  • Log the context the model actually saw, the model version, tool calls and policy decisions; this is the difference between an hour and a week.
  • Classifiers and scanners are telemetry, not boundaries; alert on changes from a baseline that you re-establish after every model release.
  • Containment for AI is revoking capability: credentials, tools, model pins, index sources.
  • Eradication depends on registry and provenance records that must exist before the incident.

Verifică-te

Se încarcă întrebările…

Misiunea modulului

30–40 min

Decision 6 of the case file. Write the incident runbook for one scenario: a customer reports that the chat widget quoted another customer's contract. Lay out detection (what signal would have caught it earlier), triage questions, containment in order (what do you switch off first?), eradication (index, model, permissions), recovery and the changes afterwards. Then list the six log fields that would have made the investigation take an hour, not a week.

Deschide Case file: Halden Assist →

Cum arată un răspuns bun

  • Containment is ordered, and the first step stops further exposure before anyone looks for the cause.
  • Triage asks how many customers and which documents, and says how you would find out with today's logs.
  • Eradication fixes the cause in the architecture (how customers are separated), not only the one query.
  • The six log fields are specific enough to implement, and include what was retrieved and for whom.
  • The runbook says who is told and when, including the affected customer.

Se încarcă lucrarea ta…

Materiale selectate

1.7h

Munca de profunzime se întâmplă aici — lecția este briefingul tău.

  • NIST SP 800-61 Rev. 3: Incident Response Recommendations and Considerations for Cybersecurity Risk ManagementDocumentație· 40 min
  • Inan et al.: Llama Guard — LLM-based Input-Output Safeguard for Human-AI ConversationsLucrare· 35 min
  • OpenTelemetry Semantic Conventions for Generative AI systems (what to trace on every model and tool call)Documentație· 25 min

În direct pe aiqbench

Subiectul acestei lecții în restul site-ului, astăzi.

În știri, ultimele 30 de zile

  • Hackers Hide Password-Stealing Malware in GitHub Code, Putting Software Downloads at RiskCybersecurity News · 26 nov.
  • Silver Fox Hackers Use Fake Software Downloads to Spread Gh0stRAT Malware That Can Spy on PCsCybersecurity News · 26 nov.
  • MINE: A Training-Free Defense against Indirect Prompt Injection via Mutual Information and Embedding VariancearXiv · 26 nov.
Mai multe știri pe acest subiect →

Mergi mai departe

  • Cum funcționează clasamenteleCum se combină scorurile și ce nu poate spune un loc în clasament.
  • Întreabă AI despre această lecțieDeschide Întreabă AI cu o întrebare despre această lecție, cu răspuns din arhiva de știri, cu surse.
  • Skill-uri de agent pentru această muncăSkill-uri gata făcute pentru agenți AI de programare, verificate și evaluate.
← Lecția anterioară5. Securing Agents and Tool Use — Least Privilege, Sandboxes, Gates, EgressLecția următoare →7. A Secure Development Lifecycle for AI — Threat Modelling, Testing, Red Teams, Regulation
aiqbench
Informații despre AI & calcul cuantic© aiqbench. Toate drepturile rezervate.

Fluxuri:RSS·JSON Feed

LimbăEnglish·Românăbeta
ȘtiriAI & tehnologieCuanticAnalize
ExploreazăBenchmark-uriÎnvață
CompanieDespreÎncredereInformații legaleTermeni și condițiiPolitica de confidențialitateNotificări privind drepturile de autorȘtergerea datelorRaportează conținut

Perspectiva aiqbench, analizele, rezumatul zilnic și răspunsurile din Întreabă sunt scrise de modele AI din sursele afișate, fără revizuire editorială înainte de publicare. Pot conține erori — verifică sursa. Cum este folosit modelul →

  • Știri
  • Analize
  • Întreabă
  • Topuri
  • Cont