INDICT improves code safety and helpfulness by employing a dual-critic system, where one critic evaluates potential risks and the other ensures code alignment with task requirements6. The framework uses external knowledge sources for informed critiques and operates in preemptive and post-hoc feedback stages, enabling iterative refinement of generated code6. This approach results in a significant improvement in both safety and helpfulness metrics.
The INDICT framework has two main stages: preemptive and post-hoc feedback1. In the preemptive stage, the safety-driven critic evaluates potential risks, while the helpfulness-driven critic ensures code aligns with task requirements, querying external knowledge sources for supplemental evaluations1. The post-hoc stage reviews the generated code after execution, allowing critics to provide additional feedback based on observed outcomes1.
INDICT uses external knowledge sources by equipping its safety-driven and helpfulness-driven critics with relevant code snippets and tools like web searches and code interpreters1. This allows the critics to provide more informed and effective critiques, enhancing the safety and helpfulness of the generated code.