<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>June</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Optimizing retrieval augmented generation for object constraint language</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Kevin Chenhao Li</string-name>
          <email>k@tum.de</email>
          <email>kevinchenhao.li@tum.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vahid Zolfaghari</string-name>
          <email>v.zolfaghari@tum.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nenad Petrovic</string-name>
          <email>nenad.petrovic@tum.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fengjunjie Pan</string-name>
          <email>f.pan@tum.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alois Knoll</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Retrieval-Augmented Generation, Object Constraint Language, Model-Based Systems Engineering</institution>
          ,
          <addr-line>Large Lan-</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Technical University of Munich (TUM)</institution>
          ,
          <addr-line>Arcisstraße 21 D-80333 Munich</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2025</year>
      </pub-date>
      <volume>1</volume>
      <fpage>0</fpage>
      <lpage>13</lpage>
      <abstract>
        <p>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 diferent retrieval strategies. We evaluate three retrieval approaches-BM25 (lexical-based), BERT-based (semantic retrieval), and SPLADE (sparse-vector retrieval)-analyzing their efectiveness in providing relevant context for a large language model.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Object Constraint Language [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] plays an important role in Model-Based Systems Engineering (MBSE)
by enabling precise constraint definition within meta-models. OCL is used to ensure the integrity of
system designs by specifying conditions that must be held within a model. It is widely used in Unified
Modeling Language (UML) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and Eclipse Modeling Framework (EMF) [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] by defining invariants,
preconditions, postconditions, and derived attributes, which cannot be specified by the model itself and
thereby enhancing model expressiveness.
      </p>
      <p>However, manually writing OCL rules is complex and time-consuming, requiring a deep
understanding of both the system model and OCL syntax. Natural language is often the starting point for defining
system constraints, such as those given in the requirements and specifications of the system. This
makes an automated approach that translates natural language specifications into OCL rules highly
attractive and could significantly improve eficiency and accessibility.</p>
      <p>
        Recent advances in Large Language Models (LLMs) have revolutionized automated code and rule
generation. Models such as GPT-4 [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], DeepSeek [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], and Meta-Llama-3 [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] have demonstrated
remarkable capabilities in understanding and generating structured text, including programming languages
and domain-specific rule sets. These models leverage pre-trained knowledge from large text corpora,
enabling them to generalize across diferent programming languages, formal notations, and syntactic
Joint Proceedings of the STAF 2025 Workshops: OCL, OOPSLE, LLM4SE, ICMM, AgileMDE, AI4DPS, and TTC. Koblenz, Germany,
      </p>
      <p>CEUR
Workshop</p>
      <p>
        ISSN1613-0073
structures. In particular, LLMs have been thoroughly applied in natural language-to-code translation
[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], showing strong performance in converting natural language instructions into executable code
in languages such as Python, Java, and SQL. Similarly, they can be adapted to translate natural language
specifications into OCL rules [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], reducing the manual efort required by human engineers.
However, LLMs often struggle with domain-specific knowledge [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], especially when dealing with complex
specifications and extensive meta-models. A meta-model defines the structure and rules for how models
are built in MBSE. It includes elements such as classes, associations, enumerations, and attributes. This
is where RAG becomes essential. Large Language Models have a limited context window, making it
challenging to include large and complex meta-models entirely in a prompt. RAG allows relevant parts
of the meta-model to be retrieved and injected dynamically, helping the LLM generate precise rules
even when the whole meta-model does not fit into the context window.
      </p>
      <p>
        Retrieval-Augmented Generation is an approach that enhances LLMs by integrating external
