The regulatory framework governing EU electricity markets is highly complex, fragmented across multiple normative acts and sensitive to citation accuracy and contextual completeness. While Large Language Models (LLMs) offer promising capabilities for regulatory question answering (QA), their tendency to hallucinate legal references and omit critical conditions makes them unreliable for compliance-sensitive domains. This paper presents the design of a domain-specific Retrieval-Augmented Generation (RAG) system for EU electricity market regulations, explicitly engineered to deliver source-grounded, traceable and low-hallucination answers. The answering component is based on Google’s gemini-2.5-flash model. The Open AI’s gpt-4o-mini model is responsible for both relevant document selection before building the RAG prompt and playing the judge LLM role for Retrieval Augmented Generation Assessment (RAGAS) evaluation. We build a legal corpus comprising multiple core EU regulatory acts related to REMIT and market operation and propose a regulatory QA architecture that integrates: (i) three chunking strategies (article-based, structure-aware, sliding window), (ii) two embedding models and (iii) a novel LLM-based document selection agent that restricts retrieval to the most relevant normative acts before vector search, improving contextual focus and retrieval precision. Using a fixed benchmark of regulatory questions and a reproducible evaluation protocol, we quantitatively assess system performance with RAGAS metrics and classical information-retrieval measures. While all configurations achieve strong faithfulness (up to 0.96), answer relevancy varies substantially with embedding and chunking choices. The findings confirm that retrieval engineering, particularly embedding selection, chunking strategy and pre-retrieval document filtering, has a high impact for building reliable regulatory AI systems. The sliding window strategy combined with bge-small-en-v1.5 delivered the strongest rank-sensitive retrieval performance, achieving the highest Precision@10 and NDCG@10. In contrast, article-level chunking with the same model yielded a modest improvement in Recall@10, indicating a clear trade-off between recall and precision-oriented ranking quality in legal corpora.
Ali et al. (Tue,) studied this question.