ローカルLLMを用いた日本語Lintの試み
-プロンプト工学に依存しない自然言語Lintの実装-
DOI:
https://doi.org/10.51094/jxiv.2247キーワード:
自然言語仕様、 曖昧性検出、 JapaneseLint、 LoRA、 合成データSFT、 仕様レビュー支援抄録
本研究では,要求仕様レビュー支援を目的とした試作システム JapaneseLint を提案する。提案手法は、大規模言語モデルに対して推論様式を事前に学習させることにより、プロンプト設計への依存を低減し、曖昧性の指摘と修正案生成を安定して行うことを目指すものである。限定的な評価を通じて、本手法が実務利用に向けた可能性を有することを示す。JapaneseLint は、汎用大規模言語モデル(GPT-5.1)を教師として生成した合成データに基づく教師あり微調整(SFT)を LoRA により実施し、仕様レビュー向けの出力様式(指摘・分類・半形式的書換え)を安定化する構成を採用している。これにより、運用時の追加プロンプト(長い指示文や例示)への依存を低減し、入力コンテキスト消費を抑えた構造化出力を得る。
評価実験では、GPT-5.1 により生成した評価用日本語仕様文 20 件を入力とし、推論時間と生成出力の品質を評価した。実験環境は GPU(RTX 4090)単体構成とし、fp16 形式の評価モデルを用いた。その結果、平均推論時間は 1.803 秒、最大 2.618 秒であった。対話的利用における応答時間の目安に関する先行知見を踏まえつつ、本条件下では対話型支援として許容され得る応答時間分布が得られたと解釈できる。出力品質については、少数例の観察に基づき、可読性・中立性・定量化の試みが一定程度確認された一方、外的妥当性やドメインシフトに関する検証は今後の課題である。
以上より、JapaneseLint は、日本語自然言語仕様に対する曖昧性の顕在化と定量化支援を、限定条件下で比較的低コストに実行し得る可能性を示した。
利益相反に関する開示
この文章に関する利益相反はありません。ダウンロード *前日までの集計結果を表示します
引用文献
(1) Daniel M. Berry; Erik Kamsties; Michael M. Krieger, From Contract Drafting to Software Specification: Linguistic Sources of Ambiguity, University of Waterloo Technical Report (2003)
(2) Alessandro Fantechi; Stefania Gnesi; Laura Semini, Rule-based NLP vs ChatGPT in Ambiguity Detection, a Preliminary Study, CEUR Workshop Proceedings (REFSQ 2023 NLP4RE), Vol.3378 (2023)
(3) Muhamad H. F. Muhamad; Nur Nasuha Mohd Noor; Nooraini Yusoff; Suriayati Chuprat S., Fault-Prone Software Requirements Specification Detection Using Ensemble Learning for Edge/Cloud Applications, Applied Sciences (MDPI), Vol.13, No.13 (2023)
(4) Stefania Gnesi; Gabriele Trentanni, QuARS: A NLP Tool for Requirements Analysis, CEUR Workshop Proceedings, NLP4RE 2019, Vol. 2376, pp. 55–64, Essen, Germany, (2019)
(5) Sarmad Bashir; Alessio Ferrari; Muhammad Abbas Khan; Per Erik Strandberg; Zulqarnain Haider; Mehrdad Saadatmand; Markus Bohlin, Requirements Ambiguity Detection and Explanation with LLMs: An Industrial Study, 41st International Conference on Software Maintenance and Evolution (ICSME), pp. 620–631 (2025)
(6) Cosler, M., Hahn, C., Mendoza, D., Schmitt, F., Trippel, C., NL2Spec: Interactively Translating Unstructured Natural Language to Temporal Logics with Large Language Models., arXiv:2303.04864, 2023.
(7) Lubos Běhounek; Martin Hnětynka; Tomáš Vasilek; Pavel Král, Leveraging Large Language Models for the Quality Assurance of Software Requirements, IEEE International Requirements Engineering Conference (RE) (2024)
(8) Porter, DeFranco, Laplante, Requirements Specification Automated Quality Analysis, IEEE Computer, Vol.58, No.2, pp. 45-53 (2025)
(9) Malte Noller; Markus Borg; Gordon Fraser; Andreas Zeller, SpecFix: Repairing Natural Language Software Specifications, Proceedings of the ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) (2024)
(10) Hyeong Jin Kim; Seungwon Park; Yejin Choi, Aligning Language Models to Explicitly Handle Ambiguity, arXiv:2404.11972 (2024)
(11) Alessandro Cimatti; Edmund M. Clarke; Enrico Giunchiglia; Marco Roveri, Industrial Adoption of Formal Methods: Barriers and Challenges, Formal Methods for Industrial Critical Systems (FMICS), Vol. 8187, pp.1-15 (2013)
(12) Ferrari & Spoletini, Formal Requirements Engineering and Large Language Models, Information and Software Technology (Elsevier), Vol.181, Article 107697 (2025)
(13) Fiona Fui-Hoon Nah, A Study on Tolerable Waiting Time: How Long Are Web Users Willing to Wait?, Behaviour & Information Technology, Vol. 23, No. 3, pp. 153–163 (2004)
ダウンロード
公開済
投稿日時: 2025-12-12 05:05:56 UTC
公開日時: 2025-12-18 02:33:51 UTC — 2026-01-14 04:14:10 UTCに更新
バージョン
- 2026-01-14 04:14:10 UTC(2)
- 2025-12-18 02:33:51 UTC(1)
改版理由
本改版では、提案手法 JapaneseLint の理論的定義および評価指標の記述について、数理的な明確性と再現性を高めるための修正を行った。具体的には、意味再構成写像および意味候補集合の定義に関する記号表記を整理し、写像の定義域・値域および評価対象の条件を明確化した。また、意味曖昧性縮小率(Semantic Ambiguity Reduction Ratio; SARR)の定義について、適用条件および定義域を明示することで、指標が常に[0,1] の範囲に収まることを数式的に保証した。 これらの修正は、提案手法の本質的な内容や実験結果を変更するものではなく、理論的解釈の一貫性および読者による理解容易性を向上させることを目的としたものである。ライセンス
Copyright(c)2025
神谷, 達夫
この作品は、Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Licenseの下でライセンスされています。
