Text Classification Baseline
Build a simple, honest baseline for text.
The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.
Plan a text classification baseline. Texts, labels and class counts: [DATA_SUMMARY]. Goal: [GOAL]. Describe a pipeline: cleaning, splitting before any fitting, a bag-of-words or TF-IDF representation, a linear classifier, evaluation with metrics suited to the class balance, and confusion matrix. Provide Python code using common libraries with notes to confirm syntax in current documentation. Include a simple error review of 20 misclassified examples, a comparison with a trivial baseline, and a list of when to consider more complex models. Add privacy and fairness checks for text containing personal information. Add a short list of text-cleaning decisions that can hurt, such as removing negations or stripping numbers that matter, and how to test their effect. Include a template for the final comparison table of baseline versus any more complex model, with the difference and the cost of the extra complexity. Also include guidance on how many examples per class are needed before the results mean anything, and how to handle a class with very few examples.
Fill in before use
Optional: type your details and the prompt above updates. Nothing is saved or sent.
Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.
See an example result (fictional data)
Data: 8,000 support tickets, 4 classes (billing 55%, bug 25%, access 15%, other 5%). Pipeline: split first (80/20, stratified) then TF-IDF (1-2 grams, min_df 3) then logistic regression. Trivial baseline: always "billing" = 55% accuracy. Result (illustrative): accuracy 83%, macro F1 0.71; "other" recall 0.38. Error review of 20 misses: 8 ambiguous tickets, 6 label errors, 4 short texts, 2 genuine confusions. Next: fix labels and class weights before trying heavier models. Check the text for personal data before sharing outputs.
Illustrative only, made-up data. Your results will differ and must be reviewed.