MLCrack

    NATURAL LANGUAGE PROCESSING Β· INTERVIEW QUESTION

    What is text classification?

    🟒 beginner · NLP

    Hint: Focus on the decision rule, assumptions, and failure mode behind nlp.

    Answer

    Text classification assigns labels to text, such as sentiment, topic, intent, or toxicity. The main issues are label quality, imbalance, drift, and calibration.

    Interview reasoning

    A routing classifier needs a stable taxonomy and an unknown-intent path. Predicting a known label for every input can send unsupported requests to the wrong workflow.

    Text classification predicts a label; intent detection identifies an action; slot filling extracts its parameters. Production assistants often need both sentence-level and span-level outputs, with abstention for unsupported intents. Evaluate the action and its required fields together, not only independent aggregate scores.

    Worked example. Classify an email as billing or technical support using a calibrated label distribution.

    Validation

    Evaluate per-label precision, calibration, out-of-scope rejection, and actual routing outcomes.

    Report per-intent PR, exact slot/span metrics and full-frame success, including ambiguity and missing required parameters.

    Common pitfalls

    Label frequency and overlapping definitions can conceal systematic confusion.

    A confident intent score does not validate extracted arguments. Rare intents and unsupported requests can disappear inside aggregate accuracy.

    Likely follow-up: Evaluate per-label precision, calibration, out-of-scope rejection, and actual routing outcomes.