AI Code of Practice
AI Code of Practice
Practical guidelines that GPAI model providers must follow. Includes transparency, copyright, and more.
AI Code of Practice
Practical guidelines that GPAI model providers must follow. Includes transparency, copyright, and more.
The AI Code of Practice is a set of practical guidelines that providers of general-purpose AI (GPAI) models must follow to comply with their obligations under the EU AI Act. Under Article 56 of the EU AI Act, the AI Office oversees its development, and it is drafted with the participation of industry, academia, and civil society.
Its main contents include transparency obligations for GPAI models (training data summary, copyright policy), methodologies for systemic risk assessment, cybersecurity measures, and energy efficiency reporting. Adherence to the Code of Practice grants a 'Presumption of Conformity' with the legal obligations.
Drafting began in September 2024, and the final version is scheduled to be published in April 2025. Major AI companies such as OpenAI, Google, Microsoft, and Meta are participating in the drafting, and in particular, the opt-out mechanism for copyright holders regarding training data is a key point of contention.
The Code of Practice is not legally binding, but companies that do not adhere to it must separately demonstrate that they meet their EU AI Act obligations. Therefore, most GPAI providers are expected to adopt the Code of Practice voluntarily.
# AI 실무 강령 준수 체크리스트 구현
from dataclasses import dataclass, field
from typing import List, Dict, Optional
from datetime import datetime
@dataclass
class CodeOfPracticeRequirement:
"""실무 강령 요구사항"""
id: str
category: str
description: str
article_reference: str
mandatory: bool
status: str = "not_started" # not_started, in_progress, completed
evidence_url: Optional[str] = None
@dataclass
class GPAICodeOfPracticeCompliance:
"""GPAI 실무 강령 준수 관리"""
model_name: str
provider_name: str
requirements: List[CodeOfPracticeRequirement] = field(default_factory=list)
def __post_init__(self):
self._initialize_requirements()
def _initialize_requirements(self):
"""EU AI Act 기반 실무 강령 요구사항 초기화"""
requirements = [
# 투명성 요구사항
CodeOfPracticeRequirement(
id="COP-T01",
category="투명성",
description="학습 데이터 요약 공개",
article_reference="Article 53(1)(d)",
mandatory=True
),
CodeOfPracticeRequirement(
id="COP-T02",
category="투명성",
description="저작권 정책 및 옵트아웃 메커니즘",
article_reference="Article 53(1)(c)",
mandatory=True
),
CodeOfPracticeRequirement(
id="COP-T03",
category="투명성",
description="기술 문서 작성 및 유지",
article_reference="Article 53(1)(a)",
mandatory=True
),
CodeOfPracticeRequirement(
id="COP-T04",
category="투명성",
description="다운스트림 사용자 정보 제공",
article_reference="Article 53(1)(b)",
mandatory=True
),
# 에너지/환경
CodeOfPracticeRequirement(
id="COP-E01",
category="에너지",
description="학습 에너지 소비량 측정 및 보고",
article_reference="Article 53(1)(e)",
mandatory=True
),
# 시스템적 위험 (해당 시)
CodeOfPracticeRequirement(
id="COP-SR01",
category="시스템적위험",
description="모델 평가 수행",
article_reference="Article 55(1)(a)",
mandatory=False # 시스템적 위험 모델만 해당
),
CodeOfPracticeRequirement(
id="COP-SR02",
category="시스템적위험",
description="적대적 테스트 (Red Teaming)",
article_reference="Article 55(1)(b)",
mandatory=False
),
CodeOfPracticeRequirement(
id="COP-SR03",
category="시스템적위험",
description="사이버보안 보호 조치",
article_reference="Article 55(1)(d)",
mandatory=False
),
]
self.requirements.extend(requirements)
def update_requirement_status(self, req_id: str, status: str,
evidence_url: Optional[str] = None):
"""요구사항 준수 상태 업데이트"""
for req in self.requirements:
if req.id == req_id:
req.status = status
if evidence_url:
req.evidence_url = evidence_url
return True
return False
def get_compliance_summary(self) -> Dict:
"""준수 현황 요약"""
mandatory = [r for r in self.requirements if r.mandatory]
completed_mandatory = [r for r in mandatory if r.status == "completed"]
return {
"model": self.model_name,
"provider": self.provider_name,
"total_requirements": len(self.requirements),
"mandatory_requirements": len(mandatory),
"completed_mandatory": len(completed_mandatory),
"compliance_rate": len(completed_mandatory) / len(mandatory) * 100,
"presumption_of_conformity": len(completed_mandatory) == len(mandatory),
"gap_items": [
{"id": r.id, "description": r.description}
for r in mandatory if r.status != "completed"
]
}
def generate_transparency_report(self) -> Dict:
"""투명성 보고서 생성 (실무 강령 준수용)"""
return {
"report_type": "GPAI_TRANSPARENCY_REPORT",
"code_of_practice_version": "2025-04",
"model_info": {
"name": self.model_name,
"provider": self.provider_name
},
"training_data_summary": {
"total_tokens": "미공개", # 실제 구현 시 입력
"data_sources": [],
"cutoff_date": None
},
"copyright_policy": {
"opt_out_mechanism": "구현 필요",
"robots_txt_compliance": True,
"takedown_process": "구현 필요"
},
"energy_consumption": {
"training_kwh": None,
"carbon_footprint_kg": None
},
"generated_at": datetime.now().isoformat()
}
# 사용 예시
compliance = GPAICodeOfPracticeCompliance(
model_name="KAITRUST-LLM-70B",
provider_name="KAITRUST Corp"
)
# 요구사항 충족 업데이트
compliance.update_requirement_status(
"COP-T01", "completed",
evidence_url="https://kaitrust.ai/model-card/training-data-summary"
)
print(compliance.get_compliance_summary())
Legal team: "The final version of the AI Code of Practice comes out in April. If our LLM complies with the Code, we can receive a presumption of conformity under the EU AI Act."
Development team: "The training data summary and the copyright opt-out API are ready, and we are building the energy consumption measurement system."
Interviewer: "Please explain the meaning and importance of the AI Code of Practice."
Candidate: "The Code of Practice sets out concrete methods for GPAI providers to fulfill their EU AI Act obligations. By complying, they obtain a 'Presumption of Conformity' and reduce the burden of separate demonstration; if they do not comply, they must demonstrate each obligation individually, so it is effectively mandatory."
Take a mock interview on this topic → WIA SOOM AI Interview · Start for free
Compliance: "Does the training data summary meet the Code of Practice requirements? It must include the proportion by source and the collection period."
Developer: "I added the token count by source, the collection period, and the license information to data_summary.json. For opted-out data, I also keep an exclusion log."