CA-RAG:面向结构忠实长文本生成的约束对齐检索
摘要
CA-RAG 是一种检索条件化框架,在证据选择之前,利用源自本体的结构约束和知识图谱关系来增强针对特定章节的查询,从而在对合规性敏感的长文本生成任务中,相较于标准 RAG,提高 Precision@k、Recall@k、F1@k 和合规性。
查看缓存全文
缓存时间: 2026/11/27 09:31
# CA-RAG: Constraint-Aligned Retrieval for Structurally Faithful Long-Form Generation
Source: [https://arxiv.org/html/2611.33497](https://arxiv.org/html/2611.33497)
Meghana KshirsagarAffiliation:Department of Computer Science & Information SystemsConor RyanAffiliation:University of Limerick, Limerick, Ireland
###### Abstract
Retrieval\-augmented generation \(RAG\) typically optimises evidence selection for semantic relevance, whereas compliance\-sensitive long\-form generation also requires evidence supporting explicit structural obligations\. Semantically relevant retrieval may therefore omit information needed for mandatory downstream clauses\. We propose Constraint\-Aligned RAG \(CA\-RAG\), a retrieval\-conditioning framework that augments section\-specific queries with ontology\-derived structural constraints and policy\-grounded knowledge\-graph relations before evidence selection\. Retrieval\-only evaluation with manually annotated evidence shows consistent improvements across retrieval budgets\. Atk=6k=6,CA\-RAGincreases Precision@kkfrom0\.52680\.5268to0\.56920\.5692, pooled Recall@kkfrom0\.54020\.5402to0\.59500\.5950, and F1@kkfrom0\.53890\.5389to0\.56720\.5672over standard RAG\. Generation experiments further show improvements in compliance and reliability in several model–domain settings, while generation\-only constraints achieve higher clause coverage but lower overall compliance and reliability\. These results indicate that structurally aligned retrieval can improve evidence sufficiency in compliance\-sensitive long\-form generation\.
## 1Introduction
Large language models \(LLMs\) have demonstrated strong capabilities in conditional text generation and few\-shot adaptation on a wide range of natural language processing tasks\([Brown et al\., 2020](https://arxiv.org/html/2611.33497#bib.bib6)\)\. However, many real\-world long\-form generation tasks, including contracts, policy reports, clinical documentation, regulatory disclosures, and enterprise workflow artefacts, require outputs that satisfy explicit structural and compliance constraints in addition to factual relevance\. In these settings, generation quality depends not only on retrieving semantically related evidence, but also on preserving clause\-level completeness and document\-level consistency across extended contexts\.
Retrieval\-augmented generation \(RAG\) improves grounded generation by incorporating external evidence during decoding[Lewis et al\. \(2021\)](https://arxiv.org/html/2611.33497#bib.bib1)\. However, existing RAG pipelines optimise retrieval primarily for semantic similarity to the input query, largely independent of the structural requirements that govern the final document[Zhao et al\. \(2024\)](https://arxiv.org/html/2611.33497#bib.bib13);[Gao et al\. \(2024\)](https://arxiv.org/html/2611.33497#bib.bib12)\. Semantically relevant retrieval may still omit structurally required evidence, leading to omission failures, inconsistent sections, and incomplete policy synthesis in long\-form generation settings\. We hypothesise that a substantial subset of these failures arises from structurally incomplete retrieval rather than decoding alone\.
Recent work has explored integrating structured knowledge graphs \(KG\) and relational reasoning into language models to improve grounding and interpretability[Yasunaga et al\. \(2022\)](https://arxiv.org/html/2611.33497#bib.bib10)\. However, these approaches primarily focus on reasoning and answer selection rather than retrieval for long\-form generation\. Similarly, existing query expansion, reranking, and prompt\-based control methods improve semantic recall or generation control without explicitly conditioning retrieval on downstream structural requirements\.
We propose Constraint\-Aligned RAG \(CA\-RAG\), a retrieval\-conditioning framework that incorporates ontology\-derived schema constraints and policy\-grounded relational dependencies prior to evidence selection\. Unlike query expansion or reranking, CA\-RAG does not simply improve semantic recall or reorder retrieved passages\. Instead, structural constraints condition which evidence becomes retrievable for downstream generation\. Ontology constraints encode document\-level structure, while knowledge graph relations capture dependencies between clauses, entities, and policy conditions\. By aligning retrieval with downstream requirements, CA\-RAG aims to improve structural completeness and reduces omission failures in long\-form generation\.
We evaluateCA\-RAGacross education, finance, and healthcare using three open\-weight LLMs and multiple retrieval baselines\. We additionally evaluate retrieval independently using manually judged evidence to isolate retrieval\-stage effects\. Results show improved conventional retrieval performance and domain\-dependent changes in structural evidence sufficiency, with downstream gains in compliance and reliability across several model–domain settings\. These findings highlight the value of structurally sufficient evidence for compliance\-sensitive long\-form generation\.
Contributions\.Our contributions are:
1. 1\.We identify a*retrieval–generation mismatch*: semantically relevant evidence may be structurally insufficient for mandatory content\.
2. 2\.We proposeCA\-RAG, which conditions retrieval on ontology\-derived requirements and policy\-grounded KG dependencies\.
3. 3\.We evaluate retrieval independently using manually annotated evidence, standard information retrieval \(IR\) metrics, and structural evidence measures\.
4. 4\.Across three domains and three LLMs, we show improved evidence recovery and domain\-dependent gains in structural sufficiency, with corresponding downstream improvements in several settings\.
## 2Related Work
Retrieval\-Augmented Generation\.Retrieval\-augmented generation \(RAG\) improves grounded text generation by conditioning language models on external evidence retrieved at inference time[Lewis et al\. \(2021\)](https://arxiv.org/html/2611.33497#bib.bib1)\. Subsequent work has extended RAG across adaptive retrieval strategies, retrieval architectures, and knowledge\-intensive tasks, including question answering, summarisation, and long\-context generation[Zhao et al\. \(2024\)](https://arxiv.org/html/2611.33497#bib.bib13);[Gao et al\. \(2024\)](https://arxiv.org/html/2611.33497#bib.bib12)\. However, most RAG systems optimise retrieval primarily for semantic similarity to the input query, without explicitly considering whether the retrieved evidence is structurally sufficient for downstream long\-form generation\. Consequently, semantically relevant retrieval may still produce incomplete evidence for section\-wise synthesis and clause\-level consistency\.
Controlled, Knowledge\-Grounded, and Adaptive Retrieval Methods\.A complementary line of work explores structure\-aware and controllable generation through hierarchical planning, dynamic content control, and constrained decoding[Hu et al\. \(2022\)](https://arxiv.org/html/2611.33497#bib.bib2);[You et al\. \(2023\)](https://arxiv.org/html/2611.33497#bib.bib3);[Stolfo et al\. \(2025\)](https://arxiv.org/html/2611.33497#bib.bib4)\. Other approaches integrate structured knowledge graphs and relational reasoning to improve factual grounding and interpretability[Yasunaga et al\. \(2022\)](https://arxiv.org/html/2611.33497#bib.bib10);[Li et al\. \(2024\)](https://arxiv.org/html/2611.33497#bib.bib5)\. Adaptive retrieval methods such asSelf\-RAG[Asai et al\. \(2023\)](https://arxiv.org/html/2611.33497#bib.bib15)andFlare\-RAG[Jiang et al\. \(2023b\)](https://arxiv.org/html/2611.33497#bib.bib16)further refine retrieval dynamically during generation to improve factual consistency and response quality\.
Despite these advances, existing approaches generally target semantic relevance, evidence refinement, relational grounding, or generation\-time control rather than explicitly conditioning retrieval on the structural requirements of the target document\. Query expansion methods typically introduce semantically related terms, KG\-based retrieval incorporates structured relational knowledge, and re\-ranking methods reorder candidate passages using downstream relevance signals\. In contrast, CA\-RAG conditions retrieval using ontology\-derived and policy\-grounded structural constraints before evidence selection, explicitly guiding retrieval toward structurally sufficient evidence for downstream generation\.
Positioning of This Work\.CA\-RAG therefore shifts the focus from improving semantic relevance alone to enforcing structural sufficiency during retrieval itself\. This directly targets omission failures arising from incomplete retrieval by constraining evidence selection before generation begins\.
## 3Methodology
Figure 1:Overview ofCA\-RAG: retrieval conditioned on structural and policy constraints for long\-form generation\.### 3\.1Problem Formulation
We study long\-form structured generation, where document validity depends not only on semantic relevance, but also on satisfying explicit structural and policy constraints\.
Given an input scenarioxxand an external corpusℛ\\mathcal\{R\}, the goal is to generate a structured documenty=\(y1,…,yT\)y=\(y\_\{1\},\\dots,y\_\{T\}\)composed of multiple sections\. Semantically relevant retrieval may still omit structurally required evidence, leading to omission failures, incomplete policy synthesis, and inconsistent sections\. Our focus is on fluency, structural completeness, consistency, and grounding\.
Letpθ\(y∣c\)p\_\{\\theta\}\(y\\mid c\)denote a language model conditioned on contextcc\. Standard RAG defines
c=\(x,R\(x\)\),c=\(x,R\(x\)\),\(1\)where retrieval is optimised primarily for semantic similarity\. We instead condition retrieval using structured constraints:
c=\(x,R\(x∣𝒞\(x\)\),𝒞\(x\)\),c=\\big\(x,R\(x\\mid\\mathcal\{C\}\(x\)\),\\mathcal\{C\}\(x\)\\big\),\(2\)where𝒞\(x\)\\mathcal\{C\}\(x\)denotes ontology\-derived and policy\-grounded structural constraints\.
CA\-RAG is a retrieval\-conditioning framework rather than a new retriever architecture\. It can be viewed as structurally grounded query conditioning: rather than expanding queries with semantically related terms alone, CA\-RAG derives additional retrieval terms from ontology\-defined document requirements and policy\-grounded KG relations\.
### 3\.2Baseline Retrieval\-Augmented Generation
Our baseline follows a standard dense RAG pipeline\. Given scenario contextxx, the retriever selects evidence
Rx⊂ℛ,R\_\{x\}\\subset\\mathcal\{R\},\(3\)and generation proceeds as
y=LLM\(x,Rx\)\.y=\\mathrm\{LLM\}\(x,R\_\{x\}\)\.\(4\)
### 3\.3Constraint\-Aligned RAG
CA\-RAG conditions evidence retrieval using ontology\-derived schema constraints and policy\-grounded relational dependencies extracted before retrieval\.
##### Ontology Constraints\.
The ontology layer captures schema\-level structure, including section types, mandatory fields, and attribute dependencies\. For each section headinghth\_\{t\}, relevant ontology concepts are retrieved through semantic matching:
𝒞tonto=Match\(ht,\{ol\}\)\.\\mathcal\{C\}^\{\\text\{onto\}\}\_\{t\}=\\mathrm\{Match\}\(h\_\{t\},\\\{o\_\{l\}\\\}\)\.\(5\)
##### Policy\-Grounded KG Constraints\.
We additionally construct policy\-grounded knowledge graphs whose nodes represent clauses, entities, and policy attributes, while edges encode relations such asrequires,permits, andprohibits\. Relevant subgraphs are retrieved as
𝒞tkg=RetrieveKG\(x,ht\)\.\\mathcal\{C\}^\{\\text\{kg\}\}\_\{t\}=\\mathrm\{RetrieveKG\}\(x,h\_\{t\}\)\.\(6\)
The final constraint representation is
𝒞t=𝒞tonto∪𝒞tkg\.\\mathcal\{C\}\_\{t\}=\\mathcal\{C\}^\{\\text\{onto\}\}\_\{t\}\\cup\\mathcal\{C\}^\{\\text\{kg\}\}\_\{t\}\.\(7\)
Ontology concepts and KG relations are constructed semi\-automatically using LLM\-assisted template extraction and semantic matching from domain policy corpora, requiring limited manual curation primarily for ontology schema definition and validation\.
#### 3\.3\.1Constraint\-Aligned Retrieval
For each section, we construct a constraint\-aligned retrieval query
qt⋆=ConstructQuery\(x,ht,𝒞t\),q\_\{t\}^\{\\star\}=\\mathrm\{ConstructQuery\}\(x,h\_\{t\},\\mathcal\{C\}\_\{t\}\),\(8\)and retrieve evidence as
Rt=R\(qt⋆\)\.R\_\{t\}=R\(q\_\{t\}^\{\\star\}\)\.\(9\)
The query construction stage augments the original section query using ontology concepts and KG\-linked policy obligations\. Ontology concepts and KG\-linked obligations are appended as constraint\-aligned retrieval terms, guiding retrieval toward structurally relevant evidence\. For example, for aThird\-Party Transfersection, standard RAG typically retrieves general data\-sharing passages, while CA\-RAG augments retrieval using ontology concepts such asTransfer Mechanismsand KG\-linked obligations, includingdata governance regulationsandDPIA111Data Protection Impact Assessment\.requirements\. This guides retrieval toward evidence that is more structurally aligned with downstream compliance requirements\. Additional implementation details, retrieval traces, and worked query construction examples are provided in Appendix[A\.2](https://arxiv.org/html/2611.33497#A1.SS2)\.
### 3\.4Section\-Wise Generation
Documents are generated section\-wise using shared scenario context and section\-specific evidence:
yt=LLM\(x,ht,Rt,𝒞t\)\.y\_\{t\}=\\mathrm\{LLM\}\(x,h\_\{t\},R\_\{t\},\\mathcal\{C\}\_\{t\}\)\.\(10\)
Each section is generated independently using the shared scenario context, retrieved evidence, and structural constraints\. An optional lightweight RLHF refinement stage is applied after generation to improve readability and stylistic consistency\.
##### Pipeline Overview\.
The CA\-RAG pipeline can be summarised as:
Constraint Extraction→\\rightarrowQuery Construction→\\rightarrowEvidence Retrieval→\\rightarrowSection Generation
Figure[1](https://arxiv.org/html/2611.33497#S3.F1)illustrates the overall CA\-RAG framework\. Ontology\-derived schema constraints and policy\-grounded relational dependencies are extracted before retrieval and incorporated into constraint\-aligned retrieval queries\. The retrieved evidence is then used for section\-wise grounded generation\. The full algorithmic specification is provided in Appendix[A\.1](https://arxiv.org/html/2611.33497#A1.SS1)\.
## 4Experimental Setup
### 4\.1Domains and Tasks
We evaluateCA\-RAGon Data Sharing Agreement \(DSA\) synthesis across three compliance\-critical domains:health,education, andfinance\. These domains exhibit varying levels of regulatory complexity, clause dependency structure, and omission sensitivity, enabling analysis of when retrieval\-stage structural alignment is most beneficial\. Healthcare emphasises privacy\-sensitive compliance, education focuses on governance consistency, and finance contains dense regulatory dependencies\. For each domain, we curate corpora of regulatory policies, governance documents, operational guidelines, and domain ontologies\. These corpora serve as retrieval sources and inputs for policy\-grounded knowledge graph construction\.
Clause\-level evaluation uses auditing dimensions informed by the clause and legal\-text taxonomies represented inCUAD,LEDGAR, andLexGLUE; these resources are not used as direct DSA ground\-truth annotations\. Mandatory clause completeness is assessed using a GPT\-4o\-mini clause auditor with deterministic prompting and structured outputs\. Clause coverage is additionally measured using checklist\-based auditing queries \(Appendix[A\.5\.2](https://arxiv.org/html/2611.33497#A1.SS5.SSS2.Px1)\), enabling interpretable clause\-level analysis beyond aggregate similarity metrics\.
##### Structured Resources\.
The shared ontology contains 21 classes, 15 object properties, 7 datatype properties, and 169 triples\. The education, healthcare, and finance KGs contain 79, 141, and 267 entities, respectively\.
### 4\.2Models, Baselines, and Generation Protocol
We evaluateCA\-RAGusingLlama\-3\.1\-8B[Grattafiori et al\. \(2024\)](https://arxiv.org/html/2611.33497#bib.bib7),Llama\-3\.2\-3B, andMistral\-7B[Jiang et al\. \(2023a\)](https://arxiv.org/html/2611.33497#bib.bib8)\. Dense retrieval usesall\-MiniLM\-L6\-v2for retrieval, ontology matching, and policy subgraph retrieval\. We compare standard RAG, ontology\-enhanced retrieval \(RAG\+O\), KG\-enhanced retrieval \(RAG\+KG\), full CA\-RAG, adaptive retrieval baselines \(Self\-RAG,Flare\-RAG\), and a generation\-only constraint baseline \(Gen\-Constraint\), in which constraints are injected only during generation while retrieval remains identical to standardRAG\. Generation proceeds section\-wise using shared scenario context, retrieved evidence, and associated structural constraints\. For retrieval\-conditioned variants, ontology\- and policy\-grounded constraints are incorporated before retrieval to guide evidence selection\. In contrast,Gen\-Constraintapplies the same constraints only during generation, isolating the effect of retrieval\-stage structural alignment\.
All methods use the same base models, retriever backbone, decoding settings, prompt scaffold, and evaluation pipeline\. An optional lightweight RLHF refinement stage may improve readability without modifying retrieval or evidence support\.
### 4\.3Evaluation Metrics
We evaluate generated Data Sharing Agreements \(DSAs\) using metrics that separately capture surface similarity, structural compliance, document\-level reliability, and efficiency\. Lety^\\hat\{y\}denote a generated DSA andyTy^\{T\}the corresponding reference agreement\.
##### Similarity Score\. \(Sim\.\)
We measure surface and semantic similarity using cosine similarity and ROUGE\-LSUM:
Sim\(y^,yT\)=12\(CosSim\(y^,yT\)\+ROUGE\-LSUM\(y^,yT\)\),\\mathrm\{Sim\}\(\\hat\{y\},y^\{T\}\)=\\tfrac\{1\}\{2\}\\big\(\\mathrm\{CosSim\}\(\\hat\{y\},y^\{T\}\)\+\\mathrm\{ROUGE\\text\{\-\}LSUM\}\(\\hat\{y\},y^\{T\}\)\\big\),\(11\)with both components normalised to\[0,1\]\[0,1\]\.
##### Compliance Score\. \(Comp\.\)
To assess structural and regulatory completeness, we aggregate five auditing signals: clause compliance fromCUAD[Hendrycks et al\. \(2021\)](https://arxiv.org/html/2611.33497#bib.bib9), provision coverage fromLEDGAR[Tuggener et al\. \(2020\)](https://arxiv.org/html/2611.33497#bib.bib11), fairness\-related signals fromLexGLUE\-UNFAIR\-TOS[Lippi et al\. \(2019\)](https://arxiv.org/html/2611.33497#bib.bib14), domain\-specific policy alignment, and explicit DSA clause coverage:
Comp\(y^\)=\(sCUAD⋅sLED⋅sLex⋅sDom⋅sClause\)1/5\\mathrm\{Comp\}\(\\hat\{y\}\)=\\Big\(s\_\{\\text\{CUAD\}\}\\cdot s\_\{\\text\{LED\}\}\\cdot s\_\{\\text\{Lex\}\}\\cdot s\_\{\\text\{Dom\}\}\\cdot s\_\{\\text\{Clause\}\}\\Big\)^\{1/5\}\(12\)wheresLEDs\_\{\\text\{LED\}\},sLexs\_\{\\text\{Lex\}\}, andsDoms\_\{\\text\{Dom\}\}denote LEDGAR, LexGLUE, and domain\-specific compliance scores, respectively\. We use the geometric mean so that omissions in any required dimension lower the overall compliance score\.
##### Reliability Score\. \(Rel\.\)
We define document\-level reliability as:
Rel\(y^,yT\)=λComp\(y^\)\+\(1−λ\)Sim\(y^,yT\),\\mathrm\{Rel\}\(\\hat\{y\},y^\{T\}\)=\\lambda\\,\\mathrm\{Comp\}\(\\hat\{y\}\)\+\(1\-\\lambda\)\\,\\mathrm\{Sim\}\(\\hat\{y\},y^\{T\}\),\(13\)withλ=0\.7\\lambda=0\.7to prioritise structural and compliance completeness over surface similarity\. We reportRel\\mathrm\{Rel\}as a summary metric but treat clause coverage and the presence of missing mandatory clauses as the primary evidence of structural robustness\. Method rankings remain stable acrossλ∈\{0\.3,0\.5,0\.7,0\.9\}\\lambda\\in\\\{0\.3,0\.5,0\.7,0\.9\\\}; full sensitivity results are reported in the Appendix[A\.6](https://arxiv.org/html/2611.33497#A1.SS6)\.
##### Clause\-Level Robustness\.
Because our central claim concerns omission reduction, we report clause coverage, the number of missing mandatory clauses, overall coverage, and dimension\-level compliance scores separately\.
Implementation details for auditors, compliance scoring, and efficiency measurements, such as latency and empirical throughput, are provided in Appendix[A\.5](https://arxiv.org/html/2611.33497#A1.SS5)\.
### 4\.4Retrieval\-Level Evaluation
To determine whether improvements arise at retrieval time rather than solely during generation, we evaluate the retriever independently with generation disabled\. For each scenario–section pair, we pool and deduplicate the union of the top\-20 passages retrieved by standard RAG andCA\-RAG\. Each unique passage is manually labelled as*relevant*,*not relevant*, or*uncertain*according to whether it provides evidence supporting the corresponding scenario–section requirement\. Uncertain passages are excluded from the primary analysis\.
Because exhaustive corpus\-level relevance judgements are unavailable, we report Precision@kk, pooled Recall@kk, and F1@kkfork∈\{3,6,9\}k\\in\\\{3,6,9\\\}\. Pooled Recall@kkis computed relative to the set of passages judged relevant within the pooled top\-20 candidate set for each scenario–section pair rather than against an exhaustively judged corpus\.
We additionally report Constraint Coverage, Clause\-Evidence Coverage, and Retrieval Omission Rate to evaluate whether retrieved evidence supports the structural requirements of downstream generation\.
### 4\.5Implementation and Controlled Comparison
All variants use the same retriever backbone, prompt scaffold, decoding parameters, retrieval corpus, and evaluation pipeline\. Dense retrieval usesall\-MiniLM\-L6\-v2, withk=6k=6passages and up tom=3m=3ontology concepts andm=3m=3KG relations per section\. Ground\-truth DSAs are excluded from the retrieval corpus\. Experiments run on NVIDIA A100 80GB GPUs\.
## 5Results
We evaluateCA\-RAGacross education, finance, and healthcare domains using three open\-weight large language models and multiple retrieval\-generation baselines\. Our analysis focuses on whether retrieval\-stage structural conditioning reduces omission failures and improves clause\-level completeness in long\-form constrained generation\. In compliance\-critical settings, omission failures are often more consequential than small reductions in semantic similarity\. Consequently, our evaluation emphasises structural completeness, clause recovery, and omission robustness in addition to aggregate reliability metrics\. Unless otherwise stated, results are macro\-averaged within each domain\. Full per\-domain results are provided in the Appendix[A\.8](https://arxiv.org/html/2611.33497#A1.SS8)\.
### 5\.1Retrieval\-Level Evaluation
We first evaluate retrieval independently of downstream generation\. Table[1](https://arxiv.org/html/2611.33497#S5.T1)reports manually verified retrieval performance aggregated across domains\.CA\-RAGimproves Precision@kk, pooled Recall@kk, and F1@kkat every evaluated retrieval depth\. At the generation setting \(k=6k=6\), Precision increases from0\.52680\.5268to0\.56920\.5692, pooled Recall from0\.54020\.5402to0\.59500\.5950, and F1 from0\.53890\.5389to0\.56720\.5672\. Because generation is disabled in this experiment, these gains cannot be attributed to prompting or decoding and provide direct evidence that structural conditioning changes evidence selection before generation\.
Table 1:Retrieval\-only evaluation aggregated across domains using manually annotated pooled evidence\. Pooled Recall is computed relative to relevant passages within the judged candidate pool\. Higher is better\.Figure 2:Structural sufficiency across domains and retrieval budgets \(k∈\{3,6,9\}k\\in\\\{3,6,9\\\}\), measured by Constraint Coverage, Clause\-Evidence Coverage, and Retrieval Omission Rate\. Solid lines denoteCA\-RAG; dashed lines denote RAG\.
### 5\.2Structural Sufficiency of Retrieved Evidence
Standard relevance metrics indicate whether retrieved passages are relevant, but not whether they sufficiently support mandatory downstream requirements\. We therefore evaluate*Constraint Coverage*\(CCov\) and*Clause\-Evidence Coverage*\(CECov\), and report*Retrieval Omission Rate*\(ROR\) as the complementary measure of missing clause\-level evidence\. CCov measures the proportion of required ontology/KG constraints supported by retrieved evidence, while CECov measures the proportion of mandatory clause requirements with supporting evidence\.
For required constraints𝒞\\mathcal\{C\}and top\-kkpassagesRkR\_\{k\},
CCov@k=\|\{c∈𝒞:∃r∈Rk,Supports\(r,c\)\}\|\|𝒞\|\.\\mathrm\{CCov\}@k=\\frac\{\|\\\{c\\in\\mathcal\{C\}:\\exists r\\in R\_\{k\},\\,\\mathrm\{Supports\}\(r,c\)\\\}\|\}\{\|\\mathcal\{C\}\|\}\.\(14\)
For mandatory clauses𝒬\\mathcal\{Q\},
CECov@k=\|\{q∈𝒬:∃r∈Rk,Supports\(r,q\)\}\|\|𝒬\|\.\\mathrm\{CECov\}@k=\\frac\{\|\\\{q\\in\\mathcal\{Q\}:\\exists r\\in R\_\{k\},\\,\\mathrm\{Supports\}\(r,q\)\\\}\|\}\{\|\\mathcal\{Q\}\|\}\.\(15\)
Retrieval Omission Rate is:
ROR@k=1−CECov@k\.\\mathrm\{ROR\}@k=1\-\\mathrm\{CECov\}@k\.\(16\)
Support is determined from manual evidence annotations indicating whether a retrieved passage directly supports the corresponding constraint or mandatory clause\. Together, these metrics distinguish relevant retrieval from evidence that is structurally sufficient for downstream generation\.
Figure[2](https://arxiv.org/html/2611.33497#S5.F2)shows substantial domain variation\. Education maintains high CECov and low omission under both methods, withCA\-RAGproviding modest CCov gains\. In healthcare,CA\-RAGimproves CECov and reduces omissions, particularly at larger retrieval budgets\. Finance remains more challenging: CCov is comparable to RAG, butCA\-RAGretrieves less direct clause\-supporting evidence\. Thus, satisfying ontology\- and KG\-derived constraints does not guarantee coverage of every mandatory clause\. Overall, constraint alignment can improve the structural utility of retrieved evidence, but its effectiveness depends on alignment between structural constraints and available domain evidence\. This also explains why improvements in conventional retrieval metrics do not translate uniformly into higher clause\-evidence coverage\.
### 5\.3Overall Generation Performance
Table[2](https://arxiv.org/html/2611.33497#S5.T2)reports document\-level reliability across models and domains\.CA\-RAGachieves the highest mean reliability in six of nine model–domain configurations, including all three finance configurations, while competing methods remain strongest in the remaining healthcare and education settings\. These results should be interpreted together with Sections[5\.1](https://arxiv.org/html/2611.33497#S5.SS1)–[5\.2](https://arxiv.org/html/2611.33497#S5.SS2): retrieval conditioning measurably changes evidence selection before generation, while the magnitude of downstream gains remains model and domain dependent\. Finance domain provides a particularly informative setting because of its dense regulatory dependencies and omission\-sensitive requirements\. Although retrieval remains challenging in this domain,CA\-RAGyields strong downstream reliability in several model configurations\.
Adaptive retrieval methods such asSelf\-RAGandFlare\-RAGimprove aggregate reliability in some domains, particularly health, but also exhibit higher variance and latency due to iterative retrieval and refinement\. In contrast,CA\-RAGmaintains comparatively stable performance while reducing omission frequency with lower retrieval overhead\. Overall, the primary contribution ofCA\-RAGlies not in maximising aggregate generation scores, but in explicitly aligning evidence selection with downstream structural requirements, which can improve structural completeness and reduce omission failures\.
We additionally performed paired bootstrap significance testing across domains, runs, and model variants using document\-level reliability scores\. CA\-RAG significantly outperformed standard RAG,Self\-RAG, andFlare\-RAG, while differences relative to the generation\-only constraint baseline were not statistically significant\. This suggests that generation\-time prompting can partially improve aggregate reliability, whereas retrieval\-stage conditioning directly modifies evidence selection and can improve omission robustness and structural completeness\. \(Section[5\.5](https://arxiv.org/html/2611.33497#S5.SS5)\)\. Full paired bootstrap significance results are provided in Appendix[A\.10](https://arxiv.org/html/2611.33497#A1.SS10)\.
Table 2:Reliability \(mean±\\pmstd over 3 runs\)\. Best results arebold; second\-best areunderlined\.
### 5\.4Structural and Compliance Trade\-off Analysis
We analyse retrieval conditioning across six auditing metrics: clause compliance, provision coverage, fairness and balance, domain alignment, DSA clause coverage, and overall compliance\. Figure[3](https://arxiv.org/html/2611.33497#S5.F3)shows results forLlama\-3\.1\-8B; additional plots are provided in the appendix\. The radar plots reveal complementary behaviour between ontology\-derived and policy\-grounded constraints\. Ontology constraints primarily improve provision coverage and structural completeness, while KG\-based constraints strengthen policy\-specific obligations and clause\-level compliance behaviour\. The fullCA\-RAGconfiguration generally provides a balanced structural profile across domains\. Gains are strongest in finance and education, where omission\-sensitive clauses depend on structurally connected evidence across multiple sections\. Overall, the analysis highlights the importance of multi\-dimensional auditing beyond aggregate similarity metrics\.
Figure 3:Structural and compliance trade\-offs across retrieval variants forLlama\-3\.1\-8B\. Scores are normalised across six auditing metrics\. Ontology constraints improve structural completeness, while KG constraints strengthen clause compliance\.
### 5\.5Ablation: Retrieval\-Stage vs Generation\-Only Constraints
Generation\-only constraints achieve the highest clause coverage \(78\.7%78\.7\\%\), showing that explicit structural prompts can encourage clause inclusion during decoding\. However,CA\-RAGachieves higher compliance \(0\.67260\.6726\) and reliability \(0\.65690\.6569\)\. The retrieval\-only results provide evidence for a mechanism that generation\-only prompting cannot provide:CA\-RAGchanges the evidence available before decoding\. Atk=6k=6, it improves both Precision@kkand pooled Recall@kk, while structural retrieval analysis shows improved availability of clause\-supporting evidence\. Thus, generation\-only and retrieval\-stage constraints affect different parts of the pipeline\.
Table 3:Ablation comparing generation\-only constraints and retrieval\-stage structural alignment\. Higher is better\.
### 5\.6Ablation: Retrieval\-Budget Sensitivity
On finance with Llama\-3\.1\-8B, standard RAG shows a small compliance gain fromk=3k=3tok=6k=6but degrades substantially atk=9k=9, whereasCA\-RAGremains comparatively stable\. Its best reliability occurs atk=6k=6\(0\.64040\.6404\), indicating that the gains are not explained simply by retrieving more evidence\. Full results are reported in the appendix[A\.7](https://arxiv.org/html/2611.33497#A1.SS7)\.
### 5\.7Efficiency and Auditor Validation
CA\-RAGadds constraint extraction and query\-construction overhead but avoids the iterative retrieval loops used bySelf\-RAGandFlare\-RAG\. Its latency remains closer to standard RAG than to adaptive retrieval baselines in most settings; full efficiency results are reported in the Appendix[A\.9](https://arxiv.org/html/2611.33497#A1.SS9)\.
We independently validate automated clause\-coverage estimates against manual assessment\. The auditor obtains MAE=2\.63=2\.63percentage points, Pearsonr=0\.967r=0\.967\(p<0\.001p<0\.001\), and Spearmanρ=0\.777\\rho=0\.777\(p=0\.003p=0\.003\), indicating close agreement with manual evaluation\.
## 6Conclusion
We presentedCA\-RAG, a retrieval\-conditioning framework that aligns evidence selection with structural and policy requirements for compliance\-sensitive long\-form generation\. Retrieval\-only evaluation with manually annotated evidence shows improved evidence selection acrossk∈\{3,6,9\}k\\in\\\{3,6,9\\\}, withCA\-RAGimproving Precision@kk, pooled Recall@kk, and F1@kkover standard RAG\. Structural evidence sufficiency varies across domains, with gains in constraint and clause\-evidence coverage most apparent in education and healthcare, while finance remains more challenging\. Generation experiments show corresponding improvements in compliance and reliability in several model–domain settings, although gains remain model and domain dependent\. These findings suggest that semantic relevance alone can be insufficient for omission\-sensitive long\-form generation, and that retrieval\-stage structural alignment can improve evidence sufficiency before generation\.
## Limitations
WhileCA\-RAGimproves structural completeness and reduces omission failures, several limitations remain\.
Dependence on structured resources\.Our approach relies on the availability and quality of domain ontologies and policy\-grounded knowledge graphs\. In domains where such structured resources are incomplete, noisy, or unavailable, retrieval conditioning may be less effective\. Although ontology and KG construction are largely automated, missing or incorrect relations can propagate into retrieval conditioning\.
No guarantee of complete retrieval\.Constraint\-aligned retrieval increases the likelihood of retrieving structurally relevant evidence, but does not guarantee recovery of all required clauses\. Even with structural conditioning, omission\-sensitive obligations may still be missed when supporting evidence is incomplete or weakly represented in the corpus\.
Scope of evaluation\.Our experiments focus on Data Sharing Agreement synthesis across healthcare, finance, and education domains using three open\-weight LLM families\. While these domains exhibit diverse structural and regulatory characteristics, the findings may not directly generalise to other long\-form generation tasks, languages, model scales, or retrieval settings without further evaluation\.
Potential evaluation limitations\.Clause\-level compliance evaluation relies in part on LLM\-based auditing pipelines and benchmark\-derived compliance signals\. Although the same deterministic evaluation protocol is applied consistently across methods, automatic auditing may still miss subtle legal or domain\-specific nuances\. In addition, aggregate similarity metrics do not always correlate with structural completeness or omission robustness\.
Computational overhead and retrieval scaling\.Ontology matching, KG retrieval, and constraint\-aligned query construction introduce additional latency relative to standard RAG pipelines\. Retrieval\-budget sensitivity experiments further show that increasing retrieval depth does not necessarily improve downstream performance, particularly for standard RAG\. Scalability to larger corpora and real\-time deployment settings requires further study\.
Generality of refinement methods\.Our RLHF experiments suggest that post\-generation refinement mainly improves stylistic coherence and local fluency rather than reliably recovering missing evidence\-dependent clauses\. More advanced refinement or agentic verification mechanisms may therefore be necessary for robust omission\-sensitive generation\.
Overall, our findings suggest that retrieval\-stage structural alignment is a promising direction for improving robustness in long\-form generation settings where omission failures and incomplete evidence can lead to unreliable outputs\. Future work includes extending retrieval\-stage structural conditioning to broader settings, including compliance, policy generation, and agentic document generation\.
## Ethical Considerations
Constraint\-aligned retrieval may improve the reliability of long\-form compliance and policy generation systems by reducing omission\-sensitive failures\. However, generated agreements may still contain incomplete, outdated, or legally insufficient content if supporting evidence is missing or retrieval fails\. Such systems should therefore be used as assistive drafting tools rather than substitutes for expert legal or regulatory review\. In addition, policy\-grounded generation systems could be misused to automate large\-scale production of synthetic policies or compliance documents without appropriate human oversight\.
## References
- Asaiet al\.\(2023\)A\. Asai, Z\. Wu, Y\. Wang, A\. Sil, and H\. HajishirziSelf\-rag: learning to retrieve, generate, and critique through self\-reflection\.External Links:2310\.11511,[Link](https://arxiv.org/abs/2310.11511)Cited by:[§2](https://arxiv.org/html/2611.33497#S2.p2.1)\.
- Brownet al\.\(2020\)T\. B\. Brown, B\. Mann, N\. Ryder, M\. Subbiah, J\. Kaplan, P\. Dhariwal, A\. Neelakantan, P\. Shyam, G\. Sastry, A\. Askell, S\. Agarwal, A\. Herbert\-Voss, G\. Krueger, T\. Henighan, R\. Child, A\. Ramesh, D\. M\. Ziegler, J\. Wu, C\. Winter, C\. Hesse, M\. Chen, E\. Sigler, M\. Litwin, S\. Gray, B\. Chess, J\. Clark, C\. Berner, S\. McCandlish, A\. Radford, I\. Sutskever, and D\. AmodeiLanguage models are few\-shot learners\.External Links:2005\.14165,[Link](https://arxiv.org/abs/2005.14165)Cited by:[§1](https://arxiv.org/html/2611.33497#S1.p1.1)\.
- Gaoet al\.\(2024\)Y\. Gao, Y\. Xiong, X\. Gao, K\. Jia, J\. Pan, Y\. Bi, Y\. Dai, J\. Sun, M\. Wang, and H\. WangRetrieval\-Augmented Generation for Large Language Models: A Survey\.External Links:2312\.10997,[Link](https://arxiv.org/abs/2312.10997)Cited by:[§1](https://arxiv.org/html/2611.33497#S1.p2.1),[§2](https://arxiv.org/html/2611.33497#S2.p1.1)\.
- Grattafioriet al\.\(2024\)A\. Grattafiori, A\. Dubey, A\. Jauhri, A\. Pandey, A\. Kadian, A\. Al\-Dahle, A\. Letman, A\. Mathur, A\. Schelten, A\. Vaughan, A\. Yang, A\. Fan, A\. Goyal, A\. Hartshorn, A\. Yang, A\. Mitra, A\. Sravankumar, A\. Korenev, A\. Hinsvark, A\. Rao, A\. Zhang, A\. Rodriguez, A\. Gregerson, A\. Spataru, B\. Roziere, B\. Biron, B\. Tang, B\. Chern, C\. Caucheteux, C\. Nayak, C\. Bi, C\. Marra, C\. McConnell, C\. Keller, C\. Touret, C\. Wu, C\. Wong, C\. C\. Ferrer, C\. Nikolaidis, D\. Allonsius, D\. Song, D\. Pintz, D\. Livshits, D\. Wyatt, D\. Esiobu, D\. Choudhary, D\. Mahajan, D\. Garcia\-Olano, D\. Perino, D\. Hupkes, E\. Lakomkin, E\. AlBadawy, E\. Lobanova, E\. Dinan, E\. M\. Smith, F\. Radenovic, F\. Guzmán, F\. Zhang, G\. Synnaeve, G\. Lee, G\. L\. Anderson, G\. Thattai, G\. Nail, G\. Mialon, G\. Pang, G\. Cucurell, H\. Nguyen, H\. Korevaar, H\. Xu, H\. Touvron, I\. Zarov, I\. A\. Ibarra, I\. Kloumann, I\. Misra, I\. Evtimov, J\. Zhang, J\. Copet, J\. Lee, J\. Geffert, J\. Vranes, J\. Park, J\. Mahadeokar, J\. Shah, J\. van der Linde, J\. Billock, J\. Hong, J\. Lee, J\. Fu, J\. Chi, J\. Huang, J\. Liu, J\. Wang, J\. Yu, J\. Bitton, J\. Spisak, J\. Park, J\. Rocca, J\. Johnstun, J\. Saxe, J\. Jia, K\. V\. Alwala, K\. Prasad, K\. Upasani, K\. Plawiak, K\. Li, K\. Heafield, K\. Stone, K\. El\-Arini, K\. Iyer, K\. Malik, K\. Chiu, K\. Bhalla, K\. Lakhotia, L\. Rantala\-Yeary, L\. van der Maaten, L\. Chen, L\. Tan, L\. Jenkins, L\. Martin, L\. Madaan, L\. Malo, L\. Blecher, L\. Landzaat, L\. de Oliveira, M\. Muzzi, M\. Pasupuleti, M\. Singh, M\. Paluri, M\. Kardas, M\. Tsimpoukelli, M\. Oldham, M\. Rita, M\. Pavlova, M\. Kambadur, M\. Lewis, M\. Si, M\. K\. Singh, M\. Hassan, N\. Goyal, N\. Torabi, N\. Bashlykov, N\. Bogoychev, N\. Chatterji, N\. Zhang, O\. Duchenne, O\. Çelebi, P\. Alrassy, P\. Zhang, P\. Li, P\. Vasic, P\. Weng, P\. Bhargava, P\. Dubal, P\. Krishnan, P\. S\. Koura, P\. Xu, Q\. He, Q\. Dong, R\. Srinivasan, R\. Ganapathy, R\. Calderer, R\. S\. Cabral, R\. Stojnic, R\. Raileanu, R\. Maheswari, R\. Girdhar, R\. Patel, R\. Sauvestre, R\. Polidoro, R\. Sumbaly, R\. Taylor, R\. Silva, R\. Hou, R\. Wang, S\. Hosseini, S\. Chennabasappa, S\. Singh, S\. Bell, S\. S\. Kim, S\. Edunov, S\. Nie, S\. Narang, S\. Raparthy, S\. Shen, S\. Wan, S\. Bhosale, S\. Zhang, S\. Vandenhende, S\. Batra, S\. Whitman, S\. Sootla, S\. Collot, S\. Gururangan, S\. Borodinsky, T\. Herman, T\. Fowler, T\. Sheasha, T\. Georgiou, T\. Scialom, T\. Speckbacher, T\. Mihaylov, T\. Xiao, U\. Karn, V\. Goswami, V\. Gupta, V\. Ramanathan, V\. Kerkez, V\. Gonguet, V\. Do, V\. Vogeti, V\. Albiero, V\. Petrovic, W\. Chu, W\. Xiong, W\. Fu, W\. Meers, X\. Martinet, X\. Wang, X\. Wang, X\. E\. Tan, X\. Xia, X\. Xie, X\. Jia, X\. Wang, Y\. Goldschlag, Y\. Gaur, Y\. Babaei, Y\. Wen, Y\. Song, Y\. Zhang, Y\. Li, Y\. Mao, Z\. D\. Coudert, Z\. Yan, Z\. Chen, Z\. Papakipos, A\. Singh, A\. Srivastava, A\. Jain, A\. Kelsey, A\. Shajnfeld, A\. Gangidi, A\. Victoria, A\. Goldstand, A\. Menon, A\. Sharma, A\. Boesenberg, A\. Baevski, A\. Feinstein, A\. Kallet, A\. Sangani, A\. Teo, A\. Yunus, A\. Lupu, A\. Alvarado, A\. Caples, A\. Gu, A\. Ho, A\. Poulton, A\. Ryan, A\. Ramchandani, A\. Dong, A\. Franco, A\. Goyal, A\. Saraf, A\. Chowdhury, A\. Gabriel, A\. Bharambe, A\. Eisenman, A\. Yazdan, B\. James, B\. Maurer, B\. Leonhardi, B\. Huang, B\. Loyd, B\. D\. Paola, B\. Paranjape, B\. Liu, B\. Wu, B\. Ni, B\. Hancock, B\. Wasti, B\. Spence, B\. Stojkovic, B\. Gamido, B\. Montalvo, C\. Parker, C\. Burton, C\. Mejia, C\. Liu, C\. Wang, C\. Kim, C\. Zhou, C\. Hu, C\. Chu, C\. Cai, C\. Tindal, C\. Feichtenhofer, C\. Gao, D\. Civin, D\. Beaty, D\. Kreymer, D\. Li, D\. Adkins, D\. Xu, D\. Testuggine, D\. David, D\. Parikh, D\. Liskovich, D\. Foss, D\. Wang, D\. Le, D\. Holland, E\. Dowling, E\. Jamil, E\. Montgomery, E\. Presani, E\. Hahn, E\. Wood, E\. Le, E\. Brinkman, E\. Arcaute, E\. Dunbar, E\. Smothers, F\. Sun, F\. Kreuk, F\. Tian, F\. Kokkinos, F\. Ozgenel, F\. Caggioni, F\. Kanayet, F\. Seide, G\. M\. Florez, G\. Schwarz, G\. Badeer, G\. Swee, G\. Halpern, G\. Herman, G\. Sizov, Guangyi, Zhang, G\. Lakshminarayanan, H\. Inan, H\. Shojanazeri, H\. Zou, H\. Wang, H\. Zha, H\. Habeeb, H\. Rudolph, H\. Suk, H\. Aspegren, H\. Goldman, H\. Zhan, I\. Damlaj, I\. Molybog, I\. Tufanov, I\. Leontiadis, I\. Veliche, I\. Gat, J\. Weissman, J\. Geboski, J\. Kohli, J\. Lam, J\. Asher, J\. Gaya, J\. Marcus, J\. Tang, J\. Chan, J\. Zhen, J\. Reizenstein, J\. Teboul, J\. Zhong, J\. Jin, J\. Yang, J\. Cummings, J\. Carvill, J\. Shepard, J\. McPhie, J\. Torres, J\. Ginsburg, J\. Wang, K\. Wu, K\. H\. U, K\. Saxena, K\. Khandelwal, K\. Zand, K\. Matosich, K\. Veeraraghavan, K\. Michelena, K\. Li, K\. Jagadeesh, K\. Huang, K\. Chawla, K\. Huang, L\. Chen, L\. Garg, L\. A, L\. Silva, L\. Bell, L\. Zhang, L\. Guo, L\. Yu, L\. Moshkovich, L\. Wehrstedt, M\. Khabsa, M\. Avalani, M\. Bhatt, M\. Mankus, M\. Hasson, M\. Lennie, M\. Reso, M\. Groshev, M\. Naumov, M\. Lathi, M\. Keneally, M\. Liu, M\. L\. Seltzer, M\. Valko, M\. Restrepo, M\. Patel, M\. Vyatskov, M\. Samvelyan, M\. Clark, M\. Macey, M\. Wang, M\. J\. Hermoso, M\. Metanat, M\. Rastegari, M\. Bansal, N\. Santhanam, N\. Parks, N\. White, N\. Bawa, N\. Singhal, N\. Egebo, N\. Usunier, N\. Mehta, N\. P\. Laptev, N\. Dong, N\. Cheng, O\. Chernoguz, O\. Hart, O\. Salpekar, O\. Kalinli, P\. Kent, P\. Parekh, P\. Saab, P\. Balaji, P\. Rittner, P\. Bontrager, P\. Roux, P\. Dollar, P\. Zvyagina, P\. Ratanchandani, P\. Yuvraj, Q\. Liang, R\. Alao, R\. Rodriguez, R\. Ayub, R\. Murthy, R\. Nayani, R\. Mitra, R\. Parthasarathy, R\. Li, R\. Hogan, R\. Battey, R\. Wang, R\. Howes, R\. Rinott, S\. Mehta, S\. Siby, S\. J\. Bondu, S\. Datta, S\. Chugh, S\. Hunt, S\. Dhillon, S\. Sidorov, S\. Pan, S\. Mahajan, S\. Verma, S\. Yamamoto, S\. Ramaswamy, S\. Lindsay, S\. Lindsay, S\. Feng, S\. Lin, S\. C\. Zha, S\. Patil, S\. Shankar, S\. Zhang, S\. Zhang, S\. Wang, S\. Agarwal, S\. Sajuyigbe, S\. Chintala, S\. Max, S\. Chen, S\. Kehoe, S\. Satterfield, S\. Govindaprasad, S\. Gupta, S\. Deng, S\. Cho, S\. Virk, S\. Subramanian, S\. Choudhury, S\. Goldman, T\. Remez, T\. Glaser, T\. Best, T\. Koehler, T\. Robinson, T\. Li, T\. Zhang, T\. Matthews, T\. Chou, T\. Shaked, V\. Vontimitta, V\. Ajayi, V\. Montanez, V\. Mohan, V\. S\. Kumar, V\. Mangla, V\. Ionescu, V\. Poenaru, V\. T\. Mihailescu, V\. Ivanov, W\. Li, W\. Wang, W\. Jiang, W\. Bouaziz, W\. Constable, X\. Tang, X\. Wu, X\. Wang, X\. Wu, X\. Gao, Y\. Kleinman, Y\. Chen, Y\. Hu, Y\. Jia, Y\. Qi, Y\. Li, Y\. Zhang, Y\. Zhang, Y\. Adi, Y\. Nam, Yu, Wang, Y\. Zhao, Y\. Hao, Y\. Qian, Y\. Li, Y\. He, Z\. Rait, Z\. DeVito, Z\. Rosnbrick, Z\. Wen, Z\. Yang, Z\. Zhao, and Z\. MaThe llama 3 herd of models\.External Links:2407\.21783,[Link](https://arxiv.org/abs/2407.21783)Cited by:[§4\.2](https://arxiv.org/html/2611.33497#S4.SS2.p1.1)\.
- Hendryckset al\.\(2021\)D\. Hendrycks, C\. Burns, A\. Chen, and S\. BallCUAD: an expert\-annotated nlp dataset for legal contract review\.InAdvances in Neural Information Processing Systems,External Links:2103\.06268,[Link](https://arxiv.org/abs/2103.06268)Cited by:[item 1](https://arxiv.org/html/2611.33497#A1.I2.i1.p1.1),[§4\.3](https://arxiv.org/html/2611.33497#S4.SS3.SSS0.Px2.p1.1)\.
- Huet al\.\(2022\)Z\. Hu, H\. P\. Chan, J\. Liu, X\. Xiao, H\. Wu, and L\. HuangPLANET: dynamic content planning in autoregressive transformers for long\-form text generation\.External Links:2203\.09100,[Link](https://arxiv.org/abs/2203.09100)Cited by:[§2](https://arxiv.org/html/2611.33497#S2.p2.1)\.
- Jianget al\.\(2023a\)A\. Q\. Jiang, A\. Sablayrolles, A\. Mensch, C\. Bamford, D\. S\. Chaplot, D\. de las Casas, F\. Bressand, G\. Lengyel, G\. Lample, L\. Saulnier, L\. R\. Lavaud, M\. Lachaux, P\. Stock, T\. L\. Scao, T\. Lavril, T\. Wang, T\. Lacroix, and W\. E\. SayedMistral 7b\.External Links:2310\.06825,[Link](https://arxiv.org/abs/2310.06825)Cited by:[§4\.2](https://arxiv.org/html/2611.33497#S4.SS2.p1.1)\.
- Jianget al\.\(2023b\)Z\. Jiang, F\. F\. Xu, L\. Gao, Z\. Sun, Q\. Liu, J\. Dwivedi\-Yu, Y\. Yang, J\. Callan, and G\. NeubigActive retrieval augmented generation\.External Links:2305\.06983,[Link](https://arxiv.org/abs/2305.06983)Cited by:[§2](https://arxiv.org/html/2611.33497#S2.p2.1)\.
- Lewiset al\.\(2021\)P\. Lewis, E\. Perez, A\. Piktus, F\. Petroni, V\. Karpukhin, N\. Goyal, H\. Küttler, M\. Lewis, W\. Yih, T\. Rocktäschel, S\. Riedel, and D\. KielaRetrieval\-augmented generation for knowledge\-intensive nlp tasks\.External Links:2005\.11401,[Link](https://arxiv.org/abs/2005.11401)Cited by:[§1](https://arxiv.org/html/2611.33497#S1.p2.1),[§2](https://arxiv.org/html/2611.33497#S2.p1.1)\.
- Liet al\.\(2024\)X\. Li, J\. Jin, Y\. Zhou, Y\. Wu, Z\. Li, Q\. Ye, and Z\. DouRetroLLM: empowering large language models to retrieve fine\-grained evidence within generation\.External Links:2412\.11919,[Link](https://arxiv.org/abs/2412.11919)Cited by:[§2](https://arxiv.org/html/2611.33497#S2.p2.1)\.
- Lippiet al\.\(2019\)M\. Lippi, P\. Pałka, G\. Contissa, F\. Lagioia, H\. Micklitz, G\. Sartor, and P\. TorroniCLAUDETTE: an automated detector of potentially unfair clauses in online terms of service\.Artificial Intelligence and Law27\(2\),pp\. 117–139\.External Links:ISSN 1572\-8382,[Link](http://dx.doi.org/10.1007/s10506-019-09243-2),[Document](https://dx.doi.org/10.1007/s10506-019-09243-2)Cited by:[item 3](https://arxiv.org/html/2611.33497#A1.I2.i3.p1.1),[§4\.3](https://arxiv.org/html/2611.33497#S4.SS3.SSS0.Px2.p1.1)\.
- Stolfoet al\.\(2025\)A\. Stolfo, V\. Balachandran, S\. Yousefi, E\. Horvitz, and B\. NushiImproving instruction\-following in language models through activation steering\.External Links:2410\.12877,[Link](https://arxiv.org/abs/2410.12877)Cited by:[§2](https://arxiv.org/html/2611.33497#S2.p2.1)\.
- Tuggeneret al\.\(2020\)D\. Tuggener, P\. von Däniken, T\. Peetz, and M\. CieliebakLEDGAR: A Large\-Scale Multi\-label Corpus for Text Classification of Legal Provisions in Contracts\.InProceedings of the Twelfth Language Resources and Evaluation Conference,N\. Calzolari, F\. Béchet, P\. Blache, K\. Choukri, C\. Cieri, T\. Declerck, S\. Goggi, H\. Isahara, B\. Maegaard, J\. Mariani, H\. Mazo, A\. Moreno, J\. Odijk, and S\. Piperidis \(Eds\.\),Marseille, France,pp\. 1235–1241\(eng\)\.External Links:[Link](https://aclanthology.org/2020.lrec-1.155/),ISBN 979\-10\-95546\-34\-4Cited by:[item 2](https://arxiv.org/html/2611.33497#A1.I2.i2.p1.1),[§4\.3](https://arxiv.org/html/2611.33497#S4.SS3.SSS0.Px2.p1.1)\.
- Yasunagaet al\.\(2022\)M\. Yasunaga, H\. Ren, A\. Bosselut, P\. Liang, and J\. LeskovecQA\-gnn: reasoning with language models and knowledge graphs for question answering\.External Links:2104\.06378,[Link](https://arxiv.org/abs/2104.06378)Cited by:[§1](https://arxiv.org/html/2611.33497#S1.p3.1),[§2](https://arxiv.org/html/2611.33497#S2.p2.1)\.
- Youet al\.\(2023\)W\. You, W\. Wu, Y\. Liang, S\. Mao, C\. Wu, M\. Cao, Y\. Cai, Y\. Guo, Y\. Xia, F\. Wei, and N\. DuanEIPE\-text: evaluation\-guided iterative plan extraction for long\-form narrative text generation\.External Links:2310\.08185,[Link](https://arxiv.org/abs/2310.08185)Cited by:[§2](https://arxiv.org/html/2611.33497#S2.p2.1)\.
- Zhaoet al\.\(2024\)P\. Zhao, H\. Zhang, Q\. Yu, Z\. Wang, Y\. Geng, F\. Fu, L\. Yang, W\. Zhang, J\. Jiang, and B\. CuiRetrieval\-Augmented Generation for AI\-Generated Content: A Survey\.External Links:2402\.19473,[Link](https://arxiv.org/abs/2402.19473)Cited by:[§1](https://arxiv.org/html/2611.33497#S1.p2.1),[§2](https://arxiv.org/html/2611.33497#S2.p1.1)\.
## Appendix AAppendix
### A\.1Constraint\-Aligned RAG Pipeline
Algorithm[1](https://arxiv.org/html/2611.33497#alg1)summarises the fullCA\-RAGretrieval\-conditioning pipeline used in all experiments\. Ontology concepts and KG relations are automatically constructed via template\-driven extraction and semantic matching from domain policy corpora, with minimal manual annotation beyond ontology schema definition\.
Algorithm 1CA\-RAG: Constraint\-Aligned Retrieval\-Augmented Generation1:Scenario
xx; corpus
ℛ\\mathcal\{R\}; ontology
𝒪\\mathcal\{O\}; policy corpus
𝒫\\mathcal\{P\}; retrieval encoder
EretE\_\{\\text\{ret\}\}; ontology encoder
EontoE\_\{\\text\{onto\}\}; LLM
pθp\_\{\\theta\}; variant
ν\\nu; top\-
kk, top\-
mm
2:Generated document
y^\\hat\{y\}
3:
y^←∅\\hat\{y\}\\leftarrow\\emptyset
4:
𝒱onto←\{RAG\+O,CA\-RAG\}\\mathcal\{V\}\_\{\\text\{onto\}\}\\leftarrow\\\{\\textsc\{RAG\+O\},\\textsc\{CA\-RAG\}\\\}
5:
𝒱kg←\{RAG\+KG,CA\-RAG\}\\mathcal\{V\}\_\{\\text\{kg\}\}\\leftarrow\\\{\\textsc\{RAG\+KG\},\\textsc\{CA\-RAG\}\\\}
6:Step 1: Section Planning
7:
H←GenerateSectionsTitles\(pθ,x\)H\\leftarrow\\mathrm\{GenerateSectionsTitles\}\(p\_\{\\theta\},x\)
8:Step 2: Policy Graph Initialisation
9:if
ν∈𝒱kg\\nu\\in\\mathcal\{V\}\_\{\\text\{kg\}\}then
10:
G←BuildPolicyGraph\(𝒫\)G\\leftarrow\\mathrm\{BuildPolicyGraph\}\(\\mathcal\{P\}\)
11:endif
12:for
t=1t=1to
\|H\|\|H\|do
13:
ht←H\[t\]h\_\{t\}\\leftarrow H\[t\]
14:
𝒞t←∅\\mathcal\{C\}\_\{t\}\\leftarrow\\emptyset
15:Step 3: Ontology Constraint Extraction
16:if
ν∈𝒱onto\\nu\\in\\mathcal\{V\}\_\{\\text\{onto\}\}then
17:
𝒞tonto←OntologyMatch\(Eonto,ht,𝒪,m\)\\mathcal\{C\}^\{\\text\{onto\}\}\_\{t\}\\leftarrow\\mathrm\{OntologyMatch\}\(E\_\{\\text\{onto\}\},h\_\{t\},\\mathcal\{O\},m\)
18:
𝒞t←𝒞t∪𝒞tonto\\mathcal\{C\}\_\{t\}\\leftarrow\\mathcal\{C\}\_\{t\}\\cup\\mathcal\{C\}^\{\\text\{onto\}\}\_\{t\}
19:endif
20:Step 4: KG Constraint Retrieval
21:if
ν∈𝒱kg\\nu\\in\\mathcal\{V\}\_\{\\text\{kg\}\}then
22:
𝒞tkg←RetrievePolicyRelations\(G,x,ht,m\)\\mathcal\{C\}^\{\\text\{kg\}\}\_\{t\}\\leftarrow\\mathrm\{RetrievePolicyRelations\}\(G,x,h\_\{t\},m\)
23:
𝒞t←𝒞t∪𝒞tkg\\mathcal\{C\}\_\{t\}\\leftarrow\\mathcal\{C\}\_\{t\}\\cup\\mathcal\{C\}^\{\\text\{kg\}\}\_\{t\}
24:endif
25:Step 5: Constraint\-Aligned Query Construction
26:
qt⋆←ConstructQuery\(x,ht,𝒞t\)q\_\{t\}^\{\\star\}\\leftarrow\\mathrm\{ConstructQuery\}\(x,h\_\{t\},\\mathcal\{C\}\_\{t\}\)
27:Append ontology concepts and KG\-linked obligations\.
28:Step 6: Evidence Retrieval
29:
Rt←DenseRetrieve\(Eret,qt⋆,ℛ,k\)R\_\{t\}\\leftarrow\\mathrm\{DenseRetrieve\}\(E\_\{\\text\{ret\}\},q\_\{t\}^\{\\star\},\\mathcal\{R\},k\)
30:Step 7: Section Generation
31:
yt←GenerateSection\(pθ,x,ht,Rt,𝒞t\)y\_\{t\}\\leftarrow\\mathrm\{GenerateSection\}\(p\_\{\\theta\},x,h\_\{t\},R\_\{t\},\\mathcal\{C\}\_\{t\}\)
32:
y^←y^\|FormatSection\(ht,yt\)\\hat\{y\}\\leftarrow\\hat\{y\}\\\|\\mathrm\{FormatSection\}\(h\_\{t\},y\_\{t\}\)
33:endfor
34:return
y^\\hat\{y\}
### A\.2Extended Query Construction Details
This section provides implementation details for theConstructQuerystage\.CA\-RAGcombines ontology\-derived schema concepts with policy\-grounded KG relations before retrieval, thereby conditioning which evidence becomes retrievable for section\-wise generation\.
#### A\.2\.1Ontology Concept Injection
Ontology concepts are extracted from the constructed ontology using semantic matching over OWL classes and properties\. For each section headinghth\_\{t\}, ontology labels, local names, and optional comments are embedded usingall\-MiniLM\-L6\-v2\. The implementation combines embedding similarity with lexical similarity:
Score\(ht,oi\)=0\.75semb\(ht,oi\)\+0\.25slex\(ht,oi\),\\mathrm\{Score\}\(h\_\{t\},o\_\{i\}\)=0\.75\\,s\_\{\\mathrm\{emb\}\}\(h\_\{t\},o\_\{i\}\)\+0\.25\\,s\_\{\\mathrm\{lex\}\}\(h\_\{t\},o\_\{i\}\),\(17\)wheresembs\_\{\\mathrm\{emb\}\}is cosine similarity andslexs\_\{\\mathrm\{lex\}\}is Levenshtein similarity\. The top\-mmontology concepts are retained and appended as schema\-level retrieval terms\.
For example, the ontology contains concepts such asData Recipient,Data Transfer Event,Data Flow,Audit Trail,Risk Assessment, andData Minimisation Rule, which provide structural cues for section\-specific retrieval\.
#### A\.2\.2KG Relation Expansion
Policy\-grounded KG expansion retrieves relevant RDF triples from the domain KG\. Each tripleτi=\(si,pi,oi\)\\tau\_\{i\}=\(s\_\{i\},p\_\{i\},o\_\{i\}\)is scored against the section heading by comparing the heading embedding with the subject, predicate, and object embeddings:
Score\(ht,τi\)=max\(s\(ht,si\),s\(ht,pi\),s\(ht,oi\)\)\.\\mathrm\{Score\}\(h\_\{t\},\\tau\_\{i\}\)=\\max\\big\(s\(h\_\{t\},s\_\{i\}\),s\(h\_\{t\},p\_\{i\}\),s\(h\_\{t\},o\_\{i\}\)\\big\)\.\(18\)
Triples above a similarity threshold are retained; if no triple satisfies the threshold, the highest\-ranked triples are returned to avoid empty constraint contexts\. This allows the retriever to recover policy obligations that may not be surfaced by semantic similarity alone\.
#### A\.2\.3Constraint\-aligned Query Construction
The final retrieval query is constructed by concatenating the scenario, section heading, ontology concepts, and KG\-linked obligations:
qt⋆=\[x;ht;𝒞tonto;𝒞tkg\]\.q\_\{t\}^\{\\star\}=\[x;\\,h\_\{t\};\\,\\mathcal\{C\}^\{\\mathrm\{onto\}\}\_\{t\};\\,\\mathcal\{C\}^\{\\mathrm\{kg\}\}\_\{t\}\]\.\(19\)
Duplicate or low\-similarity constraints are filtered before dense retrieval\. In practice, this yields a constraint\-aligned query of the original section query with structural and policy\-specific terms\.
#### A\.2\.4Worked Example
Consider a finance DSA section onThird\-Party Transferor recipient obligations\.
##### Standard RAG query
> “Generate a third\-party transfer policy for financial data sharing\.”
This may retrieve general passages about data sharing or external access\.
##### CA\-RAG expansion
Ontology matching may add:
> Data Recipient,Data Transfer Event,Data Flow,Audit Trail
KG retrieval may add obligations such as:
> - •\(Recipient Agency,prohibits,Onward Sharing Without Legal Basis\) - •\(Recipient Agency,requires,Incident Response Procedures\) - •\(Recipient Agency,requires,Retention Period Definition\) - •\(Recipient Agency,supports,Data Subject Rights\)
The resulting pseudo\-query becomes:
> Third\-party transfer policy for financial data sharing \+ Data Recipient \+ Data Transfer Event \+ Audit Trail \+ onward sharing restrictions \+ incident response procedures \+ retention periods \+ data subject rights\.
This shifts retrieval from generic data\-sharing evidence to policy passages that contain transfer restrictions, recipient obligations, incident response duties, and retention requirements\.
#### A\.2\.5Retrieval Trace Example
Table[4](https://arxiv.org/html/2611.33497#A1.T4)illustrates a representative retrieval trace for finance\-domain transfer obligations\. StandardRAGretrieves semantically related passages describing generic data sharing and recipient access policies, but frequently omits structurally dependent obligations required for downstream compliance generation\.
In contrast,CA\-RAGexpands retrieval by incorporating ontology\-derived schema concepts and KG\-linked policy relations before evidence selection\. This shifts retrieval toward passages containing transfer restrictions, incident response duties, retention requirements, and data\-subject\-rights obligations\. The resulting evidence is therefore more structurally aligned with downstream clause requirements, reducing omission failures during section generation\.
Table 4:Representative retrieval trace for finance\-domain recipient transfer obligations\.
### A\.3Additional Worked Retrieval Examples
This section provides qualitative examples illustrating how retrieval\-stage structural conditioning affects omission\-sensitive clause recovery across finance, healthcare, and education DSAs\.
Across domains, standardRAGfrequently retrieves semantically related but structurally incomplete evidence, leading to repeated omission of globally dependent obligations such as cross\-border transfer safeguards, DPIA/TIA requirements, incident response procedures, and legal basis clauses\. In contrast,CA\-RAGsubstantially reduces omission frequency by retrieving evidence aligned with downstream structural dependencies\.
Table 5:Representative omission patterns across domains\.The examples in Table[5](https://arxiv.org/html/2611.33497#A1.T5)illustrate that the primary advantage ofCA\-RAGis not simply retrieving more passages, but retrieving evidence structurally aligned with downstream compliance requirements\. Standard relevance\-based retrieval repeatedly omits globally dependent obligations such as DPIA/TIA requirements, incident\-response duties, legal basis clauses, and cross\-border transfer safeguards\. Retrieval\-stage structural conditioning substantially improves recovery of these omission\-sensitive clauses before generation begins\.
### A\.4RLHF Refinement Implementation
We implement an optional RLHF refinement module applied after section\-wise generation\. Domain experts provide scalar quality ratings in\[0,1\]\[0,1\]for generated sections, which are used to train a lightweight reward model and perform PPO\-style policy refinement while keeping retrieval and constraint injection fixed\.
Reward model\.Given prompt–section pairs\(pt,y^t\)\(p\_\{t\},\\hat\{y\}\_\{t\}\)and human ratingsrtr\_\{t\}, the reward model predicts a scalar quality scorer^t\\hat\{r\}\_\{t\}and is trained using mean squared error:
ℒRM=1N∑t=1N\(r^t−rt\)2\.\\mathcal\{L\}\_\{\\textsc\{RM\}\}=\\frac\{1\}\{N\}\\sum\_\{t=1\}^\{N\}\(\\hat\{r\}\_\{t\}\-r\_\{t\}\)^\{2\}\.\(20\)
Policy refinement\.We generate multiple candidate rewrites per section using stochastic decoding and score them using the reward model\. PPO\-style optimisation is then applied using a clipped objective with KL regularisation:
ℒPPO=\\displaystyle\\mathcal\{L\}\_\{\\textsc\{PPO\}\}=−min\(ρA,clip\(ρ,1−ϵ,1\+ϵ\)A\)\\displaystyle\-\\min\\Big\(\\rho A,\\;\\mathrm\{clip\}\(\\rho,1\-\\epsilon,1\+\\epsilon\)A\\Big\)\(21\)\+βKL\(πθ∥πref\)\.\\displaystyle\+\\beta\\,\\mathrm\{KL\}\\big\(\\pi\_\{\\theta\}\\\|\\pi\_\{\\text\{ref\}\}\\big\)\.whereρ\\rhodenotes the policy ratio,AAthe reward\-based advantage signal,ϵ\\epsilonthe clipping threshold, andβ\\betathe KL coefficient\.
This refinement stage is intended as a lightweight stylistic improvement module rather than a replacement for retrieval\-conditioned evidence selection\.
### A\.5Evaluation: Auditors, Metrics, and Implementation
All documents are evaluated on extracted text\. PDFs are segmented into overlapping chunks \(1000 tokens, overlap 100\) for retrieval and downstream evaluation\.
#### A\.5\.1Reference\-Based Similarity Metrics
We compute document\-level similarity between generated DSAsy^\\hat\{y\}and reference agreementsyTy^\{T\}using cosine similarity over sentence embeddings and ROUGE\-LSUM\. Cosine similarity measures semantic alignment, while ROUGE\-LSUM captures lexical overlap\.
#### A\.5\.2Compliance Auditing Signals
We compute five compliance\-oriented signals, each normalised to\[0,1\]\[0,1\]:
1. 1\.CUAD\-based clause compliance[Hendrycks et al\. \(2021\)](https://arxiv.org/html/2611.33497#bib.bib9),
2. 2\.LEDGAR[Tuggener et al\. \(2020\)](https://arxiv.org/html/2611.33497#bib.bib11)provision coverage,
3. 3\.LexGLUE UNFAIR\_TOS[Lippi et al\. \(2019\)](https://arxiv.org/html/2611.33497#bib.bib14)fairness/balance signals,
4. 4\.Domain alignment against in\-domain policy PDFs, and
5. 5\.DSA clause coverage via a checklist\-driven auditor\.
All datasets and benchmark resources used in this work \(e\.g\., CUAD, LEDGAR, LexGLUE\) are publicly available research datasets used in accordance with their intended academic and research usage conditions\.
##### DSA Clause Auditor
We measure clause completeness using a checklist\-based DSA clause auditor\. Given a document split into text chunks𝒳=\{xi\}i=1n\\mathcal\{X\}=\\\{x\_\{i\}\\\}\_\{i=1\}^\{n\}, we define a fixed set of clause questions𝒬=\{\(lj,qj\)\}j=1m\\mathcal\{Q\}=\\\{\(l\_\{j\},q\_\{j\}\)\\\}\_\{j=1\}^\{m\}, whereljl\_\{j\}is a clause label andqjq\_\{j\}is a natural\-language question\.
For each questionqjq\_\{j\}, we retrieve the top\-kkrelevant chunks using TF–IDF retrieval, concatenate them into a context window, and query an LLM\-based judge that returns a structured decision containing anansweredboolean and supporting evidence spans\. This TF–IDF step is used only for selecting chunks within the evaluation auditor and is independent of the dense retriever evaluated inCA\-RAG\.
Clause coverage is computed as:
ClauseCov\(y^\)=1m∑j=1m𝕀\[answered\(qj,y^\)=1\]\.\\mathrm\{ClauseCov\}\(\\hat\{y\}\)=\\frac\{1\}\{m\}\\sum\_\{j=1\}^\{m\}\\mathbb\{I\}\\big\[\\texttt\{answered\}\(q\_\{j\},\\hat\{y\}\)=1\\big\]\.\(22\)
The auditor additionally stores per\-question evidence and rationale for downstream error analysis\.
#### A\.5\.3Aggregate Scores
We report similarity, compliance, reliability, and efficiency metrics as macro\-averaged across all domains\.
#### A\.5\.4Efficiency Measurement
We report average token usage, end\-to\-end latency, and empirical throughput \(effective TFLOPs/s\)\. Latency is measured per section\-generation call and includes prompt construction, constraint extraction, retrieval, and decoding:
Tlatency=1N∑n=1N∑s=1S\(CLOSE\\displaystyle T\_\{\\text\{latency\}\}=\\frac\{1\}\{N\}\\sum\_\{n=1\}^\{N\}\\sum\_\{s=1\}^\{S\}\\Big\(Tprompt\(n,s\)\+Tconstraint\(n,s\)\\displaystyle T\_\{\\text\{prompt\}\}^\{\(n,s\)\}\+T\_\{\\text\{constraint\}\}^\{\(n,s\)\}\(23\)OPEN\+Tretrieval\(n,s\)\+Tdecode\(n,s\)\)\\displaystyle\+T\_\{\\text\{retrieval\}\}^\{\(n,s\)\}\+T\_\{\\text\{decode\}\}^\{\(n,s\)\}\\Big\)
Effective TFLOPs/s is reported as an empirical proxy for throughput under a fixed hardware configuration\.
### A\.6Sensitivity to Reliability Weighting
Table[6](https://arxiv.org/html/2611.33497#A1.T6)analyses sensitivity to the weighting parameterλ\\lambda\. Reliability increases with largerλ\\lambdavalues in finance and education, indicating stronger dependence on compliance\-oriented metrics\. Healthcare remains comparatively stable across weighting values\. We useλ=0\.7\\lambda=0\.7to prioritise structural completeness while retaining sensitivity to semantic similarity\. Importantly, method rankings remain stable across the tested range, indicating that the gains ofCA\-RAGare not dependent on a specific weighting choice\.
Table 6:Sensitivity analysis of the reliability score with different values ofλ\\lambda\. Results are averaged across all evaluation samples for each domain\.
### A\.7Ablation: Retrieval Budget Sensitivity
The effect of retrieval budget differs across methods\. For standardRAG, increasingkkfrom 3 to 6 slightly improves compliance \(0\.6547→0\.66150\.6547\\rightarrow 0\.6615\), while reliability remains approximately stable \(0\.6282→0\.62590\.6282\\rightarrow 0\.6259\)\. Atk=9k=9, both compliance and reliability decrease substantially\. This indicates that increasing retrieval depth alone does not guarantee better downstream performance; additional retrieved evidence may remain weakly aligned with the structural requirements of the generated document\.
In contrast,CA\-RAGmaintains comparatively stable performance across retrieval budgets while consistently achieving higher compliance and reliability than standardRAG\. The strongest performance occurs atk=6k=6, whereCA\-RAGachieves a reliability score of0\.64040\.6404\. Even atk=9k=9,CA\-RAGpreserves higher compliance and reliability than standardRAG\. These findings suggest that the benefits ofCA\-RAGarise from structurally conditioned evidence selection rather than increased retrieval quantity alone\. In omission\-sensitive domains such as finance, retrieving additional evidence is insufficient when the retrieved context remains structurally incomplete or weakly aligned with downstream clause requirements\.
Table 7:Top\-k retrieval sensitivity analysis on the finance domain\.#### A\.7\.1Reproducibility
All variants share the same retriever, base LLM, prompt scaffold, chunking strategy, decoding configuration, and evaluation pipeline\. Retrieval uses identical corpora, embedding models, and top\-kksettings across methods\. Variants differ only in the source and type of structured constraints injected before retrieval and generation\.
To minimise implementation variance, all experiments use deterministic prompting, fixed generation parameters, and identical clause\-auditing protocols across domains and runs\. Ontology matching and KG construction are largely automated from policy corpora and domain resources, reducing manual engineering requirements\.
### A\.8Full Experimental Results
This appendix presents full per\-domain results for all evaluated models and generation variants, complementing the aggregated results reported in Section[5](https://arxiv.org/html/2611.33497#S5)\. We also define all abbreviated metric names that appear in the tables \(e\.g\., Clause Cov\. for DSA coverage score, Lat\. for latency, TFLOPs/s for effective throughput, Sim\. for similarity, Comp\. for compliance score\), covering the efficiency, compliance, and similarity dimensions\. Unless otherwise stated, all results are reported without RLHF refinement\.
Table 8:Detailed evaluation results on theHealthdomain \(without RLHF\)\.Table 9:Detailed evaluation results on theFinancedomain \(without RLHF\)\.Table 10:Detailed evaluation results on theEducationdomain \(without RLHF\)\.
### A\.9Efficiency and Scalability
Table[11](https://arxiv.org/html/2611.33497#A1.T11)reports latency and empirical throughput across retrieval variants\. Throughput is reported as empirical GPU TFLOPs/s measured during inference under fixed hardware settings\. CA\-RAG introduces moderate overhead from constraint extraction and query construction, but remains substantially more efficient than adaptive retrieval baselines such asSelf\-RAGandFlare\-RAG, which require iterative retrieval and refinement\.Self\-RAGandFlare\-RAGgenerally incur higher latency than standard RAG andCA\-RAG, although the magnitude varies across model–domain settings\. In contrast,CA\-RAGachieves improved omission robustness with comparatively bounded runtime overhead relative to standardRAG\. These results suggest that retrieval\-stage structural conditioning improves structural completeness without requiring expensive iterative retrieval loops, making CA\-RAG practical for long\-form constrained generation settings\.
Table 11:Latency and empirical throughput \(TF/s\) across domains and retrieval variants\. Latency \(Lat\.\) is reported in seconds\.
### A\.10Bootstrap Significance Testing
We performed paired bootstrap significance testing to evaluate whether improvements in document\-level reliability were statistically significant across retrieval variants\. Testing was conducted across domains, runs, and model variants using paired document\-level reliability scores\. Each bootstrap sample preserved document\-level pairing between compared methods to isolate relative reliability differences under identical evaluation instances\. For each comparison, we computed the mean paired difference and estimated95%95\\%confidence intervals using 5,000 bootstrap resamples\.
Confidence intervals excluding zero were treated as statistically significant\. Table[12](https://arxiv.org/html/2611.33497#A1.T12)shows thatCA\-RAGsignificantly outperformed standardRAG,Self\-RAG, andFlare\-RAG\. In contrast, differences relative to the generation\-only constraint baseline were not statistically significant, suggesting that generation\-time structural prompting can partially improve aggregate reliability\. However, the main paper shows that retrieval\-stage structural conditioning more consistently improves omission robustness and clause\-level completeness\.
Table 12:Paired bootstrap significance testing using document\-level reliability scores across domains, runs, and model variants\. Confidence intervals excluding zero indicate statistically significant differences\.
### A\.11Ablation: Impact of RLHF Refinement
We analyse RLHF as a post\-generation refinement stage while keeping retrieval and evidence support fixed\. Table[13](https://arxiv.org/html/2611.33497#A1.T13)reports reliability scores after RLHF refinement onLlama\-3\.1\-8B\. The effect of RLHF varies across domains and retrieval settings\. In some cases, refinement improves stylistic coherence and local fluency, while in others it slightly reduces reliability, particularly in finance, where compliance\-sensitive phrasing is more fragile\.
Importantly, RLHF does not alter the relative behaviour of retrieval variants, nor does it consistently recover omitted obligations when supporting evidence is incomplete\. Even when readability improves, omission\-sensitive clauses such as transfer safeguards, legal\-basis requirements, or compliance dependencies remain constrained by the quality and structural completeness of retrieved evidence\. These results suggest that RLHF primarily acts as a lightweight stylistic refinement mechanism rather than a substitute for retrieval\-stage structural alignment\.
Table 13:RLHF ablation onLlama\-3\.1\-8B\. Values denote reliability scores after RLHF refinement, with relative changeΔ\\Deltain %\.
### A\.12Additional Structural and Compliance Trade\-off Plots
Figures[4](https://arxiv.org/html/2611.33497#A1.F4)and[5](https://arxiv.org/html/2611.33497#A1.F5)provide additional radar plots forMistral\-7BandLlama\-3\.2\-3B\. These plots complement the main paper analysis by showing how retrieval variants trade off clause compliance, provision coverage, fairness and balance, domain alignment, DSA clause coverage, and overall compliance across domains\.
Figure 4:Structural and compliance tradeoffs across variants forMistral\-7B\. Scores are normalised within each domain across six auditing metrics\.Figure 5:Structural and compliance tradeoffs across retrieval variants forLlama\-3\.2\-3B\. Scores are normalised within each domain across six auditing metrics\.
### A\.13Qualitative Error Analysis
We analyse omission failures across retrieval variants to examine retrieval\-stage structural alignment\. Table[14](https://arxiv.org/html/2611.33497#A1.T14)summarises representative omission patterns across finance, healthcare, and education DSAs\. The High/Medium/Low labels provide descriptive summaries of omission patterns observed during qualitative inspection and should not be interpreted as quantitative frequency estimates\. Transfer clauses include cross\-border transfer obligations and data\-sharing conditions; policy clauses include legal basis and compliance requirements; procedural clauses include incident response, audit, and review obligations\. Common failures involve structurally dependent clauses such asCross\-Border Transfers,Legal Basis,DPIA/TIA222Transfer Impact Assessment\.,Incident Response, andAudit Requirements\. These obligations often depend on evidence distributed across multiple policy sections, making them difficult to recover through relevance\-only retrieval\. StandardRAGfrequently produces semantically plausible but structurally incomplete outputs\. For example, inThird\-Party Transfersection, standard RAG often retrieves general data\-sharing policies while omitting safeguards such as SCC333Standard Contractual Clause\.or DPIA obligations\. In contrast,CA\-RAGretrieves evidence linked to transfer mechanisms and compliance dependencies, improving downstream clause recovery\.
Adaptive retrieval methods such asSelf\-RAGandFlare\-RAGimprove local coherence but still omit globally dependent obligations\. Similarly, generation\-only constraint injection improves structural phrasing but cannot reliably recover clauses unsupported by retrieved evidence\. Overall,CA\-RAGreduces omission frequency through retrieval\-stage structural conditioning\. Such omissions are particularly critical in compliance\-sensitive settings, where missing obligations may matter more than small reductions in semantic similarity\. Additional retrieval examples and omission traces are provided in Appendix[A\.3](https://arxiv.org/html/2611.33497#A1.SS3)\.
Table 14:Representative omission patterns across retrieval variants\.相似文章
GRACE-RAG:规范证据合成的受控检索架构,支持在封闭领域机构环境中轻量化部署
本文介绍了 GRACE-RAG,这是一种检索受控、图增强的 RAG 架构,它将结构推理从生成过程外化到结构化的检索层,从而能够在封闭领域的机构环境中实现轻量化部署。实验表明,在中规模模型上质量提升高达 20%,同时减少了计算和延迟开销。
面向LongEval-RAG的候选约束检索增强生成:系统设计与实证分析
本文介绍了为CLEF 2026 LongEval-RAG任务设计的候选约束检索增强生成(RAG)系统,该系统结合了确定性溯源追踪与段落检索、查询扩展、伪相关反馈、互惠排名融合、证据重排序以及引文感知聚合。对十种流水线变体的消融研究表明,采用基于规则的分块流水线并辅以句子级神经选择的方案取得了最佳性能。
HC-RAG:面向异构财务申报文件的以证据为中心的检索增强生成
本文介绍了HC-RAG,一个面向10-K文件的以证据为中心的金融问答的分层跨模态检索增强生成框架,以及一个新的基准Multi-Doc-2025。它在金融问答基准上优于RAPTOR和GraphRAG,尤其是在长文档和表格相关查询方面。
ConflictRAG:检测并解决检索增强生成中的知识冲突
ConflictRAG是一种冲突感知的RAG框架,能够在检索文档中检测、分类并解决知识冲突,在基线方法上实现了88.7%的检测F1值和5.3–6.1%的正确率提升,同时将API成本降低了62%。
Structure-Aware RAG: 用于对话代理的噪声数据结构化检索增强生成
提出Structure-Aware RAG (SA-RAG),它使用表格作为中间结构化表示来减少对话代理检索增强生成中的噪声,结合了质量感知的元数据生成和两种表格生成方法,在噪声真实世界数据集上优于现有基线。