🤖 AIPro Plano

AI_CLASSIFY

Classify text into one of the provided categories using AI

Assinatura da Fórmula
=AI_CLASSIFY(text, categories)

Retorna: string

Visão Geral

AI_CLASSIFY assigns a category label to any text based on a list of categories you define. Pass in a piece of text — a customer review, a support ticket, a social media mention, a product description — along with a comma-separated list of your categories, and the function returns the single most appropriate category. It is the simplest, most focused AI function in the Unlimited Sheets toolkit, designed to do one thing exceptionally well: sort text into the buckets you care about.

Parâmetros

ParâmetroTipoObrigatórioDescrição
textstringSimThe text to classify. Can be a cell reference containing any text content — reviews, tickets, messages, descriptions, etc.
categoriesstringSimA comma-separated list of category labels the text should be classified into. The function returns exactly one of these categories.

Exemplos

1

Sentiment analysis on customer reviews

Classifies a customer review as Positive, Negative, or Neutral.

fx
=AI_CLASSIFY(A2, "Positive, Negative, Neutral")

Entrada

The product quality is amazing but delivery was slow. Overall happy with my purchase.

Saída

Positive
2

Route support tickets by topic

Automatically routes support tickets to the right team by classifying the topic.

fx
=AI_CLASSIFY(A2, "Billing Issue, Bug Report, Feature Request, Account Access, General Inquiry")

Entrada

I was charged twice for my subscription this month. Can you issue a refund for the duplicate charge?

Saída

Billing Issue
3

Classify job applications by department

Sorts incoming applications into department categories based on the cover letter or resume summary.

fx
=AI_CLASSIFY(A2, "Engineering, Design, Marketing, Sales, Operations, Finance")

Entrada

Experienced full-stack developer with 5 years of React and Node.js experience looking for a senior engineering role.

Saída

Engineering
4

Detect email intent

Classifies inbound emails by intent to prioritize responses.

fx
=AI_CLASSIFY(A2, "Purchase Intent, Support Request, Partnership Inquiry, Spam, Newsletter Signup")

Entrada

We would love to explore a potential integration between our platforms. Would your team be open to a partnership call?

Saída

Partnership Inquiry
5

Content type detection

Automatically tags content pieces by type for a content management system.

fx
=AI_CLASSIFY(A2, "How-To Guide, Product Review, News Article, Opinion Piece, Case Study, Tutorial")

Entrada

In this article, we walk you through setting up your first CI/CD pipeline using GitHub Actions, step by step with code examples.

Saída

Tutorial

Casos de Uso

Customer Support

Customer Feedback Triage

Automatically classify incoming customer feedback into categories like Product, Service, Pricing, UX, and Delivery to route issues to the appropriate team and identify trending complaint areas.

Brand Management

Social Media Monitoring

Classify social media mentions by sentiment and topic to understand brand perception in real time. Flag negative mentions for immediate response while tracking positive sentiment trends.

Publishing

Content Tagging for CMS

Automatically tag articles, blog posts, and media content by topic, format, and audience segment to improve content organization and discovery on your website.

Sales

Lead Scoring and Qualification

Classify inbound lead messages as Hot, Warm, or Cold based on the language and intent expressed, enabling sales teams to prioritize follow-ups on the most promising opportunities.

Market Research

Survey Response Categorization

Categorize open-ended survey responses into themes (e.g., pricing concerns, feature requests, competitor mentions) to quantify qualitative feedback across thousands of responses.

Legal

Document Classification for Compliance

Sort legal documents by type — contracts, amendments, NDAs, notices, invoices — to ensure proper filing, retention policies, and review workflows are applied automatically.

Dicas Profissionais

DICA

Add an "Other" category to your list as a catch-all. This prevents the AI from forcing a poor fit when the text truly does not match any of your defined categories.

DICA

Use COUNTIF on the classified column to instantly see the distribution of categories. Combine with a pivot table or chart for a visual dashboard of your classification results.

DICA

Store your categories in a single cell (e.g., D1 = "Bug, Feature, Billing, Other") and reference that cell in all AI_CLASSIFY formulas. This way, updating your category list in one place updates all formulas simultaneously.

