Abstract: Large language models used for code generation and repair still face problems with structure and consistency. This paper presents HERALD-Qwen, a hierarchical framework that improves syntax ...