Skip to content

antvis/AVA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

948 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AVA

AVA, a complete rewrite focused on AI-native Visual Analytics.

AVA (AVA examples 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 logo

πŸš€ Features

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

πŸ“– Quick Start

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();

πŸ—οΈ Architecture

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

🚧 Roadmap

  • 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

🀝 Developer Contributions

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

πŸ”— Related Projects

πŸ“„ License

MIT