Skip to content
Conference

KG-Augmented LLM for Efficient and Correct Dockerfile Generation

Jul 2026 · Fall Joint Computer Conference · pp. 33-40 · 0 citations · 33 references

Abstract

Container images are fundamental to cloud deployment, with their build instructions (e.g., Dockerfiles) critically impacting the efficiency and stability of cloud service. Manually authoring these instructions is error-prone, while Large Language Models (LLMs) lack the domain knowledge to generate both correct and optimized Dockerfiles reliably. This problem may cause runtime failures, prolonged deployment times and increased storage overhead. This paper introduces a novel knowledgeenhanced approach to automate Dockerfile generation. First, we construct a Dockerfile Instructions Knowledge Graph (DIKG) by analyzing a large corpus, capturing complex dependencies among images, packages, and commands. Leveraging DIKG, we design DKRAG, a retrieval-augmented generation system that guides an LLM to interpret user requirements and produce semantically accurate instructions. The output is further optimized via log-based repair and static dependency-aware refactoring for correctness, layer sharing, and minimal image size. Comprehensive experiments show our approach significantly improves the generation accuracy while also reducing build time and storage overhead compared to state-of-the-art methods.

View source

Similar papers

Book Jul 2026

Improving Usability and Productivity of PETSc with Agent-Based Workflows

This work position PETSc as a domain-aware component in multi-step AI workflows that span question answering, code development, execution, and verification, and describes the infrastructure and prototype services that support these capabilities and outline their potential to enable more effective, reliable, and scalable AI-assisted workflows in scientific computing.

Barry Smith, Hong Zhang, Junchao Zhang et al. · 1 citation
Book Open access Apr 2026

ML in a Box: Analyzing Containerization Practices in Open Source ML Projects

Containerization has become increasingly essential in the machine learning (ML) domain, providing reproducibility, portability, and environment consistency. While prior studies have analyzed Dockerfile structures and best practices, none have examined ML projects in depth to reveal how the iterative nature of ML workflows influences container footprint, build performance, and caching behavior. We present the first large scale empirical study of 1,993 ML related Dockerfiles, combining quantitative analysis of container roles in ML projects and build dynamics with a qualitative investigation of refactoring practices. Results show that containers serve distinct roles across training, inference, and infrastructure. Containers are typically large, averaging 10.27 GB in size, and require long build times of about 8.84 minutes. We find that 44.4% of commits trigger rebuilds, primarily due to context file changes (96.4%), with experimentation being the main motive behind those commits that initiate rebuilds. Despite partial cache reuse, 71% of rebuild work is wasted on redundant computation. From stable projects, we identify 7 recurring ML-specific Dockerfile refactoring patterns that improve build efficiency and reduce container footprint.

Faten Jebari, Emna Ksontini, Amine Barrak et al. · 0 citations
Book Open access Jul 2026

Accelerating LLM-Based Algorithm Evolution for the 3D Container Loading Problem

This work proposes a pipeline that introduces a novel regularization architecture balancing performance and complexity, and mitigate the side effects of automated tuning through two novel components: a symbolic pruning mutator and a complexity-aware mutation gate that explicitly filters out mutations leading to excessive code growth.

Guorui Quan, Mingfei Sun, Manuel López-Ibáñez et al. · 0 citations
Jul 2026

Specification-Driven DevOps for Multi-Service Environments

This study investigates whether a frontier LLM can generate Dockerfiles and Docker Compose configurations for multi-service applications using repository contents without access to developer-authored deployment artifacts and analytically derives a minimal explicit deployment specification for information that cannot be reliably inferred from repository artifacts.

Oleg Grynets, Kyrylo Fursov, V. Lyashkevych et al. · 0 citations
Preprint Aug 2026

CURATE: Leveraging LLM Agents to Compose, Catalog, and Deploy Reproducible Workflows

This work proposes CURATE - Composition, User-in-the-loop, Reuse, and Automated Task Execution - a novel human-in-the-loop multi-agent system that uses LLM agents to manage and develop composable workflows across their entire lifecycle.

Nolan Cutler, Chia-Chen Kuo, Nanda Velugoti et al. · 0 citations
Conference Aug 2026

Edge-AdaptiveKG: Resource-Efficient Knowledge Graph Construction for RAG on Edge Devices

Integrating Knowledge Graphs (KGs) into Retrieval-Augmented Generation (RAG) can substantially improve LLM performance on complex question answering (QA) by reducing hallucinations and supplying structured context. However, building high-quality KGs over large corpora for edge scenarios is challenging: cloud-based processing introduces latency and dependency on remote services, while exhaustive on-device construction with LLMs is often computationally infeasible under limited hardware budgets. We observe that traditional non-LLM methods can efficiently capture explicit knowledge, and that real-world queries typically touch only a small, highly concentrated portion of the graph. As a result, static and exhaustive KG construction is redundant and inefficient. We propose Edge-AdaptiveKG, a resource-aware framework that combines an offline Seed KG (S-KG) with an online Query-driven KG (Q-KG). Lightweight non-LLM methods build the S-KG, while the LLM is invoked on demand during question answering to incrementally expand the Q-KG only when complex relations are needed. Experiments show that Edge-AdaptiveKG reduces computational overhead and inference latency, enabling KG-enhanced RAG on resource-constrained devices while maintaining competitive QA accuracy.

Yuyu Du, Juxin Niu, Chun Jason Xue et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.