INDICT: Code Generation with Internal Dialogues of Critiques for Both Security and Helpfulness
Hung Le, Yingbo Zhou, Caiming Xiong, Silvio Savarese, Doyen Sahoo

TL;DR
INDICT introduces a dual-critic framework with internal dialogues to enhance code generation safety and helpfulness in large language models, significantly improving output quality across multiple tasks and languages.
Contribution
The paper presents a novel dual-critic system with internal dialogues for safety and helpfulness, improving code generation quality in LLMs across diverse tasks and benchmarks.
Findings
Significant +10% improvement in code quality across models
Effective safety and helpfulness critique system
Applicable to multiple programming languages and tasks
Abstract
Large language models (LLMs) for code are typically trained to align with natural language instructions to closely follow their intentions and requirements. However, in many practical scenarios, it becomes increasingly challenging for these models to navigate the intricate boundary between helpfulness and safety, especially against highly complex yet potentially malicious instructions. In this work, we introduce INDICT: a new framework that empowers LLMs with Internal Dialogues of Critiques for both safety and helpfulness guidance. The internal dialogue is a dual cooperative system between a safety-driven critic and a helpfulness-driven critic. Each critic provides analysis against the given task and corresponding generated response, equipped with external knowledge queried through relevant code snippets and tools like web search and code interpreter. We engage the dual critic system in…
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
Taxonomy
TopicsAdvanced Malware Detection Techniques · Software Engineering Research · Software Engineering Techniques and Practices
MethodsALIGN
