AVA ( Visual Analytics) is a technology framework designed for more convenient visual analytics. The first A has multiple meanings: AI native, Automated, Augmented, and VA stands for Visual Analytics. It can assist users in unstructured data loading, data processing and analysis, as well as visualization code generation.
AVA is a fundamental shift from rule-based analytics to AI-native capabilities:
- Natural Language Queries: Ask questions about your data in plain English
- LLM-Powered Analysis: Leverages large language models for intelligent data analysis
- Smart Data Handling: Automatically chooses between in-memory processing and SQLite based on data size
- Modular Architecture: Clean separation of concerns with data, analysis, and visualization modules
- Browser & Node.js Compatible: Runs seamlessly in both browser and server environments
- Install
AVAby npm
npm install @antv/ava
pnpm install @antv/ava
yarn add @antv/ava- Then run the code below
import { AVA } from '@antv/ava';
// Initialize with LLM config
const ava = new AVA({
llm: {
model: 'ling-1t',
apiKey: 'YOUR_API_KEY',
baseURL: 'LLM_BASE_URL',
},
sqlThreshold: 1024 * 1024 * 2, // Threshold for switching to SQLite
});
// Load data from various sources in Node.js
await ava.loadCSV('data/companies.csv');
// Load CSV from file input in browser
const fileInput = document.querySelector('input[type="file"]');
const file = fileInput.files[0];
const csvContent = await file.text();
await ava.loadCSV(csvContent);
// or load from JSON object
await ava.loadObject([{ city: 'ζε·', gdp: 18753 }, { city: 'δΈζ΅·', gdp: 43214 }]);
// or load from URL
await ava.loadURL('https://api.example.com/data', (response) => response.data);
// or extract from text
await ava.loadText('ζε· 100οΌδΈζ΅· 200οΌεδΊ¬ 300');
// Ask questions in natural language
const result = await ava.analysis('What is the average revenue by region?');
console.log(result);
// Clean up
ava.dispose();AVA uses a modular pipeline architecture that processes user queries through distinct stages. Data is loaded from multiple sources (CSV, JSON, URL, or text), analyzed intelligently based on size (JavaScript for small datasets, SQLite for large ones), results are summarized using LLM into natural language responses, and optionally visualized with chart recommendations.
User Query
β
AVA Instance
β
βββββββββββββββββββ
β Data Module β β Load from multiple sources:
β β β’ CSV File (loadCSV)
β β β’ JSON Object (loadObject)
β β β’ URL (loadURL)
β β β’ Text (loadText + LLM)
βββββββββββββββββββ
β
ββββββββββββββββββββ
β Metadata Extract β β Type inference, statistics
ββββββββββββββββββββ
β
ββββββββββββββββ
β Size Check β
ββββββββββββββββ
β β
<10KB β₯10KB
β β
JavaScript SQLite
Helpers Storage
β β
ββββββββββββββββββββ
β Analysis Module β β Generate & Execute Code/SQL
ββββββββββββββββββββ
β
ββββββββββββββββ
β LLM Summary β β Natural Language Response
ββββββββββββββββ
β
βββββββββββββββββββββββ
β Visualization β β Optional chart generation:
β Module (Optional) β β’ Detect visualization intent
β β β’ Recommend chart type
β β β’ Generate chart syntax & HTML
βββββββββββββββββββββββ
β
User Response
(Text + Data + Chart)
AVA v4 is designed to run seamlessly in both browser and Node.js environments:
- All core features work in modern browsers (Chrome, Firefox, Safari, Edge)
- CSV loading via File API or direct content strings
- JSON object and URL loading fully supported
- In-memory data processing for datasets under 10KB
- Note: SQLite is not available in browsers; keep datasets under 10KB or use the server-side version for large datasets
- Full feature set including large dataset handling with SQLite
- File system access for CSV loading
- Automatic switching between in-memory and SQLite based on data size (10KB threshold)
AVA automatically detects the runtime environment and adapts:
- Browser: Uses in-memory processing, accepts CSV content strings
- Node.js: Supports file paths for CSV, uses SQLite for large datasets (>10KB)
This is an experimental branch. Contributions are welcome! Please ensure:
- Code is clean and well-documented
- TypeScript types are properly defined
- New features include examples, and tests
- READMEs are updated as needed
- GPT-Vis - Visualization components
- Chart Visualization Skills - LLM skills for charts
- Vercel AI SDK - LLM integration
MIT