knowledge retrieval into the generation process [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. This idea originated from the question answering
domain [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. Instead of relying solely on a model’s pre-trained knowledge, RAG retrieves relevant
information from an external knowledge base and incorporates it into the model’s input before
generating the final output. This method has shown promise in improving accuracy, reducing hallucinations
[
        <xref ref-type="bibr" rid="ref15">15</xref>
        ], and ensuring that generated content aligns with the domain [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. Since OCL rules are tightly
coupled with the underlying meta-model structure, a standard LLM may not have suficient context
to generate the correct rule. RAG allows us to retrieve relevant meta-model elements (e.g., classes,
associations, enumerations) from a retrievable knowledge base and include them in the input prompt.
The desired result is that RAG helps the LLM generate rules that adhere to proper OCL syntax and
semantics. However, optimizing retrieval strategies for OCL generation has not been extensively studied,
particularly in the context of balancing retrieval eficiency and generation accuracy.
      </p>
      <p>
        While fine-tuning can adapt LLMs to specific tasks, such as OCL rule generation, it is
resourceintensive and may not generalize well across new or unseen meta-models. Recent research has
increasingly highlighted the advantages of Retrieval-Augmented Generation over fine-tuning for knowledge
injection in large language models. RAG consistently outperforms fine-tuning across multiple datasets,
even when dealing with previously known and entirely new knowledge. Fine-tuning struggles with
learning new factual information and requires extensive training data [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. Similarly, another study
[
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] found that RAG is more efective in handling less popular or low-frequency knowledge, including
domain-specific knowledge. The study emphasizes that while smaller language models may still benefit
from fine-tuning, larger models gain little additional advantage. Additionally, fine-tuning remains
resource-intensive. Combining RAG with fine-tuning can lead to further improvements to performance
in specialized domains as shown in [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ].
      </p>
      <p>
        Current research in OCL rule generation has focused on other approaches, such as fine-tuning [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
This study uses RAG but does not evaluate the impact of it or experiment with diferent retrieval
configurations. Other current work about OCL rule generation using LLMs include [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] and [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ], which
either fully inject the meta-model without retrieval or use a path-based approach. However, the impact
of retrieval-based methods such as RAG on OCL rule generation remains underexplored. This gap in
the literature highlights the necessity of further investigating retrieval-based strategies to enhance the
accuracy and eficiency of OCL rule generation. By evaluating diferent retrieval configurations and
assessing their impact, this study aims to contribute a novel perspective to the field.
      </p>
      <p>
        This study explores the optimization of RAG for OCL rule generation, focusing on diferent retrieval
approaches to enhance model performance. We investigate traditional lexical-based retrieval (BM25)
[
        <xref ref-type="bibr" rid="ref20">20</xref>
        ], semantic dense-vector retrieval using transformer-based models (BERT) [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ], and semantic
sparsevector retrieval (SPLADE) [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ]. BM25 is a keyword-matching method that scores documents based on
term frequency and inverse document frequency. BERT-based retrieval uses contextual embeddings to
capture semantic similarity between queries and documents. SPLADE, on the other hand, creates sparse
representations of text using learned term expansions, combining term matching and the ability to
ifnd nearest neighbors. While these methods have been extensively studied in general NLP tasks, their
efectiveness in a RAG approach to OCL rule generation remains unexplored. This study bridges that
gap by systematically evaluating retrieval strategies and their impact on generation accuracy. We aim
to identify optimal configurations for improving OCL constraint generation. We compare our optimal
configurations against other state-of-the-art methods for generating OCL constraints. Our evaluation
employs quantitative metrics such as Cosine Similarity and Euclidean Distance to assess model output
quality. This research contributes to the growing body of work in domain-adapted LLM applications
and provides insights into improving automated OCL constraint generation.
      </p>
      <p>The results demonstrate that while retrieval strategies can enhance generation quality, they must be
carefully tuned to avoid performance degradation due to excessive or irrelevant retrieved information.
Our findings highlight the importance of selecting an appropriate retrieval method and the optimal
number of retrieved chunks ( ) to maximize performance. This study provides insights into the impact
of diferent retrieval techniques and lays the foundation for future improvements in automated OCL
rule generation.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Methodology</title>
      <sec id="sec-2-1">
        <title>2.1. Pipeline</title>
        <p>We first give a brief overview of the entire pipeline in this section before going into detail for every step
of the pipeline in the subsequent sections. Our pipeline takes as input a natural language specification
of an OCL rule and the associated name of the meta-model that we want to generate the OCL rule for.
We use both parts of the input in the retrieval stage to find relevant chunks of the meta-model. These
retrieved chunks are then incorporated into a prompt alongside the natural language specification and
given to a Large Language Model. We then compare the output of the LLM with the actual OCL rule to
determine the quality of our output. This workflow can be seen in Figure 2.</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Environment Setup</title>
        <p>The experiment was carried out using the free version of Google Colab, using the T4 GPU for access to
computing resources. Necessary dependencies were installed, including transformers, bitsandbytes,
lfash-attn, and pyngrok. In addition, a Hugging Face authentication token was configured to facilitate
secure access to the model repository and data set.</p>
        <p>The Meta-Llama-3-8B-Instruct model was selected and loaded using the transformers library. The
selection of LLaMA-3-8B-Instruct model was due to its performance, accessibility, and resource eficiency.
Its 8 billion parameter size is significantly smaller than models like GPT-4 enabling us to run it without
the need to pay for API calls. The role of the model was set to ”system” and we further limited the
maximum length of the output to 1024 tokens. Since we do not further train the pre-trained model and
are only interested in the evaluation of the output, we set the do_sample flag of the
Meta-Llama-3-8BInstruct model to false to disable random sampling and use greedy decoding to improve reproducibility.
This ensures that any observed variance in outputs is attributable to changes in retrieval context rather
than sampling noise.</p>
        <p>A web service was implemented using Flask, a lightweight Python web framework. An REST API
was created to handle incoming requests, process inputs, and generate responses from the LLM. The
API was structured to receive user queries, pass them through the model, and return the generated text
output.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3. Data set</title>
        <p>
          We used the data set collected by Pan et al. [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] 1. Each sample in the data set consists of:
• OCL rule
• Natural language specification of the OCL rule
• Name of meta-model
• Textual description of meta-model given in PlantUML format
        </p>
        <p>The dataset was preprocessed by segmenting the PlantUML strings so that each chunk contained
only a single class, enumeration, or association. This ensured that each chunk is semantically complete
and is the smallest atomic unit that cannot be further divided without losing meaning. We implemented
the chunking via stop words, where a chunk is considered to end if we encounter either one of ”class”,
”enum” or ”association”. During this pre-processing step certain characters like tabs and unnecessary
formatting like line breaks were removed, which were present in the original data set. This resulted
in a total of 3595 unique chunks over the entire dataset. Using the chunks we then built our external
knowledge base, where for each meta-model, uniquely identified by its name, we have a collection of
chunks representing the whole meta-model.</p>
        <p>To evaluate retrieval impact, we filtered the dataset such that only hard samples were considered.
Hard samples were defined as instances where the number of chunks for the meta-model exceeded 50,
making retrieval non-trivial and requiring a retriever to select a subset of chunks to use in the context
of the prompt. From that filtered dataset we then randomly sampled 72 instances for our evaluation,
which corresponds to one-fith of the size of the original dataset.
1This data set can be found at https://huggingface.co/datasets/fpan/text-to-ocl-from-ecore.</p>
        <p>Listing 1: Prompt used in the pipeline
You are given a meta-model with information about classes, associations and their attributes.
You are also given a natural language specification.</p>
        <p>Your task is to generate an OCL (Object Constraint Language) constraint for this specification
and based on the meta-model.</p>
        <p>Do not provide any explanations or additional text.</p>
        <p>The meta-model information is: {retrieved chunks}
The natural language specification is: {specification}</p>
      </sec>
      <sec id="sec-2-4">
        <title>2.4. Retrieval</title>
        <p>To enhance the accuracy and relevance of generated responses, a RAG pipeline was integrated. We built
the external knowledge base from the textual PlantUML provided in the data set as described before.
The RAG pipeline retrieves relevant chunks from the knowledge base before passing them as context to
the language model based on the natural language specification. We applied two filtering conditions for
relevance: (a) chunks must belong to the same meta-model as the input sample, and (b) chunks must
score higher than others based on similarity. Both conditions must be satisfied to be selected.</p>
        <p>Diferent retrieval approaches were evaluated, including lexical-based approaches in BM25-based
retrieval, and transformer-based retrieval models based on dense and sparse vectors such as BERT and
SPLADE. For all retrieval models, we evaluated them using top-k retrieval, where the top-k chunks
regarding the retrieval score with the natural language specification were given as context to the LLM.
For each retrieval model, we evaluated them with  set to 10, 20, 30, 40, and 50. We also evaluated the
intrinsic performance of the LLM regarding OCL rule generation using no retrieval.</p>
        <p>For our BM25-based retriever, we tokenized the natural language specification and used the result as
our query for the BM25 algorithm. For the transformer-based, approaches we compared the embeddings
between the natural language specification and the chunks of the meta-model and selected the top-k
most similar chunks using cosine similarity. We used the cosine similarity implementation from the
scikit-learn library.</p>
      </sec>
      <sec id="sec-2-5">
        <title>2.5. Generation</title>
      </sec>
      <sec id="sec-2-6">
        <title>2.6. Evaluation</title>
        <p>
          To generate the output we used a prompt that was slightly adapted from [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. We added ”Do not
provide any explanations or additional text.” to discourage the LLM from outputting lengthy responses
that negatively impact its performance regarding our automated metrics. The final prompt template is
shown in Listing 1
Various configurations of the RAG pipeline were tested to assess their impact on response quality. This
included difering the parameters such as the number of retrieved chunks, and the embedding model
selection.
        </p>
        <p>The evaluation was conducted using automated quantitative metrics comparing the generated model
output to the actual OCL rule as given in the data set. We use cosine similarity and Euclidean distance
as implemented by the scikit-learn library and based on BERT embeddings as our evaluation metrics.
The choice of the BERT embedding model is due to its open-source nature. The proposed evaluation
methodology provides an eficient and scalable way to measure the output quality, allowing us to
compare a large number of retriever configurations against each other.</p>
        <p>Metric</p>
        <p>Mean CS</p>
        <p>Variance CS
Trimmed Mean CS</p>
        <p>Mean ED</p>
        <p>Variance ED
Trimmed Mean ED</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Results</title>
      <p>
        We will first present the results for each retrieval approach and then compare the results across diferent
retrieval approaches. The results are based on the random subset of the filtered data set by Pan et al. [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
Given that the best possible cosine similarity and the best possible Euclidean distance to the original
OCL rule are 1 and 0 respectively, the y-axis is inverted when displaying Euclidean distances. We
consider variances close to 0 as more desirable, as they represent output and performance consistency.
We also examined the performance when disregarding the worst 10% of generated samples to determine
the generation output quality without extreme outliers such as hallucinations or outputs disregarding
the instruction not to explain the answer. Trimmed mean refers to the mean calculated after removing
the worst 10% of samples based on similarity score. The results are rounded to the 4th decimal place to
improve readability. We abbreviate Cosine Similarity with CS and Euclidean Distance with ED.
      </p>
      <p>Our results highlight the impact of diferent retrieval approaches on the performance of the RAG
pipeline for OCL rule generation. The baseline results as seen in Table 1, where no retrieval was applied
(k=0), indicate that the language model alone achieves a relatively high cosine similarity (0.9338) but
still leaves room for improvement through the integration of retrieval strategies. This result indicates
that the intrinsic knowledge in the domain of OCL rules or at least the ability to generate similar rules
gives us a strong baseline in regards to our semantic similarity metrics.</p>
      <sec id="sec-3-1">
        <title>3.1. Efectiveness of Diferent Retrieval Approaches</title>
        <p>We evaluated BM25 as a lexical retriever using cosine similarity and Euclidean distance to measure
performance. The results are shown in Table 1 and compared with the no-retrieval baseline. Table 2
presents the results for BERT-based retrieval, which uses dense semantic embeddings for chunk selection.
SPLADE-based retrieval results are shown in Table 3. SPLADE uses sparse semantic representations,
optimized for balancing lexical precision with semantic flexibility.</p>
        <p>Comparing the retrieval methods, the BM25-based retriever (Table 1) exhibited a decline in
performance compared to the baseline, particularly at higher values of  , suggesting that lexical retrieval
alone is insuficient for efective context selection. The best performance for BM25 was observed at
 = 30 with a mean cosine similarity of 0.9292, which still underperforms our baseline across all metrics.
Generally, the variance in cosine similarity and Euclidean distance for BM25-based retrieval was higher
than in other retrieval approaches, indicating inconsistent retrieval performance as seen in Fig. 4 and
Fig. 5. We have marked the best-performing model in each table by using bold numbers.</p>
        <p>
          Lexical approaches rely heavily on exact matching. We hypothesize that this approach struggles
because there is no guarantee that our natural language description uses the exact terms that are present
in the relevant chunks. The results point to no context being better than misleading or incomplete
context, which is supported by current research [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ].
        </p>
        <p>Presented in Table 2, the BERT-based retrieval model demonstrated more stable performance across
diferent values of  , achieving a mean euclidean distance of 5.0418 at  = 50 , which is slightly better
than the baseline. This suggests that semantic similarity-based retrieval can contribute positively to the
overall generation quality. Additionally, the lower variance in cosine similarity and Euclidean distance
for BERT-based retrieval, as illustrated in Fig. 6 and Fig. 7, included in the appendix, suggests a more
consistent performance across diferent samples. When looking at the performance with 10% of the
worst samples removed, we observe that the model with  = 50 is no longer the best-performing one.
This indicates that when disregarding consistency as defined by the ability to limit outliers, a slightly
lower value for  might provide better performance.</p>
        <p>The SPLADE-based retriever produced mixed results, as shown in Table 3, showing relatively high
cosine similarity at lower values of  = 10 but experiencing a strong decline in performance as  increased.
Notably, SPLADE at  = 10 outperformed all other retrieval approaches, including the baseline and
the best-performing BERT-based retriever (Fig. 3), suggesting that sparse-vector retrieval models
may be particularly beneficial when selecting a limited number of relevant chunks. We hypothesize
that SPLADE can leverage exact matching and synonyms to find all relevant chunks quickly. The
performance then degrades when we increase k as little to no additional relevant chunks are included.
Similar to BERT-based retrieval, our SPLADE-based has a stronger performance for  = 30 when
disregarding outliers. Once again this observation is in part due to the advantage of higher consistency
across outputs for  = 10 , but suggests that a diferent value for  might be more beneficial when
removing outliers. While the absolute improvement in mean cosine similarity appears numerically
small, the diference can be semantically meaningful for domain-specific tasks like this one.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Impact of k</title>
        <p>We also analyzed how varying the number of retrieved chunks as determined by the parameter  afects
model performance. Interestingly, increasing  does not always lead to improved results. For the
BM25 and SPLADE retrievers, performance fluctuated as  increased, suggesting that excessive retrieval
may introduce irrelevant or redundant information, as shown in Table 1 and Table 3. We speculate
that excessive retrieval (higher  ) can introduce noise, leading to lower similarity scores. Conversely,
BERT-based retrieval demonstrated relatively stable performance across diferent k values, with its best
performance occurring at  = 50 , as seen in Table 2. Our results suggest that optimizing the retrieval
step by carefully selecting an appropriate  is crucial to maximizing the benefits of retrieval-augmented
generation in the OCL domain, and blindly increasing  can degrade the model’s efectiveness.</p>
        <p>Furthermore, the analysis of variance across both evaluation metrics highlights the importance of
retrieval stability. Models with lower variance in cosine similarity (such as the BERT-based approach at
 = 50 ) tend to be more reliable in producing overall high-quality outputs, illustrated in Fig 6 and 7.
Inversely, higher variance in the BM25-based and SPLADE-based retrieval approaches at almost all 
values suggests inconsistency, potentially due to the inclusion of less relevant chunks in the retrieved
context, as illustrated in Fig. 4, 7, 8, and 9. These results indicate that changing the retriever model and
parameter  can have a positive impact on hallucination and reducing outliers, but cannot fully remove
them. Depending on the needs and goals of a potential end user, a trade-of between model consistency
and model output quality in a large percentage of cases needs to be considered.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Comparison with PathOCL</title>
        <p>
          PathOCL is a novel path-based prompt augmentation method proposed by Abukhalaf et al. [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ]. The
approach constructs a graph based on the PlantUML of the meta-model, where each class is represented
as a node of the graph and associations are directed edges. The direction of the graph is dependent on the
type of the association and its direction in the meta-model. PathOCL extracts all simple paths through
the graph and ranks them based on their similarity to the natural language specification using either
Jaccard or cosine similarity. For a natural language specification of an OCL constraint the approach
extracts the UML elements using POS-tagging and then ranks all simple paths in the graph based on
either the jaccard similarity or cosine similarity between the extracted elements and the node names
along the path. The most relevant paths are then included in the prompt to help the LLM generate the
correct OCL constraint.
        </p>
        <p>
          Although their approach aims to retrieve relevant classes in the face of limited context size, the
dataset they use to evaluate their approach only consists of 15 UML models, where the largest model
only contains 11 classes and 10 associations. Furthermore the PlantUML files of their dataset did not
contain interfaces, enum, composition relations or aggregation relations. We evaluated the PathOCL
method on the larger and harder dataset provided by [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. One issue that was raised is the runtime on
PathOCL (Jaccard k=1)
        </p>
        <p>Baseline</p>
        <p>SPLADE k=10
extremely large meta-models. Given the length of some of the meta-models, having upwards of 100
classes and 300 associations makes it almost impossible to perform the method as outlined, as it uses a
brute-force approach to compute all simple paths in the graph, which has a runtime complexity of at
least (!) .</p>
        <p>We thus decided to do the opposite as mentioned in the methodology section and filter our dataset by
only considering samples where the number of chunks in the meta-model is less than 100 and randomly
sampled 72 instances. We evaluated PathOCL under both Jaccard and cosine similarity configurations
with diferent values of  = (1, 3, 5) . As shown in Table 4, our SPLADE-based method at  = 10
outperformed PathOCL across both cosine similarity and Euclidean distance. Additional comparative
PathOCL results for varying  values and similarity measures are presented in Tables 5 and 6. Our
results indicate that sparse-vector retrieval provides a significant increase in performance against the
no retrieval baseline. Counterintuitively the PathOCL approach is outperformed by the baseline as seen
in Table 4. These results suggest that semantic retrieval strategies scale better on complex datasets.</p>
      </sec>
      <sec id="sec-3-4">
        <title>3.4. Limitations and Future Work</title>
        <p>While our study demonstrates the possible benefits of retrieval-based approaches, it is not without
limitations. First, our evaluation was conducted on a relatively small filtered subset of the dataset,
which may not generalize to all OCL rule generation scenarios. While these metrics provide an
initial assessment of textual similarity and closeness, they do not capture functional correctness. To
complement our automated metrics, future work could add validation of whether generated OCL rules
conform to formal OCL syntax, human expert review, and in-depth error analysis.</p>
        <p>Moreover, while we evaluated diverse retrieval approaches in our experiments, further research
is needed to explore more advanced retrieval techniques, such as hybrid approaches like multi-stage
retrieval. Fine-tuning retrieval models specifically for OCL constraints may also yield additional
performance gains over our base models. Another underexplored way to improve the generation of
OCL rules based on natural language specifications could be refining the chunking strategy to ensure
that retrieved information is both concise and semantically rich, for example by grouping chunks that
are semantically connected. Instead of just retrieving meta-model chunks, it could also be beneficial to
retrieve appropriate best practices and OCL examples, to leverage in context learning.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>Our study investigated the impact of diferent retrieval strategies on the performance of a
RetrievalAugmented Generation pipeline for generating OCL rules. We evaluated three retrieval methods, BM25,
BERT-based retrieval, and SPLADE-based retrieval, analyzing their efectiveness in providing relevant
context for a large language model.</p>
      <p>Our findings indicate that while retrieval can enhance generation accuracy, its efectiveness is
highly dependent on the retrieval method and the number of retrieved chunks  . BM25-based retrieval
underperformed the baseline, likely due to its reliance on exact term matching, which may not always
align with natural language specifications. In contrast, semantic retrieval approaches such as BERT and
SPLADE provided better performance, with SPLADE achieving the best results at lower  values but
degrading at higher  values due to the inclusion of less relevant context.</p>
      <p>A key takeaway is that blindly increasing  does not always yield better results. Instead, an optimal
retriever-dependent balance must be struck to avoid retrieval-induced noise while ensuring suficient
context for the generation model. Additionally, we observed that retrieval approaches with lower
variance in performance provide more reliable and overall better results, which may be preferable in
practical applications where consistency is crucial.</p>
      <p>Additionally, our comparison with the PathOCL method highlights that our RAG-based approach,
particularly SPLADE with  = 10 , outperforms graph-based path selection, especially on larger and
more complex meta-models.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>This research was funded by the Federal Ministry of Education and Research of Germany (BMBF) as
part of the CeCaS project, FKZ: 16ME0800K.</p>
    </sec>
    <sec id="sec-6">
      <title>Declaration on Generative AI</title>
      <p>During the preparation of this work, the author(s) used Grammarly in order to: Grammar and spelling
check. After using these tool(s)/service(s), the author(s) reviewed and edited the content as needed and
take(s) full responsibility for the publication’s content.</p>
    </sec>
    <sec id="sec-7">
      <title>A. Plots</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Object</given-names>
            <surname>Management</surname>
          </string-name>
          <string-name>
            <surname>Group</surname>
          </string-name>
          , OCL
          <volume>2</volume>
          .4
          <string-name>
            <given-names>Specification</given-names>
            <surname>Overview</surname>
          </string-name>
          ,
          <year>2014</year>
          . URL: https://www.omg.org/ spec/OCL/2.4/About-OCL,
          <source>accessed: April 3</source>
          ,
          <year>2025</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>D.</given-names>
            <surname>Pilone</surname>
          </string-name>
          , N. Pitman, UML
          <volume>2</volume>
          .
          <article-title>0 in a Nutshell, O'Reilly Media, Inc</article-title>
          .,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>D.</given-names>
            <surname>Steinberg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Budinsky</surname>
          </string-name>
          , E. Merks,
          <string-name>
            <given-names>M.</given-names>
            <surname>Paternostro</surname>
          </string-name>
          , EMF: Eclipse Modeling Framework, Pearson Education,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>OpenAI</surname>
          </string-name>
          , et al.,
          <source>Gpt-4 technical report</source>
          (
          <year>2024</year>
          ). http://arxiv.org/abs/2303.08774.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>DeepSeek-AI</surname>
          </string-name>
          , et al.,
          <string-name>
            <surname>Deepseek-</surname>
          </string-name>
          r1:
          <article-title>Incentivizing reasoning capability in llms via reinforcement learning (</article-title>
          <year>2025</year>
          ). http://arxiv.org/abs/2501.12948.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A.</given-names>
            <surname>Grattafiori</surname>
          </string-name>
          , et al.,
          <article-title>The llama 3 herd of models (</article-title>
          <year>2024</year>
          ). http://arxiv.org/abs/2407.21783.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>D.</given-names>
            <surname>Guo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Zhu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Xie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Dong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , G. Chen,
          <string-name>
            <given-names>X.</given-names>
            <surname>Bi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y. K.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Luo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Xiong</surname>
          </string-name>
          , W. Liang,
          <article-title>Deepseek-coder: When the large language model meets programming - the rise of code intelligence (</article-title>
          <year>2024</year>
          ). http://arxiv.org/abs/2401.14196.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A.</given-names>
            <surname>Ni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Yin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Riddell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Feng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Shen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Yin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Yavuz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Xiong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Joty</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Radev</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. Cohan,</surname>
          </string-name>
          <article-title>L2ceval: Evaluating language-to-code generation capabilities of large language models (</article-title>
          <year>2023</year>
          ). http://arxiv.org/abs/2309.17446.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>F.</given-names>
            <surname>Pan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Zolfaghari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Wen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Petrovic</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Knoll</surname>
          </string-name>
          ,
          <article-title>Generative AI for OCL Constraint Generation: Dataset Collection and LLM Fine-</article-title>
          tuning,
          <year>2024</year>
          . https://ieeexplore.ieee.org/document/ 10741141/.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>S.</given-names>
            <surname>Abukhalaf</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Hamdaqa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Khomh</surname>
          </string-name>
          ,
          <article-title>On codex prompt engineering for ocl generation: An empirical study</article-title>
          ,
          <year>2023</year>
          . https://ieeexplore.ieee.org/document/10173990.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>X.</given-names>
            <surname>Gu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Hu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Wan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Wei</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <article-title>On the efectiveness of large language models in domain-specific code generation</article-title>
          ,
          <source>ACM Trans. Softw. Eng. Methodol</source>
          .
          <volume>34</volume>
          (
          <year>2025</year>
          )
          <volume>78</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>78</lpage>
          :
          <fpage>22</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>P.</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Geng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Fu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Jiang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Cui</surname>
          </string-name>
          ,
          <article-title>Retrievalaugmented generation for ai-generated content: A survey (</article-title>
          <year>2024</year>
          ). http://arxiv.org/abs/2402.19473.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Gao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Xiong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Gao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Jia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Pan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Bi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Dai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Sun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <article-title>Retrieval-augmented generation for large language models: A survey (</article-title>
          <year>2024</year>
          ). http://arxiv.org/abs/2312.10997.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>S.</given-names>
            <surname>Sharma</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Yoon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Dernoncourt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Sultania</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Bagga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Bui</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Kotte</surname>
          </string-name>
          ,
          <article-title>Retrieval augmented generation for domain-specific question answering (</article-title>
          <year>2024</year>
          ). http://arxiv.org/abs/2404. 14760.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>J.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Yuan</surname>
          </string-name>
          ,
          <string-name>
            <surname>Z. Zhang,</surname>
          </string-name>
          <article-title>Enhancing llm factual accuracy with rag to counter hallucinations: A case study on domain-specific queries in private knowledge-bases (</article-title>
          <year>2024</year>
          ). http://arxiv.org/abs/2403. 10446.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>O.</given-names>
            <surname>Ovadia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Brief</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mishaeli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Elisha</surname>
          </string-name>
          ,
          <article-title>Fine-tuning or retrieval? comparing knowledge injection in llms (</article-title>
          <year>2024</year>
          ). http://arxiv.org/abs/2312.05934.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>H.</given-names>
            <surname>Soudani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Kanoulas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Hasibi</surname>
          </string-name>
          ,
          <article-title>Fine tuning vs. retrieval augmented generation for less popular knowledge</article-title>
          ,
          <year>2024</year>
          . https://dl.acm.org/doi/10.1145/3673791.3698415.
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>A.</given-names>
            <surname>Balaguer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Benara</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. L. d. F.</given-names>
            <surname>Cunha</surname>
          </string-name>
          , R. d. M. E. Filho,
          <string-name>
            <given-names>T.</given-names>
            <surname>Hendry</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Holstein</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Marsman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Mecklenburg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Malvar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. O.</given-names>
            <surname>Nunes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Padilha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Sharp</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Silva</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Sharma</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Aski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Chandra</surname>
          </string-name>
          ,
          <article-title>Rag vs fine-tuning: Pipelines, tradeofs, and a case study on agriculture (</article-title>
          <year>2024</year>
          ). http://arxiv.org/ abs/2401.08406.
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>S.</given-names>
            <surname>Abukhalaf</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Hamdaqa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Khomh</surname>
          </string-name>
          , Pathocl:
          <article-title>Path-based prompt augmentation for ocl generation with gpt-4 (</article-title>
          <year>2024</year>
          ). https://zenodo.org/doi/10.5281/zenodo.10841785.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>S. E.</given-names>
            <surname>Robertson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Walker</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Jones</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. M.</given-names>
            <surname>Hancock-Beaulieu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Gatford</surname>
          </string-name>
          ,
          <source>Okapi at TREC 3</source>
          (
          <year>1994</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>J.</given-names>
            <surname>Devlin</surname>
          </string-name>
          , M.-
          <string-name>
            <given-names>W.</given-names>
            <surname>Chang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Toutanova</surname>
          </string-name>
          , BERT:
          <article-title>Pre-training of Deep Bidirectional Transformers for Language Understanding (</article-title>
          <year>2019</year>
          ). http://arxiv.org/abs/
          <year>1810</year>
          .04805.
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>T.</given-names>
            <surname>Formal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Piwowarski</surname>
          </string-name>
          , S. Clinchant,
          <source>SPLADE: Sparse Lexical and Expansion Model for First Stage Ranking</source>
          ,
          <year>2021</year>
          . https://dl.acm.org/doi/10.1145/3404835.3463098.
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>D.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. S.</given-names>
            <surname>Rawat</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zaheer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lukasik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Veit</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Kumar</surname>
          </string-name>
          ,
          <source>Large Language Models with Controllable Working Memory</source>
          ,
          <year>2023</year>
          . https://aclanthology.org/
          <year>2023</year>
          .findings-acl.
          <volume>112</volume>
          /.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>