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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
# Auditing

**Auditing** is a Hugging Face organization focused on the **independent examination, traceability, verification and assurance of AI systems**.

The project explores how models, agents, data pipelines, tools and AI infrastructure can be audited in a way that is **evidence-based, reproducible and useful in real-world deployments**.

As AI systems become more autonomous, organizations need to answer more than:

> **Does the system perform well?**

They also need to ask:

> **What happened, why did it happen, which components were involved, which controls were applied, and can the result be independently verified?**

That is the focus of **Auditing**.

---

## What is AI auditing?

**AI auditing** is the structured examination of an AI system, its behavior, controls, evidence and operational context against defined technical, organizational or regulatory criteria.

An AI audit may examine:

- models,
- prompts and system instructions,
- datasets,
- retrieval systems,
- agent behavior,
- tool calls,
- permissions,
- memory,
- logs and traces,
- evaluation results,
- safety controls,
- infrastructure,
- human approvals,
- governance processes,
- incidents,
- documentation,
- model and system changes.

The goal is not merely to collect logs.

The goal is to create **verifiable evidence** about how an AI system was designed, deployed and operated.

---

## Auditing vs. Evaluation vs. Validation vs. Observability

These disciplines overlap, but they are not the same.

| Discipline | Core question |
|---|---|
| **Evaluation** | How well does the AI system perform? |
| **Validation** | Is the system suitable for the intended purpose and requirements? |
| **Observability** | What is happening inside the system during operation? |
| **Auditing** | Can system behavior, controls and evidence be independently examined and verified? |

A useful mental model is:

```text
EVALUATION
How good is the system?
        β”‚
        β–Ό
VALIDATION
Is it suitable for the intended use?
        β”‚
        β–Ό
OBSERVABILITY
What is happening in operation?
        β”‚
        β–Ό
AUDITING
Can we reconstruct and verify what happened?
```

Auditing can use outputs from all three other layers.

---

# The AI Audit Stack

An AI audit can span the complete lifecycle of a system.

```text
                         AI AUDIT STACK

                              SCOPE
                                β”‚
                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                β”‚               β”‚               β”‚
              MODEL           DATA           AGENT
                β”‚               β”‚               β”‚
                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                             CONTROLS
                                β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚                     β”‚                     β”‚
      Permissions            Policies             Guardrails
          β”‚                     β”‚                     β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                            EVIDENCE
                                β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚                     β”‚                     β”‚
        Logs                  Traces               Tests
          β”‚                     β”‚                     β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                          AUDIT FINDINGS
                                β”‚
                         REMEDIATION
                                β”‚
                         RE-AUDIT / REVIEW
```

A mature audit process connects technical evidence with clearly defined requirements and controls.

---

# What can be audited?

## 1. Models

Model auditing can examine:

- model identity and provenance,
- architecture,
- version,
- weights,
- model card,
- training and fine-tuning information,
- benchmark claims,
- evaluation results,
- known limitations,
- licensing,
- safety behavior,
- model changes over time.

A key audit question is:

> **Can the deployed model be traced to a specific version and documented source?**

---

## 2. AI agents

Agentic systems introduce additional audit requirements because they can make decisions, call tools and execute actions.

An agent audit may include:

```text
Goal
  β”‚
Context
  β”‚
Model
  β”‚
Plan
  β”‚
Tool Selection
  β”‚
Tool Call
  β”‚
Permission Check
  β”‚
Action
  β”‚
Observation
  β”‚
Next Decision
  β”‚
Outcome
```

For every important action, an auditor may want to know:

- Which agent initiated it?
- Which model version was used?
- What context was available?
- Which tool was selected?
- Which parameters were passed?
- Which permissions were active?
- Was human approval required?
- What did the tool return?
- What happened next?
- Was the final result successful?
- Were any safety controls triggered?

This creates the foundation for an **Agent Audit Trail**.

---

## 3. Tool use

Tools turn AI from a prediction system into an action system.

Relevant audit dimensions include:

- tool inventory,
- tool ownership,
- tool permissions,
- argument validation,
- authentication,
- authorization,
- execution logs,
- error handling,
- rate limits,
- external side effects,
- data exposure,
- human approval.

A tool call should ideally be traceable from:

```text
Agent Decision
      β”‚
      β–Ό
Tool Request
      β”‚
      β–Ό
Authorization
      β”‚
      β–Ό
Execution
      β”‚
      β–Ό
Tool Response
      β”‚
      β–Ό
Agent Follow-up
```

---

## 4. Data and retrieval

