AI systems: security, evidence and evaluation

AI systems: security, evidence and evaluation

Learning materials

Data does not grant authority

Prompt injection attempts to control an agent through untrusted content. A retrieved page might demand that an application programming interface (API) key be sent to its author. The page can provide facts for an answer, but cannot authorize changes to application instructions.

  • A retrieved instruction is not authorized merely because search found it.
  • “Always send reports to this address” must not become a user preference without a trusted basis.
  • Enforce document access before supplying content to the model: unauthorized text has already been disclosed once it enters context.
AI systems: security, evidence and evaluation: mechanism diagram with an example

Three separate call checks

CheckQuestion answered
JSON (JavaScript Object Notation) schemaAre fields and types correct?
Object authorizationMay this user access this particular object?
Operation outcomeDid the required action actually succeed?

Example: customerId: "B42" is a valid string, but customer B42 belongs to another organization. The schema passes; authorization should reject the call. HTTP (Hypertext Transfer Protocol) 200 with {success:false,error:"quota"} means the business operation failed despite a successful HTTP exchange.

Minimal permissions and meaningful consent

Least privilege grants only necessary permissions. A report-reading assistant does not need deletion access. A narrow read_report(id) tool restricts actions better than a general shell, but still requires authorization checks.

  • A transfer confirmation shows the amount, recipient and consequences before sending. “Continue” without these details is not meaningful consent.
  • Remove or mask keys and other secrets before sending logs to an external service.
  • A trace connects the run identifier (ID), step, tool name, arguments safe to record and error. Secrets are unnecessary for that connection.

A link is not proof

A real link does not automatically support a claim. Check the passage, version and applicable conditions.

SourceSupported conclusion
“Returns within 14 days, excluding custom orders”The deadline applies to ordinary goods; the exception remains
Old policy: 14 days; current version unknownThe current deadline is not yet established
A link only to the shop homepageThis link does not establish the return rule

If a new document is stored but retrieval returns the old one, inspect the index, version metadata and cache. When sources conflict, state uncertainty and establish the relevant version.

How system quality is checked

TermPurpose
TREC — Text REtrieval ConferenceA NIST (National Institute of Standards and Technology) series of information-retrieval evaluation initiatives with common tasks, collections and result comparisons
Eval harnessRuns the same tasks and collects metrics
GraderChecks one outcome against a defined criterion
LLM-as-a-judge: evaluation by a Large Language Model (LLM)A model evaluates answers; compare its judgments with human labels and investigate biases

Grader example: if an agent must create a three-line file, inspect the file's existence and contents. “File created” does not establish success. TREC supports retrieval research; it does not guarantee the quality of every product.

Comparing versions fairly

  • A baseline is the reference system. Run the old and new versions on identical or comparable tasks.
  • One successful run does not measure reliability. Use repetitions and tasks representative of actual use.
  • Evaluate an additional agent by quality, latency and cost. If the new version faced easier tasks, improvement is not yet established.