AVA, a complete rewrite focused on AI-native Visual Analytics.
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
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',
},
});
// Load data from various sources
await ava.loadCSV('data/companies.csv');
// 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), and results are summarized using LLM into natural language responses.
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
ββββββββββββββββ
β
User Response
- Core data loading (CSV)
- Multiple data sources (JSON Object, URL, Text)
- Natural language to code/SQL
- Smart data handling (JavaScript/SQLite)
- Basic analysis capabilities
- Comprehensive unit tests with vitest
- Visualize module with chart recommendations
- Additional data sources (Excel, Database connections)
- Streaming responses
- Chart rendering integration
- Advanced aggregation operations
- Multi-table queries
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
- READMEs are updated as needed
- GPT-Vis - Visualization components
- Chart Visualization Skills - LLM skills for charts
- Vercel AI SDK - LLM integration
MIT