Towards Exception Safety Code Generation with Intermediate Representation Agents Framework
Xuanming Zhang, Yuxuan Chen, Yuan Yuan, Minlie Huang

TL;DR
Seeker is a multi-agent framework that enhances exception safety in LLM-generated code by decomposing exception handling into specialized agents, utilizing a comprehensive knowledge base, and improving robustness and accuracy in real-world programming scenarios.
Contribution
The paper introduces Seeker, a novel multi-agent system with an IR approach and a knowledge base to improve exception handling in code generated by LLMs, significantly reducing fragility.
Findings
Outperforms state-of-the-art baselines in exception handling precision by up to 37%
Improves overall code robustness by 38% as measured by expert review
Achieves a 28% success rate in real-world issue fixes, surpassing prior methods' 19%
Abstract
Large Language Models (LLMs) often struggle with robust exception handling in generated code, leading to fragile programs that are prone to runtime errors. We propose Seeker, a novel multi-agent framework that enforces exception safety in LLM generated code through an Intermediate Representation (IR) approach. Seeker decomposes exception handling into five specialized agents: Scanner, Detector, Predator, Ranker, and Handler that collaboratively analyze code, detect fragile segments, retrieve best practice exception strategies, and inject robust handling code. We also introduce Common Exception Enumeration (CEE), a comprehensive knowledge base derived from official documentation, technical practices, and real world code, to standardize exception handling strategies. Seeker also incorporates a Deep Retrieval-Augmented Generation (Deep RAG) algorithm to efficiently navigate the exception…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Web Application Security Vulnerabilities · Digital Rights Management and Security
