Reddit - r/MachineLearning

EU AI Act OpenRAG: 933 legally structured chunks and BGE-M3 embeddings in one SQLite file [P]

Structure

The corpus chunks on the Regulation's legal structure rather than sliding character windows: one chunk per article paragraph, one per recital, one per Article 3 definition, one per annex point. Chapter, section, and provision metadata are stored separately.

Database Contents

The resulting SQLite database contains 933 chunks and a normalized 1024-dimensional BGE-M3 embedding for every chunk. It also includes:

  • Exact EUR-Lex links
  • Article 113 application-date metadata
  • Deliberately narrow derived labels

Direct textual classification is stored separately from broader regulatory-regime association, and ambiguous cases remain NULL.

Evaluation Results

I evaluated it against the AI Act Evaluation Benchmark using a like-for-like whole-unit baseline:

  • Scenario article recall@20: 0.541 structural vs 0.449 baseline
  • QA article hit@10: 0.927 structural vs 0.898 baseline
  • Overall RAG classification remained close and was slightly lower on the structural corpus, suggesting that generator behaviour dominates that task more than chunk granularity

Publication

I have published the full results, limitations, derivation methodology, label audit, and licensing breakdown rather than only the favourable metrics.

Dataset: huggingface.co/datasets/faitholopade/aiact-openrag

I would appreciate technical feedback, particularly on the retrieval evaluation, structural chunking methodology, and what additional baselines would be most useful.

Comments

No comments yet. Start the discussion.