Deep-Context-Awareness-Based LLM Code Generation and Accurate-Defect-Repair Integrated Architecture

In response to the issues of context fragmentation and delayed defect repair in large language model (LLM) code generation, this paper proposes a deep context-aware generation-repair fusion architecture. Through a bidirectional collaborative mechanism, it achieves a paradigm shift towards "generation as correctness." This architecture innovatively constructs multi-granularity context encoding models, dynamically integrating code structure, developer intent, and project-level constraints. It combines a neural-symbolic collaboration framework to deeply couple LLM's generative capabilities with the reliability of formal verification. The —— generation module is implemented using graph attention networks to achieve cross-file semantic association, while the repair module accurately locates and fixes defects through probabilistically guided patch search and hierarchical verification strategies. The architecture supports multi-objective optimization and human feedback reinforcement learning (RLHF), balancing code quality, performance, and security requirements, and generates traceable decision chains to ensure ethical compliance. This study provides a new generation of solutions for automated software engineering that combines efficiency and credibility, and lays the technical foundation for future directions such as multimodal context expansion and quantized code analysis.

Institutions

Publication Details

Journal
Journal of Artificial Intelligence Practice
Published
2025-01-01
DOI
https://doi.org/10.23977/jaip.2025.080217
Primary Topic
Industrial Vision Systems and Defect Detection
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Deep-Context-Awareness-Based LLM Code Generation and Accurate-Defect-Repair Integrated Architecture

Journal of Artificial Intelligence Practice
Industrial Vision Systems and Defect Detection
article

Deep-Context-Awareness-Based LLM Code Generation and Accurate-Defect-Repair Integrated Architecture

article en

Abstract

In response to the issues of context fragmentation and delayed defect repair in large language model (LLM) code generation, this paper proposes a deep context-aware generation-repair fusion architecture. Through a bidirectional collaborative mechanism, it achieves a paradigm shift towards "generation as correctness." This architecture innovatively constructs multi-granularity context encoding models, dynamically integrating code structure, developer intent, and project-level constraints. It combines a neural-symbolic collaboration framework to deeply couple LLM's generative capabilities with the reliability of formal verification. The —— generation module is implemented using graph attention networks to achieve cross-file semantic association, while the repair module accurately locates and fixes defects through probabilistically guided patch search and hierarchical verification strategies. The architecture supports multi-objective optimization and human feedback reinforcement learning (RLHF), balancing code quality, performance, and security requirements, and generates traceable decision chains to ensure ethical compliance. This study provides a new generation of solutions for automated software engineering that combines efficiency and credibility, and lays the technical foundation for future directions such as multimodal context expansion and quantized code analysis.

Journal of Artificial Intelligence PracticeVol. 8(2)
China National Health Development Research Center (CN)
Industry, innovation and infrastructure
Openalex Percentile: Top 81%
Industrial Vision Systems and Defect Detection
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.