ReasonGraph - An open-source AI tool for visualizing and analyzing LLM inference processes.
ReasonGraph is an open-source web platform for visualizing and analyzing the reasoning process of Large Language Models (LLMs). ReasonGraph supports over 50 mainstream models (such as Anthropic, OpenAI, Google, etc.), covering...
What is ReasonGraph?
ReasonGraph is an open-source web platform for visualizing and analyzing the reasoning process of Large Language Models (LLMs). ReasonGraph supports over 50 mainstream models (such as Anthropic, OpenAI, and Google) and covers various reasoning methods (including sequential and tree-based reasoning). Based on an intuitive user interface, ReasonGraph transforms complex reasoning paths into clear graphs, updating the reasoning process in real time to help users quickly understand the AI's thought process, detect errors, and optimize model performance. ReasonGraph's modular design supports the rapid integration of new methods and models, and it is widely used in academic research, education, and development.
ReasonGraph's main functions
- Visualization of reasoning pathsIt displays the LLM reasoning process using intuitive diagrams, supporting both tree-based and sequential reasoning.
- Multiple reasoning methods supportIt covers mainstream reasoning methods, including sequential reasoning and tree-based reasoning.
- Compatible with multiple LLM modelsSupports 50+ mainstream models, such as OpenAI, Google, Anthropic, etc.
- Interactive visualizationIt updates the inference path graph in real time and supports parameter adjustment, scaling, resetting, and exporting to SVG format.
- User-friendly interfaceIt provides an intuitive UI design, making it easy for users to select inference methods, configure models, and view results.
ReasonGraph's technical principles
- Reasoning Path AnalysisThis method uses a rule-based XML parsing approach to extract inference paths from the output of an LLM (Local Level Model). It parses well-formatted inference output with near 100% accuracy. The parsed inference paths are then transformed into structures suitable for visualization, such as tree structures or directed graphs.
- Dynamic visualization technologyThe front-end uses Mermaid.js to implement dynamic graphics rendering, supporting real-time updates of the inference path visualization. Users can adjust visualization parameters, such as node density and layout optimization, based on the interface to adapt to different inference methods and models.
- Modular backend frameworkThe backend is built on Flask and consists of three core modules:
- Configuration Manager: Responsible for status updates and configuration management.
- API Factory: Provides a unified API interface that supports multiple LLM providers.
- Reasoning Methods ModuleIt encapsulates different inference methods and provides standardized parsing and visualization interfaces. It implements front-end and back-end communication and error handling based on a RESTful API layer.
- Real-time interaction and updatesThe front-end uses an asynchronous event handling module to respond to user actions, such as inference method selection and parameter configuration. The back-end calls the corresponding LLM model based on user input and feeds the inference results back to the front-end for visualization in real time.
- Open source and scalabilityReasonGraph uses an open-source model, allowing developers to extend new inference methods and models using standardized API interfaces. Its modular design enables the platform to flexibly adapt to changes in the capabilities of different LLMs and inference methods.
ReasonGraph's project address
- GitHub repository:https://github.com/ZongqianLi/ReasonGraph
- arXiv technical paper:https://arxiv.org/pdf/2503.03979
- Experience the demo online:https://huggingface.co/spaces/ZongqianLi/ReasonGraph
Application scenarios of ReasonGraph
- academic researchIt helps researchers analyze and compare the effects of different reasoning methods, evaluate the performance of models in complex tasks, and promote research progress in LLM reasoning capabilities.
- EducationAs a teaching tool, it helps students intuitively understand the logical reasoning process, demonstrates the decision-making mechanism of LLM, and enhances their interest in and understanding of AI reasoning principles.
- Model debugging and optimizationIt can quickly identify errors or inefficient steps in the inference path, helping developers optimize the inference performance of LLM and improve model performance.
- Application DevelopmentIt supports developers in selecting the optimal inference method when developing LLM applications, optimizing application logic based on visual inference paths, and improving user experience.
- Research on reasoning methodsIt provides visual support for researching new reasoning methods, helps researchers explore and improve LLM reasoning strategies, and promotes technological innovation.