Skip to content

RFC: GPT-Vis 1.0 stable, AntV Visualization for AI, Friendly! #270

@hustcc

Description

@hustcc

背景

GPT-Vis 开源了有接近一年多了,当时还是在 RAG 时代,期望通过组件 + 知识库,为 AI 带来可视化能力,再结合 Markdown 输出,让大模型能多模态输出能力,验证来看确实是不错的。到现在,大量以 Markdown 为协议作为 LLM 输出的方案。

谁能想到 Markdown 会成为 AI 时代的基础设施。

这一点 AntV 也算走在前列,可惜的是 GPT-Vis 没有在社区形成足够的影响力和规范。

当前蚂蚁的 Ant Design X 中 x-markdown 方案,聚焦在 Markdown 的大模型输出,并内置了一些 UI 组件,客观来说,确实在 Ant Design 中是更合适的,不过更好的架构是提供非 React 依赖的库,然后在以此封装 React、Vue 等技术栈方案,让前端的大模型渲染上可以保持一致。

基于这些背景,GPT-Vis 需要做一些技术定位的转型,避免重叠和重复,保持特色。

定位

GPT-Vis 当初取名,就是为了给 AI 提供 Vis 能力,只不过在 antv 组织中,更多的考虑的是数据的可视化。现在依然沿用这个名字和释义。

GPT-Vis, Visualization for AI, Friendly! AntV's entry under AI, includes G2, S2, G6, X6, L7.

新定位:为大模型提供 AI 友好的可视化组件库,作为 AntV 在 AI 环境的入口,用于在 AI 数据可视化,AI 数据分析,AI 报告,PPT 等提供素材。

原因主要有:

  1. AI 下,用户会逐步淡化数据可视化底层引擎,用户关注的是自己的需求,AI 的解决方案才是最重要的
  2. AI 友好,是一个长期需要追随的话题,AI 概念一年一个,从 Promot -> MCP -> Skill,不跟随的话,在 AI 的选择中最终就会被落下
  3. 纯粹一些,和 Ant Design X 配合协同,收获更大的 ROI

方案

主要关注一下点:

  • 非技术限定,当前是 React 组件
  • 提供常见的 20+ 统计图表,提升图表能力、体验,减小包大小
  • AI 可视化语法(参考 Infographic,流式渲染,容错性)
  • Skills 使用方式,在各种场景使用(出码、可视化、分析)

示例

import { GPTVis } from '@antv/gpt-vis';

const g = new GPTVis({
  container: '#container',
  width: 600,
  height: 400,
  withContainer: true,
});

g.render(`
vis pie
data
  - category 分类一
    value  27
  - category 分类二
    value 25
  - category 分类三
    value 18
  - category 分类四
    value 15
  - category 分类五
    value 10
  - category 其他
    value 5
theme academy
innerRadius: 0.6
`);

// 或者
g.render({
  "type": "pie",
  "data": [
    { "category": "分类一", "value": 27 },
    { "category": "分类二", "value": 25 },
    { "category": "分类三", "value": 18 },
    { "category": "分类四", "value": 15 },
    { "category": "分类五", "value": 10 },
    { "category": "其他", "value": 5 }
  ],
  "innerRadius": 0.6,
  "theme": "academy"
});
Image
English Version

Background

GPT-Vis has been open-source for over a year. Introduced during the RAG era, the goal was to integrate components and knowledge bases to empower AI with visualization capabilities, coupled with Markdown outputs for multimodal capabilities. The results have indeed been promising. Today, many solutions leverage Markdown as the protocol for LLM outputs.

Who would have thought Markdown would become the infrastructure for the AI era.

In this regard, AntV has been a pioneer. However, GPT-Vis has yet to achieve sufficient influence or establish standards in the community.

Currently, Ant Design X’s x-markdown focuses on large language model (LLM) output via Markdown, incorporating built-in UI components. Admittedly, this aligns well with Ant Design. However, the ideal architecture involves providing libraries independent of React, then wrapping them into solutions tailored for React, Vue, or other tech stacks. This ensures consistent rendering for LLM-powered frontend solutions.

Given this background, GPT-Vis requires a strategic shift to avoid redundancy, while maintaining its distinct features.

Positioning

When GPT-Vis was named, its intent was to deliver visualization capabilities for AI, though the focus within the AntV organization was primarily data visualization. The name and its purpose remain consistent today.

GPT-Vis, Visualization for AI, Friendly! AntV's entry under AI, includes G2, S2, G6, X6, L7.

New product positioning: Provide an AI-friendly visual component library for large models, serving as a resource for AI data visualization, AI data analysis, AI reports, PPT presentations, and more.

Reasons:

1.. Under AI, users will gradually shift focus away from the underlying engines of data visualization, focusing instead on their specific needs and AI solutions.
2. Being AI-friendly is a long-term theme that needs to be followed. AI evolves rapidly, with transitions from Prompt -> MCP -> Skill. Without keeping pace, one risks being left behind in the AI race.
3. Keeping things straightforward enables better collaboration with Ant Design X, leading to higher ROI.

Plan

The focus areas include:

  • Without technical constraints, it is currently a React component
  • Offering 20+ common chart types to enhance capabilities, improve user experience, and reduce package size.
  • Developing an AI visualization syntax (reference Infographic, for stream rendering and fault tolerance).
  • Implementing Skills use cases across scenarios (generating code, visualization, and analysis).

Show Case

import { GPTVis } from '@antv/gpt-vis';

const g = new GPTVis({
  container: '#container',
  width: 600,
  height: 400,
});

g.render(`
vis pie
data
  - category 分类一
    value  27
  - category 分类二
    value 25
  - category 分类三
    value 18
  - category 分类四
    value 15
  - category 分类五
    value 10
  - category 其他
    value 5
theme academy
innerRadius: 0.6
`);

// 或者
g.render({
  "type": "pie",
  "data": [
    { "category": "分类一", "value": 27 },
    { "category": "分类二", "value": 25 },
    { "category": "分类三", "value": 18 },
    { "category": "分类四", "value": 15 },
    { "category": "分类五", "value": 10 },
    { "category": "其他", "value": 5 }
  ],
  "innerRadius": 0.6,
  "theme": "academy"
});
Image

Sub-issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions