AI EngineeringInterview preparation
Intermediate·Concept·2 min read

AI classifier

Practice this question

Overview

A classifier selects a category for input. An LLM classifier can handle varied wording with a bounded output label.

Why this matters

Requests need routing or prioritization before further processing.

An everyday example

Sort incoming mail into departments.

A technical example

Return claim_status, policy_question, or other.

How it works

  1. Define categories/examples
  2. Call rules/model
  3. Validate enum
  4. Route
  5. Measure errors.

Architecture and flow

Message → classifier → permitted route.

The insurance assistant example

Route complaints to a staff process rather than a FAQ answer.

When to use it

Language categories with sufficient evaluation examples.

When to avoid it

Exact routing by API endpoint or explicit user selection needs no model.

Interview answer

“Classification is a bounded decision; I test confusing boundaries and provide an unknown route.”

Benefits, trade-offs, and production considerations

Measure per-class precision/recall and asymmetric error costs. A classifier should not grant tool rights.

Adapted from 13_AI.MD · “AI classifier”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.