mlsanityData to 14 Oct 2026

Optimizing Retrieval Augmented Generation for Object Constraint Language

arXiv 2505.13129 ↗First posted 19 May 2025cs.IR cs.SEcited by 4

On the map: Retrieval-augmented generation → RAG pipeline design and evaluation

Abstract (arXiv)

The Object Constraint Language (OCL) is essential for defining precise constraints within Model-Based Systems Engineering (MBSE). However, manually writing OCL rules is complex and time-consuming. This study explores the optimization of Retrieval-Augmented Generation (RAG) for automating OCL rule generation, focusing on the impact of different retrieval strategies. We evaluate three retrieval approaches unicodex2013 BM25 (lexical-based), BERT-based (semantic retrieval), and SPLADE (sparse-vector retrieval) unicodex2013 analyzing their effectiveness in providing relevant context for a large language model. To further assess our approach, we compare and benchmark our retrieval-optimized generation results against PathOCL, a state-of-the-art graph-based method. We directly compare BM25, BERT, and SPLADE retrieval methods with PathOCL to understand how different retrieval methods perform for a unified evaluation framework. Our experimental results, focusing on retrieval-augmented generation, indicate that while retrieval can enhance generation accuracy, its effectiveness depends on the retrieval method and the number of retrieved chunks (k). BM25 underperforms the baseline, whereas semantic approaches (BERT and SPLADE) achieve better results, with SPLADE performing best at lower k values. However, excessive retrieval with high k parameter can lead to retrieving irrelevant chunks which degrades model performance. Our findings highlight the importance of optimizing retrieval configurations to balance context relevance and output consistency. This research provides insights into improving OCL rule generation using RAG and underscores the need for tailoring retrieval.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Placed in RAG pipeline design and evaluation, one of 15 directions in Retrieval-augmented generation. Builds on 14 of its 19 references that are in the map. First posted on arXiv 19 May 2025.

Builds on

14 of 19 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024Fine Tuning vs. Retrieval Augmented Generation for Less Popular Knowledge3 Mar

Other references · 13

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2024The Llama 3 Herd of Modelscited by 14,715
  3. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
  4. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  5. 2021SPLADE: Sparse Lexical and Expansion Model for First Stage Rankingcited by 286
  6. 2023Fine-Tuning or Retrieval? Comparing Knowledge Injection in LLMscited by 178
  7. 2022Large Language Models with Controllable Working Memorycited by 169
  8. 2024RAG vs Fine-tuning: Pipelines, Tradeoffs, and a Case Study on Agriculturecited by 81
  9. 2024Enhancing LLM Factual Accuracy with RAG to Counter Hallucinations: A Case Study on Domain-Specific Queries in Private Knowledge-Basescited by 77
  10. 2023On the Effectiveness of Large Language Models in Domain-Specific Code Generationcited by 44
  11. 2023L2CEval: Evaluating Language-to-Code Generation Capabilities of Large Language Modelscited by 22
  12. 2023On Codex Prompt Engineering for OCL Generation: An Empirical Studycited by 8
1 more
  1. 2024PathOCL: Path-Based Prompt Augmentation for OCL Generation with GPT-4cited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 2.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Not All RAGs Are Created Equal: A Component-Wise Empirical Study for Software Engineering Tasks
  2. 2026Mapping the RAG Landscape: A Four Axis Taxonomy of Efficiency, Defense, Interactivity, and Reasoning
  3. 2024Towards Optimizing a Retrieval Augmented Generation using Large Language Model on Academic Data
  4. 2024CodeRAG-Bench: Can Retrieval Augment Code Generation?
  5. 2023Retrieval-Augmented Generation for Large Language Models: A Survey
  6. 2024XRAG: eXamining the Core -- Benchmarking Foundational Components in Advanced Retrieval-Augmented Generation
  7. 2025Enhancing Retrieval-Augmented Generation: A Study of Best Practices
  8. 2024Contextual Compression in Retrieval-Augmented Generation for Large Language Models: A Survey