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.1.tar.gz (54.7 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.1-py3-none-any.whl (68.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: delve_taxonomy-0.2.1.tar.gz
  • Upload date:
  • Size: 54.7 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.1.tar.gz
Algorithm Hash digest
SHA256 b5a0fc25abeb9159dd7a17bfa4c3178689ee488ea384fd3b69b3e440fbc895a0
MD5 51570a2198df8f866bae38ef7c582068
BLAKE2b-256 343c5b253b7918a788d0aef1c5420a70e620bc51769aa52aa566b8f72fd7ae84

See more details on using hashes here.

Provenance

The following attestation bundles were made for delve_taxonomy-0.2.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: delve_taxonomy-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 68.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7a8d043f250b0fb8184e7256544e106368942c27e78159a07df97e7f785e6dbe
MD5 eeadb59d9c3ac2313350988fb776eecc
BLAKE2b-256 8cf912905acd76b4dfa3f8ccecb6c2fd0ebf671c83ce0e8fdc8ef0cd11d235f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for delve_taxonomy-0.2.1-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