Optimizing Retrieval Augmented Generation for Object Constraint Language
Kevin Chenhao Li, Vahid Zolfaghari, Nenad Petrovic, Fengjunjie Pan, Alois Knoll

TL;DR
This paper investigates how different retrieval strategies impact the effectiveness of retrieval-augmented generation in automating Object Constraint Language rule creation, comparing lexical, semantic, and sparse-vector methods against a graph-based baseline.
Contribution
It evaluates and benchmarks various retrieval methods for optimizing RAG in OCL rule generation, providing insights into their relative performance and configuration.
Findings
Semantic retrieval methods outperform lexical approaches.
Optimal retrieval parameters depend on balancing context relevance and noise.
SPLADE performs best at low retrieval chunk counts.
Abstract
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 BM25 (lexical-based), BERT-based (semantic retrieval), and SPLADE (sparse-vector retrieval) 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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsModel-Driven Software Engineering Techniques · Formal Methods in Verification · Systems Engineering Methodologies and Applications
MethodsRefunds@Expedia|||How do I get a full refund from Expedia? · Attention Is All You Need · Linear Warmup With Linear Decay · Layer Normalization · Softmax · Attention Dropout · WordPiece · Residual Connection · Linear Layer · Byte Pair Encoding
