Metraipolis › archive › dc_892cd59dbecd
A Method for Alleviating Illusions in Code Generation Based on a Large Language Model Generated by Retrieval Enhancement (2026) · DOI 10.7716/aem.v15i3.3976
- Source
- Metraipolis archive
- Original
- https://doi.org/10.7716/aem.v15i3.3976
- License (as archived)
- CC-BY-4.0
- Archived
- 2026-10-08T02:41:20.426Z
- SHA-256 of the archived text
d9cb05251c69844bd891f3974636125a322a171fcc955741c7df331d5bdcb1b9- Stable URL of this page
https://metraipolis.com/documento/dc_892cd59dbecd
How to cite
A Method for Alleviating Illusions in Code Generation Based on a Large Language Model Generated by Retrieval Enhancement (2026) · DOI 10.7716/aem.v15i3.3976 — Metraipolis archive, https://doi.org/10.7716/aem.v15i3.3976 (CC-BY-4.0); archived copy: https://metraipolis.com/documento/dc_892cd59dbecd (Metraipolis archive dc_892cd59dbecd, sha256 d9cb05251c69844bd891f3974636125a322a171fcc955741c7df331d5bdcb1b9)
BibTeX
@misc{dc892cd59dbecd,
title = {A Method for Alleviating Illusions in Code Generation Based on a Large Language Model Generated by Retrieval Enhancement (2026) · DOI 10.7716/aem.v15i3.3976},
howpublished = {Metraipolis archive},
url = {https://doi.org/10.7716/aem.v15i3.3976},
note = {License CC-BY-4.0; archived copy https://metraipolis.com/documento/dc_892cd59dbecd; sha256 d9cb05251c69844bd891f3974636125a322a171fcc955741c7df331d5bdcb1b9},
year = {2026}
}Archived text
Reproduced under CC-BY-4.0. Attribution: Metraipolis archive, https://doi.org/10.7716/aem.v15i3.3976. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Articolo recente con licenza aperta: scheda dai metadati Crossref (journal-article). Titolo: A Method for Alleviating Illusions in Code Generation Based on a Large Language Model Generated by Retrieval Enhancement Autori: K. Wei Pubblicato: 2026-08-13 · in: Advanced Electromagnetics · editore: Advanced Electromagnetics DOI: https://doi.org/10.7716/aem.v15i3.3976 Licenza dell'articolo: CC-BY-4.0 Abstract (testo degli autori, CC-BY-4.0): Large language models have achieved strong performance in code generation, but generated code may contain syntactically plausible yet semantically incorrect API calls, invalid imports, and inconsistent logic. To mitigate such code -generation hallucinations, this study proposes a retrieval-augmented generation framework integrating multi-source retrieval, generation constraints, post-verification, and feedback optimization. Code repositories, technical documents, and Q&A data are jointly modeled through semantic and structural retrieval, and retrieved fragments are represented as structured context units containing API descriptions, sample code, and constraints. During generation, token-level confidence assessment and semantic-consistency constraints are used to identify and control low-confidence fragments. After generation, abstract syntax tree analysis, type consistency checking, API constraint checking, and unittest feedback form a closed-loop generation–verification–correction process. A retrieval–generation collaborative optimization mechanism further updates retrieval weights according to confidence, consistency, and execution feedback. Experiments on code-generation benchmarks show that the method increases BLEU to 42.7, CodeBLEU to 46.3, and Pass@1 to 56.4, while reducing the hallucination rate to 9.8%. The framework provides a reliable method for semantic retrieval, software-engineering automation, and constrained intelligent code generation. Fonte: https://api.crossref.org/works/10.7716%2Faem.v15i3.3976 — metadati Crossref, consultati il 2026-10-07. Interrogazione: «code generation language models».