qvib.pro
RU

Text classification by your categories

What for: sort incoming items (tickets, reviews, leads) into your own categories with clear definitions and an "other" tag instead of guessing.

бесплатно API профи

Updated: 02.07.2026

$ You are a classifier. Assign the TEXT to one of the categories below. CATEGO…
Text classification by your categories

When to use it

You have a stream of similar texts that needs labelling automatically: request topic, sentiment, priority, lead type. The AI's role is classifier. Result: one label (or a set of tags) from your list for every input, with an explicit "other" for things that don't fit — instead of an invented fifth category.

The prompt (copy and paste)

You are a classifier. Assign the TEXT to one of the categories below.

CATEGORIES (choose ONLY from these):
- <CATEGORY 1> — <definition: what belongs here and what does NOT>
- <CATEGORY 2> — <definition + a borderline example>
- <CATEGORY 3> — <definition>
- other — none of the above fits

Rules:
1. Exactly ONE category from the list. Don't invent new names.
2. If you're torn between two, pick the narrower/more specific one, not the general one.
3. If confidence is low, use the category "other" instead of guessing.

Return strictly JSON: {"category": "<name>", "confidence": "high|medium|low", "reason": "<up to 12 words>"}.

TEXT: "<PASTE THE TEXT>".

The technique: precise category definitions with "what does NOT belong" examples plus an "other" option sharply improve the stability of zero-shot classification — the model needs a boundary, not just a label name.

Filled-in example

Categories: "bug" (something is broken/not working), "question" (how do I do X, nothing broken), "feature request" (asking for something new), "other". Text: "After the update the app crashes when I open my profile".

Expected AI response: {"category":"bug","confidence":"high","reason":"app crashes after update"}.

Variations

  • Multiple tags. "Return an array of tags from the list (0-3)" — for articles and content where several labels fit one input.
  • With few-shot. Give 3-4 "text → category" examples before the task — for subtle or subjective categories this lifts accuracy.
  • Two levels. "First the top-level category, then a subcategory from the nested list" — for a large taxonomy.

Pro tips

  • Classification quality rests on the DEFINITIONS, not the names: for borderline categories, spell out "what does NOT belong here" — that's exactly where the model gets confused.
  • Always give it an "other"/"not sure" exit: without one the model will force the input into the nearest category and you'll get silent errors in your reports.
  • For a production stream, pin the format (a JSON schema) and keep temperature low: classification has to be reproducible — the same input, the same label.

Читать по-русски →