Skip to content

Level 4: The Architect (Annex IV Generation)

Goal: Automate the creation of 50+ page regulatory documents.

Prerequisite: Level 3 (The Auditor)


1. The Bottleneck: “Technical Documentation”

Section titled “1. The Bottleneck: “Technical Documentation””

According to Article 11 and Annex IV of the EU AI Act, High-Risk systems (like Credit Scoring) require comprehensive Technical Documentation. Writing this manually takes weeks.

We use your Policies (Level 1 & 2) and Evidence (Level 2/3) to prompt an LLM to draft the document for you.

Venturalitica supports:

  • Cloud: Mistral (via API).
  • Local: Ollama (General purpose).
  • Sovereign (NEW): ALIA (Spanish Native GGUF via Llama.cpp) - Experimental.

We continue working on the “Loan Scoring” project.

Ensure you have run the collection steps:

import venturalitica as vl
from venturalitica.quickstart import load_sample
from sklearn.model_selection import train_test_split
# 1. Load Data
df = load_sample("loan")
train_df = df.sample(frac=0.8, random_state=42)
val_df = df.drop(train_df.index)
# 2. Run the Article 10 (Data) & Article 15 (Model) Assurance Audit
with vl.monitor("loan_annex_audit"):
# 2.1 Verify Training Data (Art 10)
# Download data_policy.oscal.yaml from:
# https://github.com/venturalitica/venturalitica-sdk-samples/blob/main/scenarios/loan-credit-scoring/policies/loan/data_policy.oscal.yaml
vl.enforce(
data=train_df,
target="class",
gender="Attribute9",
age="Attribute13",
policy="data_policy.oscal.yaml"
)
# 2.2 Verify Model Performance (Art 15)
# Download model_policy.oscal.yaml from:
# https://github.com/venturalitica/venturalitica-sdk-samples/blob/main/scenarios/loan-credit-scoring/policies/loan/model_policy.oscal.yaml
vl.enforce(
data=val_df.assign(prediction=val_df["class"]), # Simulated model
target="class",
prediction="prediction",
gender="Attribute9",
policy="model_policy.oscal.yaml"
)
  1. Open the Dashboard: venturalitica ui.

  2. Go to the “Annex IV Generator” tab.

  3. Select Provider: Cloud (Mistral), Local (Ollama), or Sovereign (ALIA - Experimental).

  4. Click “Generate Annex IV”.

    Annex IV Generator

Watch the logs. The System is acting as a Team of Agents:

  1. Scanner: Reads your trace.json (The Evidence).
  2. Planner: Decides which sections of Annex IV apply to your specific model type.
  3. Writer: Drafts “Section 2.c: Architecture” using the summary() from your actual Python code.
  4. Critic: Reviews the draft against the ISO 42001 standard.

Result: A markdown file (Annex_IV.md) that cites your specific accuracy scores (e.g., Demographic Parity: 0.92) as proof of safety.

FeatureCloud (Mistral API)Local (Ollama)Sovereign (ALIA - Experimental)
PrivacyEncrypted Transport100% OfflineHardware Locked
SovereigntyHosted in EUGenericSpanish Native
SpeedFast (Large Model)SlowerSlow (Experimental)
Use CaseFinal High-Quality PolishIterative TestingResearch Only

We currently offer ALIA as an experimental feature for organizations piloting Spanish-native sovereign AI.

By default, we generate Annex_IV.md (Markdown) for version control. To convert this to a regulatory-grade PDF:

Python (mdpdf):

Terminal window
uv pip install mdpdf
uv run mdpdf Annex_IV.md

Pandoc (Advanced):

Terminal window
pandoc Annex_IV.md -o Annex_IV.pdf --toc --pdf-engine=xelatex
  1. Documentation is a Function: f(Evidence) -> Document. Never write what you can generate.
  2. LiveTrace: If your accuracy drops tomorrow, regenerate the document. It will reflect the current state, preventing “Documentation Drift”.
  3. The Full Loop: You have gone from Code -> Policy (L1) -> Ops (L2) -> Evidence (L3) -> Legal Document (L4).

You have completed the Venturalitica Academy. You are now ready to integrate this into your own CI/CD pipeline.