AI auditing can also examine the data layer.

This may include:

- data provenance,
- data quality,
- access rights,
- retention,
- sensitive information,
- retrieval sources,
- vector databases,
- document versions,
- grounding evidence,
- citation behavior,
- dataset changes.

For retrieval-augmented systems, an important question is:

> **Can the generated output be traced back to the information that supported it?**

---

## 5. Prompts and system instructions

Prompts can materially affect model behavior.

Audit evidence may therefore include:

- system prompts,
- prompt templates,
- version history,
- hidden instructions,
- dynamic context,
- policy prompts,
- tool instructions,
- prompt changes.

Prompt versioning becomes particularly important in production systems where behavior changes without changing the underlying model.

---

## 6. Memory

Agent memory introduces persistent state.

An audit may examine:

- what information is stored,
- why it was stored,
- how long it is retained,
- who can access it,
- whether the memory can be changed,
- whether the user can correct it,
- whether memory affected a decision.

A useful audit record can connect:

```text
Stored Memory
      β”‚
      β–Ό
Retrieved Memory
      β”‚
      β–Ό
Agent Context
      β”‚
      β–Ό
Decision
      β”‚
      β–Ό
Action
```

---

## 7. Permissions and identity

Autonomous systems should not be treated as having unlimited authority.

Auditing can examine:

- agent identity,
- service accounts,
- API credentials,
- role-based access,
- scoped permissions,
- delegation,
- temporary permissions,
- approval workflows,
- privileged actions.

A critical principle is:

> **The ability of an AI system to perform an action should be distinguishable from its ability to decide that the action is appropriate.**

---

## 8. Human oversight

Many systems include human review or approval.

Audit evidence can capture:

- when human review was required,
- who approved an action,
- what information the reviewer saw,
- whether the recommendation was accepted,
- whether the human modified the result,
- escalation events,
- override decisions.

This creates traceability between automated and human decisions.

---

# Agent Audit Trail

A practical audit trail for an AI agent might contain:

| Field | Example purpose |
|---|---|
| Agent ID | Identify the executing agent |
| Session ID | Group related activity |
| Model | Record model and version |
| Goal | Capture intended objective |
| Input | Record user/system input |
| Context | Identify relevant runtime context |
| Tool | Record selected tool |
| Tool arguments | Record requested action |
| Permission | Record authority used |
| Human approval | Record required approval |
| Observation | Record tool/environment response |
| Decision | Record next agent step |
| Output | Record final result |
| Cost | Track execution economics |
| Latency | Track performance |
| Safety event | Record control activation |
| Timestamp | Establish chronology |
| Trace ID | Connect events across systems |

The exact schema depends on the use case, risk level and technical architecture.

---

# From logging to auditability

Logging alone does not automatically create auditability.

An audit-ready system needs evidence that is:

**Structured**  
Events should have consistent fields.

**Timestamped**  
The sequence of events should be reconstructable.

**Versioned**  
Models, prompts, policies and tools should be identifiable.

**Tamper-aware**  
Audit evidence should be protected against unauthorized modification.

**Contextual**  
A log entry without relevant context may not explain what happened.

**Searchable**  
Auditors need to find related events across systems.

**Retained appropriately**  
Evidence must exist long enough to support the intended audit process.

**Interpretable**  
Technical traces should be understandable to the intended reviewer.

---

# AI Audit Lifecycle

A practical audit lifecycle can look like this:

```text
1. DEFINE SCOPE
       β”‚
       β–Ό
2. IDENTIFY SYSTEM
       β”‚
       β–Ό
3. MAP RISKS & CONTROLS
       β”‚
       β–Ό
4. COLLECT EVIDENCE
       β”‚
       β–Ό
5. TEST CONTROLS
       β”‚
       β–Ό
6. REPLAY / RECONSTRUCT EVENTS
       β”‚
       β–Ό
7. DOCUMENT FINDINGS
       β”‚
       β–Ό
8. REMEDIATE
       β”‚
       β–Ό
9. RE-TEST
       β”‚
       β–Ό
10. CONTINUOUS ASSURANCE
```

Not every audit requires every step in the same form.

The scope should reflect the system, intended use and risk.

---

# Audit scope

One of the most important audit decisions is defining scope.

Possible scopes include:

### Model audit
Focus on a specific model and its documented properties.

### Agent audit
Focus on autonomous decisions, tool use and actions.

### Application audit
Focus on the complete AI-powered application.

### Data audit
Focus on data sources, provenance, quality and access.

### Infrastructure audit
Focus on serving, runtime, identity, permissions and deployment.

