Understanding how each parameter affects your taxonomy results
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.
The main model handles the “thinking” tasks: taxonomy generation, iterative refinement, and quality review.
Model
Strengths
Best For
anthropic/claude-sonnet-4-5-20250929
Excellent balance of capability and cost
Default choice, most use cases
anthropic/claude-opus-4
Highest reasoning capability
Complex domains, nuanced categories
anthropic/claude-haiku-4-5-20251001
Fast and cheap
Quick iterations, simple data
How it affects results:
More capable models → Better category definitions, more nuanced distinctions
Faster models → Quicker iterations but potentially less refined taxonomies
# High-quality taxonomy for complex datadelve = Delve(model="anthropic/claude-opus-4")# Quick iteration during developmentdelve = Delve(model="anthropic/claude-haiku-4-5-20251001")
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.
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
# Default: fast and cost-effectivedelve = Delve(fast_llm="anthropic/claude-haiku-4-5-20251001")# Higher quality labeling at higher costdelve = Delve(fast_llm="anthropic/claude-sonnet-4-5-20250929")
Claude Haiku is the recommended choice for most use cases. It’s significantly cheaper while maintaining good quality for summarization and labeling tasks.
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)
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.
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:
Action
Behavior
Cost Impact
"other" (default)
Label as “Other” category
None
"llm"
Re-label with LLM (max 20 docs)
Low-Medium
"keep"
Keep the classifier’s prediction
None
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
# Label uncertain predictions as "Other" (recommended for large datasets)delve = Delve( classifier_confidence_threshold=0.7, low_confidence_action="other",)# Re-label with LLM (small datasets only, max 20 docs)delve = Delve( classifier_confidence_threshold=0.7, low_confidence_action="llm",)# Keep classifier predictions regardless of confidencedelve = Delve( classifier_confidence_threshold=0.7, low_confidence_action="keep",)
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.
What it controls: How documents are selected for the initial sample.Available options:
random (default) - Simple random sampling
stratified - Reserved for future use
# Random sampling (default)delve = Delve(sampling_strategy="random")
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.
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:
# Generic (less helpful)delve = Delve(use_case="Categorize documents")# Specific (better results)delve = Delve(use_case="Categorize customer support tickets by issue type and urgency for routing to appropriate teams")# Domain-specific (best results)delve = Delve(use_case="Categorize e-commerce product reviews by: product quality issues, shipping problems, customer service interactions, and feature requests")
Much faster for large datasets with known categories
# From a filedelve = Delve(predefined_taxonomy="categories.json")# Inline definitiondelve = Delve(predefined_taxonomy=[ {"id": "1", "name": "Bug Report", "description": "Reports of software bugs or defects"}, {"id": "2", "name": "Feature Request", "description": "Requests for new features or enhancements"}, {"id": "3", "name": "Question", "description": "General questions about usage or functionality"},])
markdown - Human-readable reports, good for sharing
# All formats (default)delve = Delve(output_formats=["json", "csv", "markdown"])# Just what you needdelve = Delve(output_formats=["csv"]) # For spreadsheet analysisdelve = Delve(output_formats=["json"]) # For API integration