Developer Tools

FGDM: Reasoning Aware Multi-Agentic Framework for Software Bug Detection using Chain of Thought and Tree of Thought Prompting

Four AI agents team up using Chain-of-Thought and Tree-of-Thought reasoning...

Deep Dive

A new multi-agent AI framework called FGDM (Flow-Graph-Driven Multi-Agent) tackles automated software bug detection by combining four specialized LLM agents that work sequentially. Each agent uses Chain-of-Thought (CoT) and Tree-of-Thought (ToT) prompting to reason through code step by step. The framework first converts source code into a flow graph to capture structural dependencies, then identifies erroneous segments, and finally generates repaired code. It also integrates with FAISS, a vector database, to retrieve similar past bugs and their fixes for context-aware debugging.

The researchers tested FGDM on 100 programs from 10 real-world projects including Ansible, Black, FastAPI, Keras, Matplotlib, Pandas, Scrapy, SpaCy, and Tornado, covering both Python and C codebases. Results showed FGDM outperformed existing deep learning and LLM-based approaches, achieving mean cosine similarity scores of 0.951 for Python and 0.974 for C, while reducing Levenshtein edit distance by 24.33 and 8.37 respectively. This demonstrates the framework's ability to handle large, interconnected codebases where traditional methods struggle with global context.

Key Points
  • FGDM uses four sequential LLM agents with Chain-of-Thought and Tree-of-Thought prompting for bug detection and repair
  • Achieved 0.951 cosine similarity (Python) and 0.974 (C) on 100 programs from 10 open-source projects
  • Integrated FAISS vector database for retrieving similar past bugs and fixes to improve accuracy

Why It Matters

Multi-agent reasoning could automate debugging for complex codebases, saving developers hours of manual inspection time.