### Process audit
Focus on organizational controls and lifecycle processes.

### Incident audit
Reconstruct a specific failure or harmful event.

### Continuous audit
Continuously collect and test evidence from production systems.

---

# Evidence types

AI audits can draw from many evidence sources.

```text
Model cards
Technical reports
Licenses
System prompts
Configuration
Source code
Model versions
Dataset metadata
Evaluation reports
Red-team results
Traces
Application logs
Tool logs
API logs
Approval records
Access-control records
Incident reports
Change history
Deployment manifests
Monitoring dashboards
```

The strength of an audit depends heavily on the quality of its evidence.

---

# Control categories

A useful audit framework may group controls into categories.

## Governance controls

- ownership,
- accountability,
- policies,
- documentation,
- approval processes,
- change management.

## Model controls

- model selection,
- versioning,
- evaluation,
- validation,
- safety testing,
- release criteria.

## Data controls

- provenance,
- access,
- quality,
- retention,
- privacy,
- integrity.

## Agent controls

- autonomy limits,
- tool permissions,
- delegation,
- escalation,
- approval requirements.

## Security controls

- authentication,
- authorization,
- secrets,
- sandboxing,
- isolation,
- incident response.

## Operational controls

- monitoring,
- observability,
- logging,
- rollback,
- reliability,
- cost limits.

## Human controls

- review,
- escalation,
- override,
- accountability,
- training.

---

# Auditing autonomous AI systems

Autonomous systems change the audit problem.

Traditional software generally executes predefined logic.

An agent may dynamically choose:

- which subtask to perform,
- which tool to call,
- which information to retrieve,
- which model to use,
- whether to continue,
- when to stop.

This creates a new audit requirement:

> **Audit the decision trajectory, not only the final output.**

Two agent runs can produce the same answer while following very different paths.

One path may be safe and efficient.

Another may involve unnecessary data access, incorrect tool calls or excessive cost.

This is why trajectory-level evidence is important.

---

# Auditability by design

Auditability is easier when it is designed into the system from the beginning.

A useful architecture may expose:

```text
                AI APPLICATION
                       β”‚
                ORCHESTRATION
                       β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚             β”‚             β”‚
       Model         Tools         Memory
         β”‚             β”‚             β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
                    TRACING
                       β”‚
                    LOGGING
                       β”‚
                 AUDIT STORE
                       β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚            β”‚            β”‚
       Review       Testing      Reporting
```

Auditability should not be an afterthought added only after an incident.

---

# Continuous auditing

AI systems can change quickly.

Changes may include:

- model updates,
- prompt updates,
- retrieval data updates,
- tool changes,
- new permissions,
- policy changes,
- infrastructure changes,
- new agent capabilities.

A one-time audit therefore provides only a point-in-time view.

Continuous auditing can supplement periodic reviews by automatically checking selected evidence and controls.

Examples:

- unapproved model changes,
- new tools,
- permission expansion,
- missing trace data,
- unusual tool usage,
- failed safety checks,
- excessive costs,
- unexpected data access,
- repeated human overrides.

---

# Auditing multi-agent systems

Multi-agent architectures add another layer of complexity.

An audit may need to reconstruct:

```text
User
 β”‚
 β–Ό
Supervisor Agent
 β”‚
 β”œβ”€β”€ Research Agent
 β”‚       └── Web / Retrieval
 β”‚
 β”œβ”€β”€ Analysis Agent
 β”‚       └── Models / Data
 β”‚
 └── Action Agent
         └── External Tool
```

Important questions include:

- Which agent delegated the task?
- Which agent had authority?
- Was context transferred correctly?
- Which agent produced the final decision?
- Could one agent escalate permissions through another?
- Can the complete chain be reconstructed?

Audit evidence should preserve delegation relationships.

---

# Auditing model routing

Systems increasingly route tasks between different models.

Auditability may require capturing:

- routing decision,
- routing policy,
- available models,
- selected model,
- model version,
- reason or rule for selection,
- fallback behavior,
- cost,
- latency,
- outcome.

This is especially important when different models have different capabilities, licenses or deployment constraints.

---

# Auditing RAG systems

Retrieval-Augmented Generation adds additional audit dimensions:

```text
Question
   β”‚
Retrieval Query
   β”‚
Retrieved Documents
   β”‚
Document Versions
   β”‚
Context Assembly
   β”‚
Model Output
   β”‚
Citations
```

Potential checks include:

- source provenance,
- access permissions,
- retrieval relevance,
- outdated documents,
- unsupported claims,
- source-to-answer traceability.

