Skip to Content
API ReferenceClassification Tools

Classification Tools

Tools for classifying business descriptions to NAICS codes.

classify_business

The primary classification tool. Provides detailed analysis with reasoning, confidence scoring, and cross-reference checks.

Parameters

ParameterTypeRequiredDefaultDescription
descriptionstringYes—Business description (10-5000 chars)
include_reasoningbooleanNotrueInclude classification reasoning
check_cross_refsbooleanNotrueCheck for exclusions

Response

{ "recommended": { "code": "311111", "title": "Dog and Cat Food Manufacturing", "description": "This industry comprises establishments...", "confidence": 0.91 }, "alternatives": [ { "code": "311119", "title": "Other Animal Food Manufacturing", "confidence": 0.67, "reason": "If products include food for animals other than dogs/cats" } ], "reasoning": { "primary_match": "Organic dog treats manufacturing aligns with dog food production", "key_factors": [ "Manufacturing activity", "Dog-specific product", "Food/treats category" ] }, "cross_references": { "warnings": [ { "text": "Pet stores are classified in 453910", "applies_if": "Business primarily operates retail stores" } ], "see_also": [ { "code": "453910", "title": "Pet and Pet Supplies Retailers", "reason": "For retail operations" } ] } }

Examples

Basic classification:

{ "description": "Company that manufactures organic dog treats from locally sourced ingredients" }

With options:

{ "description": "Web development agency specializing in e-commerce sites", "include_reasoning": true, "check_cross_refs": true }

classify_batch

Classify multiple business descriptions in a single call. Efficient for bulk processing.

Parameters

ParameterTypeRequiredDefaultDescription
descriptionsarrayYes—Array of descriptions (max 100)
include_confidencebooleanNotrueInclude confidence scores

Response

{ "results": [ { "index": 0, "description": "Pizza restaurant with dine-in and delivery", "code": "722513", "title": "Limited-Service Restaurants", "confidence": 0.89 }, { "index": 1, "description": "Accounting firm for small businesses", "code": "541211", "title": "Offices of Certified Public Accountants", "confidence": 0.94 }, { "index": 2, "description": "Auto repair shop", "code": "811111", "title": "General Automotive Repair", "confidence": 0.91 } ], "summary": { "total": 3, "high_confidence": 3, "low_confidence": 0, "failed": 0 } }

Example

{ "descriptions": [ "Online clothing retailer", "Coffee roasting company", "Mobile app development agency", "Dental clinic" ], "include_confidence": true }

Best Practices

  • Review low-confidence results manually
  • Use classify_business for items needing detail
  • Batch related descriptions together for context

validate_classification

Verify whether a proposed NAICS code is appropriate for a business description.

Parameters

ParameterTypeRequiredDescription
descriptionstringYesBusiness description
proposed_codestringYesNAICS code to validate

Response

When valid:

{ "valid": true, "proposed": { "code": "541511", "title": "Custom Computer Programming Services" }, "confidence": 0.87, "notes": [ "Good match for custom software development", "Consider 541512 if focus is on systems design" ], "cross_references": [] }

When invalid:

{ "valid": false, "proposed": { "code": "722511", "title": "Full-Service Restaurants" }, "confidence": 0.23, "reason": "Description indicates limited-service (no table service)", "suggested": { "code": "722513", "title": "Limited-Service Restaurants", "confidence": 0.91 } }

Example

{ "description": "Fast food restaurant with drive-through", "proposed_code": "722511" }

Use Cases

  • Verifying existing classifications
  • Auditing historical data
  • Second-opinion on uncertain classifications
  • Compliance verification

Confidence Score Interpretation

ScoreInterpretationRecommended Action
0.90+Very high confidenceAccept classification
0.75-0.89High confidenceAccept, note alternatives
0.50-0.74Moderate confidenceReview alternatives
0.30-0.49Low confidenceAsk clarifying questions
Below 0.30Very low confidenceGather more information

Workflow Integration

Standard Classification Flow

1. classify_business(description) │ ├─ confidence >= 0.75 │ └─ Return recommendation with cross-ref warnings │ └─ confidence < 0.75 ├─ get_siblings(code) for alternatives └─ Present options to user

Validation Flow

1. validate_classification(description, code) │ ├─ valid == true │ └─ Confirm classification │ └─ valid == false ├─ Explain why invalid └─ classify_business(description) for alternatives