Datasets:
evaluation string | raw_ml dict | test_accuracy float64 | test_macro_f1 float64 | per_category dict | macro_avg dict |
|---|---|---|---|---|---|
template-disjoint split (unseen phrasings) | {
"test_accuracy": 0.7,
"test_macro_f1": 0.6968
} | 0.9208 | 0.9178 | {
"compliance": {
"precision": 1,
"recall": 0.75,
"f1": 0.8571,
"support": 20
},
"confidentiality": {
"precision": 1,
"recall": 0.75,
"f1": 0.8571,
"support": 20
},
"delivery": {
"precision": 0.8,
"recall": 1,
"f1": 0.8889,
"support": 20
},
"dispute_resoluti... | {
"precision": 0.9396,
"recall": 0.9208,
"f1": 0.9178
} |
ContractGuard Clause Samples — Bilingual Contract Clause Corpus
Synthetic labeled clause corpus for training and evaluating the ContractGuard clause classifier and risk engine. Published by Aria AI Engineering Team.
Dataset Summary
| Property | Value |
|---|---|
| Clauses | 875 (635 train / 240 test) |
| Languages | English (500) + Persian (375) |
| Categories | 12 (payment, delivery, warranty, confidentiality, termination, liability, penalty, IP, dispute resolution, force majeure, compliance, general) |
| Risk annotations | 140 clauses seeded with RR-001…RR-014 risk-rule labels |
| Split design | Template-disjoint — test templates never appear in training |
| Generation | Deterministic (seed 42), scripts/build_dataset.py in the project repo |
| PII | None — fully synthetic parties, amounts and dates |
Files
| File | Content |
|---|---|
clauses.jsonl |
One clause per line (schema below) |
eval_results.json |
Classifier evaluation on the held-out split (raw ML + hybrid) |
benchmark_report.json |
Full benchmark: classification, risk-rule recall/FP, end-to-end sample contracts |
Schema
{
"id": "cg-00042",
"text": "The Client shall pay each undisputed invoice within 30 days of receipt...",
"language": "en",
"category": "payment",
"risk_rule_ids": ["RR-007"],
"template_id": "payment-en-09",
"source": "synthetic",
"split": "train"
}
category— one of the 12 clause categories (classification target).risk_rule_ids— risk rules intentionally embedded in the clause (empty for clean clauses); used to benchmark risk-engine recall.template_id— generation template; the test split holds out whole templates to prevent leakage.
Why Template-Disjoint?
A naive random split scores ~100% because variants of the same template land in both train and test. Holding out entire templates measures generalization to unseen phrasings — the honest number (92.1% hybrid accuracy) is reported in eval_results.json together with the raw-ML ablation (70.0%).
Intended Use
- Benchmarking clause classification for EN/FA commercial contracts
- Evaluating rule-based risk detection (seeded
risk_rule_idsground truth) - Baseline corpus before fine-tuning transformer models (ParsBERT, LayoutLM)
Limitations
- Template-generated: lexical variety is bounded; real contracts are messier.
- Formal register only; not representative of consumer or colloquial agreements.
- Not suitable for legal compliance certification.
Citation
@dataset{contractguard_clause_samples_2026,
title={ContractGuard Clause Samples: Bilingual Synthetic Contract Clause Corpus},
author={Aria AI Engineering Team},
year={2026},
publisher={Hugging Face},
url={https://huggingface.co/datasets/alirezaaminzadeh/contractguard-clause-samples}
}
License
Apache 2.0
- Downloads last month
- 18