---

# Auditing open and open-weight models

Open models create additional opportunities for technical inspection.

An audit may examine:

- model provenance,
- repository history,
- model files,
- license,
- architecture,
- dependency chain,
- quantized variants,
- adapters,
- fine-tunes,
- evaluation artifacts,
- deployment configuration.

Open access does not automatically mean that a system is trustworthy, compliant or safe.

It does, however, enable forms of inspection that may not be possible with a fully closed model.

---

# AI auditing and security

AI auditing and AI security overlap but serve different functions.

Security asks:

> **How do we protect the system?**

Auditing asks:

> **Can we verify whether the expected protections existed and worked?**

Security evidence may include:

- access logs,
- permission changes,
- secret rotation,
- authentication events,
- sandbox violations,
- network access,
- anomalous behavior,
- incident records.

Auditing can use this evidence to test whether controls were operating as intended.

---

# AI auditing and governance

Governance defines responsibilities, rules and decision structures.

Auditing examines whether those structures are implemented and evidenced.

A governance policy might say:

> High-impact agent actions require human approval.

An audit might test:

1. Which actions are classified as high impact?
2. Was the approval mechanism technically enforced?
3. Are approval events logged?
4. Can approvals be linked to the corresponding action?
5. Were any actions executed without approval?

This turns governance language into testable controls.

---

# Framework alignment

AI auditing does not need to depend on one framework.

Audit programs may map evidence and controls to internal requirements or external frameworks.

Examples include:

- **NIST AI Risk Management Framework (AI RMF)**
- **ISO/IEC 42001 AI Management Systems**
- organizational policies,
- sector-specific requirements,
- contractual obligations,
- applicable laws and regulations.

NIST describes its AI RMF as a voluntary framework for managing AI risk throughout the lifecycle, while ISO/IEC 42001 specifies requirements for establishing and continually improving an AI management system.

Auditing can provide evidence for checking whether selected requirements and controls have actually been implemented.

---

# Audit metrics

No single metric determines whether an AI system is auditable.

Useful operational indicators may include:

| Metric | What it can indicate |
|---|---|
| Trace Coverage | Share of relevant executions with complete traces |
| Evidence Completeness | Availability of required audit fields |
| Model Version Coverage | Ability to identify model versions |
| Tool Call Traceability | Ability to reconstruct tool executions |
| Approval Coverage | Required actions with recorded approval |
| Unexplained Action Rate | Actions lacking sufficient evidence |
| Control Failure Rate | Frequency of failed controls |
| Override Rate | Frequency of human overrides |
| Audit Finding Closure | Remediation progress |
| Time to Reconstruct | Effort required to reconstruct an event |

These are examples, not universal standards.

---

# Practical audit questions

## Model

- Which model is running?
- Which version?
- Who approved it?
- What evaluation evidence exists?
- Has it changed since the previous review?

## Agent

- What goal was assigned?
- Which decisions were autonomous?
- Which tools were available?
- Which permissions existed?
- Which actions required approval?

## Data

- Which sources were accessed?
- Was the agent authorized to access them?
- Can retrieved information be traced?
- Were sensitive data controls applied?

## Runtime

- Are executions logged?
- Are traces complete?
- Can events be correlated?
- Are important configuration changes recorded?

## Controls

- Which controls should have activated?
- Did they activate?
- Can this be demonstrated with evidence?

## Outcome

- Did the system achieve its goal?
- Did it violate any constraints?
- Was human correction required?
- Were unexpected side effects created?

---

# Planned Hugging Face resources

The **Auditing** organization is intended to develop practical resources around AI assurance and auditability.

Potential projects include:

## AI Audit Explorer

An interactive guide to:

- audit scopes,
- evidence types,
- controls,
- risks,
- audit procedures,
- findings.

## Agent Audit Trail Explorer

Visualize the execution path of an AI agent:

```text
Prompt
 β†’ Plan
 β†’ Tool
 β†’ Permission
 β†’ Action
 β†’ Observation
 β†’ Decision
 β†’ Result
```

## AI Audit Checklist

Generate structured audit questions based on:

- models,
- agents,
- RAG,
- tool use,
- sensitive data,
- deployment architecture.

## Audit Evidence Schema

A reusable data schema for storing evidence such as:

- model versions,
- tool calls,
- approvals,
- traces,
- policy checks,
- findings.

## AI Audit Report Builder

Turn structured evidence into a consistent technical audit report.

## Agent Control Matrix

Map agent capabilities to:

- risks,
- permissions,
- controls,
- evidence,
- testing procedures.

---

# Example audit record

```json
{
  "audit_event_id": "evt_001",
  "timestamp": "2026-09-25T08:30:00Z",
  "agent_id": "procurement-agent",
  "session_id": "session_8842",
  "model": "model-name",
  "model_version": "version-id",
  "goal": "Compare approved suppliers",
  "tool": "supplier-database",
  "action": "read",
  "permission": "supplier.read",
  "human_approval_required": false,
  "policy_checks": [
    "approved-source-only"
  ],
  "result": "success",
  "trace_id": "trace_3902"
}
```

This is only an illustrative schema.

Real systems may require different fields, stronger integrity protections and additional privacy controls.

---

# Audit finding structure

A useful finding should be more specific than:

> β€œThe AI system needs better monitoring.”

A structured finding might contain:

```text
Finding ID
Title
System / Component
Observed Condition
Expected Control
Evidence
Risk / Impact
Root Cause
Recommendation
Owner
Due Date
Status
Re-test Result
```

This makes findings actionable and reviewable.

---

# Auditability maturity

Organizations can think about auditability as a progression.

```text
LEVEL 1 β€” UNKNOWN
Little structured evidence

LEVEL 2 β€” LOGGED
Basic events are recorded

LEVEL 3 β€” TRACEABLE
Important decisions and actions can be reconstructed

LEVEL 4 β€” CONTROLLED
Controls are mapped to verifiable evidence

LEVEL 5 β€” CONTINUOUS
Selected controls and evidence are continuously assessed
```

This is a practical project model, not an official maturity standard.

---

# Principles

## Evidence before assumptions

Audit conclusions should be based on available evidence.

## Traceability before opacity

Important actions should be reconstructable.

## Version everything important

Models, prompts, tools, policies and configurations change.

## Audit actions, not only outputs

Agent systems should be examined at the trajectory level.

## Separate monitoring from assurance

Monitoring generates signals. Auditing tests evidence and controls.

## Risk-based scope

Not every AI system requires the same level of audit depth.

## Independent verification

Where appropriate, evidence should be reviewable independently of the component being audited.

## Reproducibility

Important audit tests should be repeatable where technically possible.

---

# Who this organization is for

Auditing is intended for:

- AI engineers,
- ML engineers,
- agent developers,
- AI platform teams,
- security teams,
- governance teams,
- risk professionals,
- internal audit teams,
- compliance teams,
- MLOps teams,
- enterprise architects,
- researchers,
- organizations deploying autonomous AI systems.

---

# Why Hugging Face?

AI auditing increasingly requires technical artifacts rather than policy documents alone.

Hugging Face provides a natural environment for combining:

```text
Models
+
Datasets
+
Spaces
+
Collections
+
Evaluation artifacts
+
Technical documentation
```

This makes it possible to create practical and reproducible resources for AI auditing.

The goal of **Auditing** is to help connect technical AI systems with **evidence, control and assurance**.

---

# Reference frameworks

The project may use established frameworks as reference points while remaining framework-independent.

- NIST AI Risk Management Framework  
  https://www.nist.gov/itl/ai-risk-management-framework

- NIST AI Resource Center  
  https://airc.nist.gov/

- ISO/IEC 42001 β€” Artificial intelligence management systems  
  https://www.iso.org/standard/42001

These references do not replace organization-specific, sector-specific or legal requirements.

---

# Collaboration

We welcome collaboration around:

- AI auditing,
- agent auditability,
- AI assurance,
- audit trails,
- traceability,
- model validation,
- observability,
- governance,
- technical controls,
- evaluation,
- AI security,
- audit datasets,
- open audit schemas,
- Hugging Face Spaces,
- enterprise AI governance tooling.

**Collaboration:** agenten@magenta.de

---

# Independent project

**Auditing** is an independent technical project.

It is not an official Hugging Face organization and is not affiliated with NIST, ISO or any regulator, certification body, audit firm or model provider unless explicitly stated.

The project does not provide legal, regulatory, certification or professional audit advice.

Requirements differ by jurisdiction, sector and use case. Important compliance or certification decisions should be verified with the relevant qualified professionals and authoritative sources.

---

# Auditing

### **Evidence for AI. Traceability for agents. Assurance for autonomous systems.**

AI is moving from systems that generate outputs to systems that can **decide, delegate and act**.

As autonomy grows, the ability to reconstruct and verify those actions becomes increasingly important.

**Auditing exists to make AI systems more examinable, traceable and accountable β€” from models to agents to the infrastructure around them.**