跳到正文
arXiv cs.AI· Jack Wei Lun Shi, Minghao Dang, Wawan Solihin, Justin K. W. Yeoh·· 14 小时前AI 评分21

P4IR:用强化学习提升基于 LLM 的建筑规范自动合规系统

Reinforcement learning to improve large language model-based automated code compliance systems

AI 导读

P4IR 是一个两阶段框架,先用监督微调(SFT)向 LLM 注入领域知识,再用 GRPO 提升生成高层代码骨架这类中间表示的准确性。相对 SFT 基线,树编辑距离和 token 级 Levenshtein 距离最终分别最多降低 21.3% 和 41.0%。零样本设置下其代码结构与语义均优于通过 few-shot 提示评测的领先 LLM,GRPO 阶段还显著减少了误报。

正文 · 原文

View PDF HTML (experimental)

Abstract:Large language model (LLM)-based approaches for automated code compliance (ACC) of building regulations are prone to generating incorrect and hallucinated computer-processable rules. This paper introduces P4IR, a two-stage framework that uses supervised fine-tuning (SFT) to instill domain knowledge in an LLM, followed by Group Relative Policy Optimization (GRPO) to improve the accuracy of the generated intermediate representations in the form of high-level code skeletons. The framework achieved final reductions of up to 21.3% and 41.0% in tree edit distance and token-level Levenshtein distance respectively, relative to the SFT baselines. Comparative analysis demonstrates that this approach in a zero-shot setting outperforms leading LLMs in both code structure and semantics, evaluated via few-shot prompting. Additionally, the GRPO stage produced a statistically significant reduction in false positives. By combining SFT with GRPO to optimize directly for domain-specific objectives, this approach offers a path toward more accurate and reliable LLM-based ACC systems.
Comments: 22 pages, 12 figures, 1 table
Subjects: Software Engineering (cs.SE); Artificial Intelligence (cs.AI); Computation and Language (cs.CL); Machine Learning (cs.LG)
ACM classes: I.2.6; I.2.7; J.6
Cite as: arXiv:2606.22402 [cs.SE]
  (or arXiv:2606.22402v2 [cs.SE] for this version)
  https://doi.org/10.48550/arXiv.2606.22402

arXiv-issued DOI via DataCite

Submission history

From: Jack Wei Lun Shi [view email]
[v1] Sun, 21 Jun 2026 09:17:02 UTC (774 KB)
[v2] Thu, 29 Oct 2026 14:37:41 UTC (1,953 KB)

来源:arXiv cs.AI · arxiv.org