Structured file design, not better prompts, fixes RAG hallucinations on legal dates
A team at embedded IoT security firm Platanor found that AI models, including ChatGPT, consistently confused the EU Cyber Resilience Act's entry-into-force date (2024) with its actual application deadline (2027) when processing raw regulation PDFs. The root cause was identified not as model failure but as poor source structure: token-based chunking split articles mid-sentence, and dates appeared across documents with no explicit contextual links. To address this, the team restructured their reference base by chunking text at natural article boundaries, embedding source-priority rankings directly in each file, and adding explicit verification dates alongside critical deadlines. They also added an llms.txt index at the repository root so AI agents could selectively load relevant files rather than parsing the entire document corpus. The team has published their fact-checked regulatory reference base covering CRA, RED, NIS2, and CSA as an open repository compatible with custom RAG pipelines and Claude Skills.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in