Back to directory

Data-Agent

A Chinese-language tutorial that builds a Text2SQL agent from scratch, covering state-graph orchestration, dual retrieval-augmented generation, human-in-the-loop confirmation and automatic SQL correction.

Data-Agent

Data-Agent is a learning tutorial that reproduces and explains a Text2SQL agent based on an existing open-source project, aimed at developers who want to understand graph-based orchestration, dual retrieval-augmented generation, self-correction, and human-in-the-loop collaboration step by step.

The tutorial walks through an execution chain that takes a natural-language question, recalls both a vectorized business glossary and a knowledge graph, plans and breaks the task into steps, pauses for human confirmation on risky steps, generates and executes SQL with automatic error correction in a Python Docker sandbox, and streams the result back to the user with server-sent events. The backend is built with Kotlin, Spring Boot and an object-relational library, orchestration uses a Spring AI graph extension, storage is PostgreSQL with the pgvector extension, and the frontend uses Vue 3, TypeScript and Vite.

The material is organized into chapters, each matched to its own git branch, meant to be read alongside the corresponding source code.

More in Tutorials

See all 478
  • BootLife

    github.com

    Conway's Game of Life implemented to run directly from a 512-byte x86 boot sector in assembly, using VGA memory itself as the simulation grid.

  • A technical blog post deriving the Y combinator as a composition of combinator birds in an array language, and examining how eager evaluation changes fixed-point recursion compared with the usual lazy telling.

  • System Design Atlas

    atlas-sysdes.vercel.app

    A free reference of worked system design problems with interactive architecture diagrams, covering ranked designs such as a feed, a chat app, a URL shortener, and a rate limiter, plus pages on the technologies behind them.