Skip to main content

AI-powered taxonomy generation for your data

Project description

Delve: AI-Powered Taxonomy Generation

Delve is a production-ready SDK and CLI for automatically generating taxonomies from your data using state-of-the-art language models.

📚 Read the full documentation →

Quick Start

Installation

pip install delve-taxonomy

# Set API keys
export ANTHROPIC_API_KEY="your-key-here"
export OPENAI_API_KEY="your-key-here"  # Required for classifier embeddings

CLI

# Basic usage (shows progress spinners)
delve run data.csv --text-column text

# With progress bars and ETA
delve run data.csv --text-column text -v

# Quiet mode (errors only)
delve run data.csv --text-column text -q

# JSON with nested data
delve run data.json --json-path "$.messages[*].content"

Python SDK

from delve import Delve, Verbosity

# Initialize client (silent by default - library best practice)
delve = Delve()

# Or with progress output
delve = Delve(verbosity=Verbosity.NORMAL)

# Run taxonomy generation
result = delve.run_sync("data.csv", text_column="text")

# Access results
print(f"Generated {len(result.taxonomy)} categories")
for category in result.taxonomy:
    print(f"  - {category.name}: {category.description}")

# Access labeled documents
for doc in result.labeled_documents[:5]:
    print(f"  [{doc.category}] {doc.content[:50]}...")

Binary Detection (Single Category)

For fast filtering when you know the category you're looking for:

from delve import Delve

# Find all refund-related documents (~$1-2 for 30K docs, runs in minutes)
result = Delve.find_matches(
    "data.csv",
    category={
        "name": "Refund Request",
        "description": "User asking for refund or money back",
        "keywords": ["refund", "money back", "cancel"],
    },
    text_column="text",
    threshold=0.6,
)

print(f"Found {result.stats['matches']} matches")
for doc in result.matched_documents[:5]:
    print(f"  [{doc.confidence:.2f}] {doc.content[:50]}...")

Features

  • Automated Taxonomy Generation - No manual category creation — powered by the latest Claude models
  • Binary Detection - Fast, cheap single-category filtering with find_matches()
  • Multiple Data Sources - CSV, JSON/JSONL, LangSmith runs, pandas DataFrames
  • Smart Categorization - Iterative refinement with minibatch clustering
  • Flexible Exports - JSON, CSV, and Markdown reports

Requirements

  • Python 3.9+
  • Anthropic API key (for taxonomy generation)
  • OpenAI API key (for classifier embeddings when sample_size > 0)

Documentation

Development

# Install dependencies
uv sync

# Run tests
pytest tests/

# Run linting
ruff check src/

# Format code
ruff format src/

Documentation Development

To work on the documentation locally, you'll need Node.js 20.17+ (for Mintlify):

# If using nvm, the project includes .nvmrc
nvm use

# Install Mintlify CLI (if not already installed)
npm install -g mintlify

# Run the docs server
cd docs
mintlify dev

See the full documentation for more details on contributing and development.

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

delve_taxonomy-0.2.0.tar.gz (53.5 kB view details)

Uploaded Source

Built Distribution

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

delve_taxonomy-0.2.0-py3-none-any.whl (66.9 kB view details)

Uploaded Python 3

File details

Details for the file delve_taxonomy-0.2.0.tar.gz.

File metadata

  • Download URL: delve_taxonomy-0.2.0.tar.gz
  • Upload date:
  • Size: 53.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for delve_taxonomy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 71c1169e73da29e08736552d9bbed21953eb71f1b5cbac5e1a7dc75118149f7c
MD5 3d26438a79d8d440ab551a5563490b5f
BLAKE2b-256 4a6f65eea4ece9abfb7209175460b617fef3eb345883ab79cc98e30fdedec735

See more details on using hashes here.

Provenance

The following attestation bundles were made for delve_taxonomy-0.2.0.tar.gz:

Publisher: release.yml on andrestorres123/delve-taxonomy

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

File details

Details for the file delve_taxonomy-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: delve_taxonomy-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 66.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for delve_taxonomy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 583b114134434c4c489915fd642764648c169095433c32f42d6174c0fb03cbb3
MD5 59e18bc3c49a05d705b4312f7d77682b
BLAKE2b-256 c4e5ff18761d05f185aab1e26616bbcbde15e151139ea8dfcdf79c1287f5d64d

See more details on using hashes here.

Provenance

The following attestation bundles were made for delve_taxonomy-0.2.0-py3-none-any.whl:

Publisher: release.yml on andrestorres123/delve-taxonomy

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