iDC-NEU/YiGraph

YiGraph is an LLM-driven agent for autonomous Graph Data Analytics based on Analytics-Augmented Generation. 易图(YiGraph)是一套基于 AAG(分析增强生成)框架构建的图分析智能体系统,致力于挖掘数据之间的关联关系,释放数据价值。

What it solves

YiGraph tackles the problem of turning complex, messy relational data into clear business insights. Rows of transaction logs, documents, tables, and other raw sources often hide important connections (who transfers money to whom, which accounts and devices are linked, how companies are related), but uncovering those connections normally requires graph expertise and manual work. YiGraph automates the whole pipeline: it extracts entities and relationships from raw data to build a structured graph, then lets a user ask a business question in natural language and receive a clear, interpretable, and traceable analysis report — without the user needing to understand graph algorithms.

How it works

YiGraph is an end-to-end agent system built around the AAG (Analytics-Augmented Generation) framework. Large language models handle understanding the user's intent, breaking the analysis task into steps, and organizing the final output. The key reliability mechanism is that the core analytical computation is not left to the model's text reasoning — instead, AAG treats computation itself as a first-class capability and invokes professional graph algorithms and graph systems at key stages to perform verifiable calculations, which the model then interprets and summarizes.

The system works through three stages:

  • Knowledge-driven task planning: Before executing anything, YiGraph figures out what the user's question wants to solve, what data fields and relationships are needed, what kind of graph to build (which entities, which relationships), which analysis methods and parameters fit, and how to interpret the results.
  • Algorithm-centric reliable execution: Rather than letting the model "write a piece of uncontrollable code and run it," YiGraph centers on verifiable algorithm modules that are invoked and combined. Each analysis step is reproducible (same input yields stable output), traceable (you can see which algorithms and steps ran), and more reliable (key calculations are done by professional modules, not pure text reasoning).
  • Task-aware graph construction: The system does not indiscriminately dump all raw data into one giant graph. It selectively extracts only the entities and relationships relevant to the current problem, avoiding noise from unrelated structures, and organizes the graph into a form better suited for execution.

YiGraph ships with a built-in library of 200+ graph algorithms covering many categories, including basics (BFS, DFS, topological sort), path algorithms (Dijkstra, Bellman-Ford), centrality (PageRank, Betweenness), connectivity and components, clustering and community detection (Louvain, Leiden, label propagation), flow and cut, matching and coloring, cliques and cores, distance measures, and graph query operations.

The system supports two kinds of input data: existing graph data, and unstructured text data (documents, logs, reports) from which entities and relationships are automatically extracted.

YiGraph offers three operating modes:

  • Normal Mode: the user just submits a business question; the system automatically parses it, picks appropriate graph algorithms, executes, and generates the report. Suited to non-technical or general business users.
  • Interactive Mode: the user collaborates with YiGraph, and the system interacts with the LLM to decide the computation workflow and graph algorithms before executing. Suited to advanced users who know both the business and graph algorithms.
  • Expert Mode: the user specifies the problem along with the solution approach, computation steps, and graph algorithms, and YiGraph executes the provided plan. Meant for expert users.

Deployment-wise, YiGraph requires Python 3.11+, uses Neo4j as the graph database (tested with Neo4j 3.5.25), and is configurable through a YAML file that sets the LLM provider (OpenAI or Ollama), retrieval and embedding settings, and dataset definitions. A Python package is published on PyPI as yigraph 2.0.0, and it can run either through a Web interactive interface or a terminal interactive mode. The demo command computes a shortest path and PageRank without needing an LLM, GPU, or database.

Who it's for

  • General business users and non-technical analysts who want answers from complex data without learning graph theory — they use Normal Mode and just describe their business problem in natural language.
  • Advanced users who understand both the business domain and graph algorithms, and want to steer the computation workflow — they use Interactive Mode.
  • Expert users with deep knowledge of the business and graph algorithms who want to specify the exact solution approach, steps, and algorithms — they use Expert Mode.
  • Organizations with relational data analysis needs in several domains, including financial anti-money-laundering and suspicious transaction analysis (building transaction networks to find abnormal fund paths and suspicious loops), e-commerce risk control (identifying organized fraud and associated malicious behavior by linking accounts, devices, and addresses), enterprise association and risk investigation, park/city event analysis (restoring personnel relationships and event evolution from access control, trajectory, and event data), and supply chain risk analysis.

Highlights

  • End-to-end pipeline from raw data (logs, documents, tables) to graph to final analysis report.
  • Natural language interface: describe business problems in plain language; no graph algorithm knowledge required.
  • 200+ built-in graph algorithms covering path, centrality, community, flow, matching, cliques, distance, query, and more.
  • AAG framework ensures reliability — computations are executed by verifiable algorithm modules rather than uncontrolled model-generated code, making results reproducible and traceable.
  • Task-aware graph construction that selectively builds only problem-relevant entities and relationships.
  • Three usage modes (Normal, Interactive, Expert) for different skill levels.
  • Multi-data-source support: graph data and unstructured text data.
  • Distributed as a runnable source project plus a published PyPI package (yigraph 2.0.0), with both web and terminal interactive interfaces.

Related

  • Project
  • Project
  • Project
  • Project
  • Project