DICA

For sentiment analysis, use more granular categories than just "Positive" and "Negative". Try "Very Positive, Positive, Neutral, Negative, Very Negative" for a 5-point sentiment scale that captures nuance.

DICA

Test your category list on a small sample first. If the AI frequently picks the wrong category, your labels might be too similar or ambiguous. Rename categories to be more distinct and descriptive.

The strength of AI_CLASSIFY is its flexibility. You define the categories, and the AI understands them semantically. Unlike rule-based classification that depends on keyword matching (and breaks when customers use unexpected phrasing), AI_CLASSIFY understands meaning and context. A customer writing "the widget stopped working after a week" gets correctly classified as "Product Issue" even though neither of those exact words appears in the complaint. Categories can be as broad as "Positive, Negative, Neutral" for sentiment analysis or as specific as "Billing Issue, Feature Request, Bug Report, Account Access, General Inquiry" for support ticket routing.

AI_CLASSIFY is designed for high-throughput classification workflows. Place your text in one column, define categories once in a cell or directly in the formula, and drag down to classify hundreds or thousands of rows instantly. Because it returns a single string (the category name), the output is immediately usable with COUNTIF, FILTER, pivot tables, and conditional formatting. This makes it the fastest path from raw unstructured text to actionable, filterable, analyzable data in your spreadsheet. For more complex classification where you need to learn from examples rather than predefined categories, use AI_FILL instead.

Erros Comuns

#ERROR! Categories list is empty

Causa: The categories parameter is empty or references an empty cell.

Correção: Provide a comma-separated list of categories. Example: "Positive, Negative, Neutral". Ensure the cell reference contains text if you are referencing a cell.

#VALUE! Text is empty

Causa: The text parameter is empty or references an empty cell.

Correção: Provide text to classify. Ensure the referenced cell contains content. Check for formulas that might return empty strings.

#ERROR! Too many categories

Causa: The categories list contains an extremely large number of options, exceeding practical limits.

Correção: Reduce your category list to 20 or fewer options. For more categories, use a hierarchical approach: classify into broad groups first, then sub-classify.

Perguntas Frequentes

AI_CLASSIFY always returns exactly one category — the most appropriate match based on the overall text meaning. If you need multi-label classification (assigning multiple categories), use UNLIMITED_AI with a prompt like "Which of these categories apply to this text? Return all that apply: [categories]".

There is no hard limit, but accuracy tends to decrease with too many categories. Up to 15-20 categories works well. Beyond that, consider creating a hierarchical classification: first classify into broad groups, then sub-classify each group with a second AI_CLASSIFY call.

Yes, descriptive category names produce better results. "Billing Issue" works better than "Type A". The AI uses the semantic meaning of category names to understand what belongs in each. Use clear, human-readable labels.

Yes, AI_CLASSIFY works with text in any language supported by the underlying AI model. You can classify Spanish text into English categories, or use categories in the same language as the input text. Both approaches work well.

AI_CLASSIFY uses predefined category labels — you tell it the categories upfront. AI_FILL learns categories from examples — you show it what category each example belongs to. Use AI_CLASSIFY when you know your categories and have clear labels. Use AI_FILL when the categorization pattern is complex and better demonstrated through examples.

AI_CLASSIFY returns only the category label for simplicity. If you need confidence scores, use UNLIMITED_AI with a prompt like "Classify this text and include a confidence percentage: [text]. Categories: [list]".

The function will always return one of the provided categories, choosing the closest match. To handle edge cases, add an "Other" or "Uncategorized" option to your category list. This gives the AI a safe fallback for text that does not clearly match any specific category.

Even short texts (a single sentence) can be classified accurately when the meaning is clear. However, very short or ambiguous texts (1-2 words) may produce inconsistent results. For best accuracy, provide at least a full sentence of context.

Funções Relacionadas

Comece a usar AI_CLASSIFY hoje

Instale o Unlimited Sheets para obter AI_CLASSIFY e outras 41 funções poderosas no Google Sheets.