@techreport{oai:ipsj.ixsq.nii.ac.jp:02007390, author = {爲國,紘成 and 砂原,悟 and 中田,亮太郎 and 萩原,茂樹 and Kosei Tamekuni and Satoru Sunahara and Ryotaro Nakata and Shigeki Hagihara}, issue = {13}, month = {Feb}, note = {SELinuxは強力なアクセス制御機能を提供するが、ポリシー記述の複雑さが導入の障壁となっている。近年、大規模言語モデル(LLM)の応用が模索されているものの、SELinuxのような厳密な構文規則を要するドメインでは、事実に基づかない生成や構文エラーが課題となる。そこで本研究では、LLMを用いたSELinuxポリシー生成において、検索拡張生成(RAG)によるドメイン知識の補完と、入力ユースケースの構造化(Text,List,JSON,TOON形式)による生成精度の向上を検討した。Llama 3.3 70BおよびQwen 2.5 72Bを用いた評価実験の結果、RAGの導入によりルール網羅率が向上する場合が確認された一方で、不要なルールを含む過剰生成も見られた。本稿では、プロンプト構造と外部知識が生成品質に与える影響について考察する。, SELinux provides robust access control capabilities, but the complexity of policy specification constitutes a significant barrier to adoption. Although recent research has explored the application of Large Language Models (LLMs), domains requiring strict syntactic rules such as SELinux are challenged by hallucinations and syntax errors. This study investigates methods to improve generation accuracy in LLM-based SELinux policy generation through domain knowledge augmentation via Retrieval-Augmented Generation (RAG) and structured input use case representations (Text, List, JSON, and TOON formats). Experimental evaluation using Llama 3.3 70B and Qwen 2.5 72B demonstrated that RAG introduction improved rule coverage, while also revealing over-generation containing unnecessary rules. This paper examines the impact of prompt structure and external knowledge on generation quality.}, title = {LLMを用いたSELinuxポリシー生成における知識検索とプロンプト構造の検討}, year = {2026} }