Ouroboros: A Debugger-Tracer for LLMs and Programmers That Records Actual Program Execution (All Calls, Arguments, Results) in 8 Languages
Key point
The debugger 'Ouroboros', designed to reduce LLM code generation errors, has been released and supports 8 languages.
Details
Ouroboros, a debugging tool designed to prevent hallucinations in code generated by LLMs and improve accuracy, has been released. This tool traces the actual execution records of programs (calls, arguments, results) to help diagnose issues before the LLM saves the code.
Performance Improvement Effects
Comparisons of accuracy rates before and after applying traces showed significant performance improvements across various models.
- qwen3.5:4b: 44.0% → 78.3% (+23.7%p)
- qwen2.5:14b-instruct: 61.0% → 84.7% (+23.7%p)
- qwen3:32b: 66.7% → 90.3% (+23.6%p)
- Claude Opus 5 subagent: 95.0% → 98.3% (+3.3%p)
Key Features and Characteristics
- Non-invasive debugging: Runs on a separate copy without modifying actual files, returning only the debugged code.
- Multi-language support: Supports 8 languages, including Python, JavaScript/TypeScript, C, C++, Elixir, Go, Java, and C#.
- Lightweight architecture: No daemons, agents, ports, or collectors, and does not use external APIs.
- Execution tracing: Records time, call ID, thread, arguments, return values, exceptions, and duration in JSON line format upon function entry/exit.
Use Cases
- Tracking internal function state: Diagnoses issues such as empty list inputs inside functions that are difficult to identify via stack traces.
- Diagnosing infinite wait processes: Identifies 'mismatched IDs' where entry logs exist but output logs are missing, and determines the stack location via the
in_flightfield.
The tool is released under the BSD-2-Clause license and can be installed and contributed to via GitHub.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.