Skip to main content
This guide explains how Delve’s configuration parameters affect taxonomy quality, cost, and performance. Understanding these tradeoffs helps you tune Delve for your specific use case.

Model Selection

model - Main LLM

The main model handles the “thinking” tasks: taxonomy generation, iterative refinement, and quality review. How it affects results:
  • More capable models → Better category definitions, more nuanced distinctions
  • Faster models → Quicker iterations but potentially less refined taxonomies
Start with Claude Sonnet (default) and only upgrade to Opus if you need more nuanced category distinctions. The quality difference is often subtle for straightforward categorization tasks.

fast_llm - Summarization & Labeling Model

The fast LLM handles high-volume tasks: document summarization and individual document labeling. How it affects results:
  • Summary quality impacts downstream taxonomy quality (garbage in, garbage out)
  • Labeling accuracy directly affects your final results
  • Cost scales with document count, so model choice matters more here
Claude Haiku is the recommended choice for most use cases. It’s significantly cheaper while maintaining good quality for summarization and labeling tasks.

Processing Parameters

sample_size - Taxonomy Discovery Sample

What it controls: How many documents are used to discover and validate the taxonomy. How it affects results: Cost implications:
  • Each sampled document requires LLM summarization
  • Each sampled document requires LLM labeling
  • Larger samples = proportionally higher costs for taxonomy discovery
Setting sample_size=0 means ALL documents are labeled by the LLM. This is expensive for large datasets but guarantees every document gets LLM-quality labeling.
When to increase sample size:
  • Your data is highly diverse (many potential categories)
  • Initial runs are missing important categories
  • Classifier accuracy is below expectations
When to decrease sample size:
  • Your data is homogeneous
  • You’re iterating on taxonomy design
  • Budget is constrained

batch_size - Minibatch Size for Clustering

What it controls: How many documents the LLM sees at once during taxonomy generation. How it affects results: Example: With sample_size=200:
  • batch_size=50 → 4 iterations of refinement
  • batch_size=200 → 1 iteration (no refinement)
If your taxonomy seems to be missing categories, try reducing batch_size to allow more refinement iterations.

max_num_clusters - Category Limit

What it controls: The maximum number of categories the LLM will generate. How it affects results: Choosing the right value:
  • Consider how you’ll use the taxonomy
  • More categories = more specific insights but harder to analyze
  • Fewer categories = easier to understand but less detail
Setting this too high can lead to overlapping categories or categories with very few documents. The LLM may also create artificial distinctions to fill the quota.
Recommendations by use case:

Classification Parameters

embedding_model - Classifier Embeddings

What it controls: Which OpenAI model generates embeddings for classifier training. Available options:
  • text-embedding-3-large (default) - Highest quality, 3072 dimensions
  • text-embedding-3-small - Faster, cheaper, 1536 dimensions
  • text-embedding-ada-002 - Legacy, 1536 dimensions
How it affects results:
  • Better embeddings → Better classifier accuracy
  • Larger embeddings → Slightly slower training and inference
The difference in classifier accuracy between embedding models is usually small (1-3%). For most use cases, the default is fine.

classifier_confidence_threshold - Uncertainty Handling

What it controls: When to flag classifier predictions as uncertain. How it works:
  • Classifier outputs probability scores for each category
  • If the top probability is below the threshold, the prediction is flagged as uncertain
  • What happens to uncertain predictions is controlled by low_confidence_action
  • 0.0 = Never flag (trust classifier for everything, default)
  • 0.7 = Flag predictions below 70% confidence
Start with the default (0.0). If you notice miscategorized documents, try increasing the threshold to 0.6-0.8 and using low_confidence_action="other" to be honest about uncertainty.

low_confidence_action - What to Do with Uncertain Predictions

What it controls: How to handle documents where the classifier’s confidence is below the threshold. Available options: How it works:
  • Only applies when classifier_confidence_threshold > 0
  • "other": Honest about uncertainty - the classifier doesn’t know, so label as “Other”
  • "llm": Re-label with LLM for better accuracy, but capped at 20 documents
  • "keep": Accept the classifier’s best guess despite low confidence
Safeguard for "llm" action: If more than 20 documents need re-labeling, Delve automatically falls back to "other" and logs a warning. This prevents unexpected costs on imbalanced datasets.
Don’t use this as a replacement for “Other” in your taxonomy. Low classifier confidence usually means uncertainty between valid categories, not that the document doesn’t fit any category. In testing, inferring “Other” from confidence achieved only 45% accuracy vs 89% when “Other” was included in the taxonomy. See the Class Imbalance guide for details.

min_examples_per_category - Sample Augmentation

What it controls: Minimum number of training examples required per category. How it works:
  • After initial LLM labeling, Delve checks category distribution
  • For categories below the minimum, it finds similar documents using embedding search
  • Those candidates are labeled by LLM and added to the training set
  • 0 = Disabled (default)
  • 5 = Ensure at least 5 training examples per category
When to use:
  • Your data has significant class imbalance
  • Some categories are rare (< 1% of data)
  • You’re using a predefined taxonomy with many categories
Tradeoffs:
See the Handling Class Imbalance guide for a detailed explanation of when and how to use this parameter.

sampling_strategy - Sampling Mode

What it controls: How documents are selected for the initial sample. Available options:
  • random (default) - Simple random sampling
  • stratified - Reserved for future use
For handling imbalanced data, use min_examples_per_category rather than changing the sampling strategy. The sample augmentation approach is more effective because it uses embedding similarity to find good candidates.

Customization Parameters

use_case - Domain Context

What it controls: Provides context to the LLM about your specific use case. How it affects results:
  • More specific use cases → More relevant category names and descriptions
  • Guides the LLM to focus on distinctions that matter for your domain
Examples:
Be specific about:
  • What kind of documents you have
  • What distinctions matter to you
  • How you’ll use the categories

predefined_taxonomy - Skip Discovery

What it controls: Use an existing taxonomy instead of discovering one. When to use:
  • You already have categories you want to apply
  • You’re labeling new data with an established taxonomy
  • You want consistent categories across multiple runs
How it affects the pipeline:
  • Skips phases 3-6 (minibatch generation, taxonomy generation, update, review)
  • Goes directly to document labeling
  • Much faster for large datasets with known categories

Output Configuration

output_formats - Export Types

Available formats:
  • json - Machine-readable, good for integrations
  • csv - Spreadsheet-compatible, good for analysis
  • markdown - Human-readable reports, good for sharing

verbosity - Progress Output

Quick Exploration

Balanced Production

High-Quality Analysis

Cost-Optimized at Scale

Classifier Export & Reuse

After a successful run, you can save the trained classifier for later use without any LLM costs.

Saving a Classifier

The saved bundle includes:
  • The trained RandomForest model
  • Category mappings
  • Embedding model configuration
  • Training metrics for reference

Classifying New Documents

Classification only requires OpenAI embedding API calls - no LLM costs. This makes it very cost-effective for production use.

Training from Labeled Data

If you have your own labeled dataset (or corrected Delve output), train a classifier directly:
This is perfect for human-in-the-loop workflows: run Delve, review and correct labels, then train an improved classifier.
See the Classifier Export & Training guide for complete documentation.

Next Steps

How It Works

Understand the pipeline in depth

Examples

See complete code examples