Skip to main content

AI-powered data exploration with natural language

Project description

datasight

Status: early and evolving. This project is in active development and the code is changing rapidly — APIs, CLI flags, and behavior may shift between commits. Feedback and bug reports from users are very welcome; please open an issue on GitHub.

AI-powered data exploration with natural language.

datasight connects an AI agent to your database and provides a web UI where you can ask questions in natural language. The agent writes SQL, runs queries, and generates interactive Plotly visualizations.

Supports DuckDB, PostgreSQL, SQLite, and Flight SQL databases. Supports Anthropic Claude (default), GitHub Models (open source), and Ollama (local) as LLM backends.

Quick start

uv tool install "datasight @ git+https://github.com/dsgrid/datasight.git"

# Create a new project
mkdir my-project && cd my-project
datasight init

# Edit .env with your API key and database path
# Edit schema_description.md to describe your data
# Edit queries.yaml with example questions

# Run the web UI
datasight run

Open http://localhost:8084 and start asking questions.

Or ask from the command line without starting a server:

datasight ask "What are the top 10 records?"
datasight ask "Show trends by year" --chart-format html -o chart.html
datasight profile
datasight quality --format markdown -o quality.md
datasight ask --file questions.txt --output-dir batch-output

Features

  • Natural language queries — ask questions in English, get SQL + results
  • Interactive charts — Plotly visualizations with chart-type switching
  • Multiple databases — DuckDB, PostgreSQL, SQLite, and Flight SQL
  • Headless CLIdatasight ask runs queries without a web server
  • Deterministic CLI workflows — profile, quality, dimension, trend, and recipe commands that do not require an LLM
  • Schema browser — sidebar with tables, columns, and example queries
  • Schema auto-discovery — tables, columns, and types detected automatically
  • Domain context — describe your data in Markdown for better AI understanding
  • Example queries — seed the AI with question/SQL pairs
  • Reusable prompt recipes — project-specific analysis prompts derived from the schema
  • Multi-chart dashboard — pin results, filter cards, and configure layouts
  • Session export — export conversations as shareable HTML pages
  • Keyboard shortcuts? to see all shortcuts, / to focus input
  • Streaming responses — real-time SSE streaming from the LLM

Architecture

datasight pairs a FastAPI backend with a Svelte 5 + TypeScript + Tailwind CSS frontend built with Vite. It supports multiple LLM backends — Anthropic (default), OpenAI, GitHub Models, and Ollama — selectable via LLM_PROVIDER in .env.

datasight run / datasight ask / datasight profile / datasight quality
  → LLM provider (Anthropic / OpenAI / GitHub Models / Ollama)
    → DuckDB / PostgreSQL / SQLite / Flight SQL
    → Plotly chart generator
  → Web UI (SSE streaming) or CLI output

Documentation

uv sync --extra dev
. .venv/bin/activate
zensical serve
zensical build
python scripts/generate_cli_reference.py

Development Tests

# Build frontend assets for FastAPI serving after a clean checkout
bash scripts/build-frontend.sh

# Python test suite
pytest

# CI-safe Python test suite, excluding tests that need local Ollama
pytest -m "not integration"

# Frontend unit tests (Vitest)
cd frontend && npm test

# Frontend E2E tests (Playwright, requires datasight run)
cd frontend && npm run test:e2e

# Rebuild frontend for FastAPI serving after frontend changes
bash scripts/build-frontend.sh

Generated web assets under src/datasight/web/static/ and src/datasight/web/templates/index.html are not checked in. Run bash scripts/build-frontend.sh before using datasight run from a clean checkout when you want FastAPI to serve the production UI.

Ollama-backed CLI tests are marked integration because they require a running local Ollama server with the qwen3:8b model available. CI runs pytest -m "not integration"; run pytest -m integration locally when you want to exercise the live LLM path.

Software Record

datasight is developed under NLR Software Record SWR-26-045.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datasight-0.3.0.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datasight-0.3.0-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

File details

Details for the file datasight-0.3.0.tar.gz.

File metadata

  • Download URL: datasight-0.3.0.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for datasight-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9d9f6c589dc196d523325f94cf535f57cd453d06b34e3a2b33d8be11efef4515
MD5 d8a9c989c1642f4f6c5afaed05049a71
BLAKE2b-256 70c5bf7813ce51bb9a11bf9a484cd0270f2c673d9944d20d91d1b8b05b8fd09a

See more details on using hashes here.

Provenance

The following attestation bundles were made for datasight-0.3.0.tar.gz:

Publisher: release.yml on dsgrid/datasight

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file datasight-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: datasight-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for datasight-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 808aedd1a32ff525298f8aa9bbc43e2de8ad4c67aa770f24fc4b2729e3295857
MD5 ed9eaafb3a4b3e91726423554022950c
BLAKE2b-256 131f8aee9d9eb0795f7c8d42904620971768a03bdcb24240ab558eb02d2da0de

See more details on using hashes here.

Provenance

The following attestation bundles were made for datasight-0.3.0-py3-none-any.whl:

Publisher: release.yml on dsgrid/datasight

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page