Engineering Inferential Composition Control for Federated RAG in Data Spaces - Braga, Carlos Mario; Serrano, Manuel A.; Fernández-Medina, Eduardo (Anais do Congresso Ibero-Americano em Engenharia de Software (CIbSE); 2026: Anais do XXIX Congresso Ibero-Americano em Engenharia de SoftwareDO - 10.5753/cibse.2026.42438, 2026)
Federated Data Spaces increasingly rely on Retrieval-Augmented Generation (RAG) to provide intelligent access to distributed and sovereign data sources. However, current RAG systems typically assume that retrieved fragments from different providers can be merged into a single generation context without semantic conflict. In regulated and heterogeneous settings, this assumption can trigger inferential errors, such as treating conditional or alternative requirements as jointly mandatory, posing risks to trustworthiness and governance. This paper reframes semantic interoperability in federated RAG systems as a problem of inferential composition rather than conceptual alignment. We introduce a lightweight engineering framework that adds an explicit reasoning control layer to the RAG pipeline. The framework uses semantic roles and pragmatic signals to guide selective context separation and conservative fragment composition, preventing unsafe inferences without requiring ontologies or shared vocabularies. We evaluate the approach through a reproducible case study in a regulated data-sharing scenario, showing that inferential composition control prevents reasoning failures under adversarial queries, while preserving benign integration. These findings highlight the need for explicit reasoning control in RAG-based systems operating in federated and regulated environments.