Art of DS

Appearance

Palette
Theme
Unlock $20 one time
Sign in, or create an account

Sign in to Art of DSCreate your Art of DS account

We email you a link and a six-digit code. Either one signs you in; there is no password.Enter your email. We send a link and a six-digit code to confirm it — no password to remember. The account is free.

  • You come back to this page, right where you were.
  • Already have an account? The same email simply signs you in.

By continuing you accept the Terms and the Privacy policy.

Your account

Free accountLifetime access

NLP · 9 compared

NLP tasks

Definition

Nine tasks arranged by the one thing that separates them — how large the space of acceptable answers is. Read the “Scored by” column first.

Comparison

Name What the task is Takes Returns Scored by Breaks when
Text classification One text in, one label out. Sentiment, topic, spam, intent. The oldest and still the most deployed shape in NLP, and the only one whose metric nobody argues about. Full page →one texta labelaccuracy, F1classes are rare or shift
Natural language inference Two texts in, one label out — does the first entail the second, contradict it, or neither. The standard probe for whether a model handles relations between sentences rather than topics. Full page →a pair of textsa labelaccuracythe hypothesis alone predicts it
Sequence tagging A label per token — named entities, parts of speech, chunk boundaries. The output is still discrete, but it is now structured, so a single wrong token can invalidate a whole span. Full page →one texta label per tokenspan-level F1the tokenizer splits an entity
Extractive question answering A question and a passage in, a span of that passage out. The answer is constrained to text that already exists, which is exactly what makes the task scorable and what limits it. Full page →question + passagea spanexact match, token F1the answer is not in the passage
Semantic search A query in, a ranked list out. Precompute a vector per document, compare with cosine, and the collection can be arbitrarily large because nothing is quadratic. Full page →a querya rankingrecall@k, MRR, nDCGrelevance is unlabelled
Clustering and deduplication No query at all — just the geometry. Group or de-duplicate a collection by distance between embeddings. The task a cross-encoder structurally cannot do. Full page →a collectiona partitionagainst a labelling, or not at allthe number of groups is unknown
Machine translation A sequence in, a different-language sequence out, with no alignment between them. The task that produced the encoder-decoder, attention, and the first honest arguments about evaluating generated text. Full page →one textnew textBLEU, chrF, humanone reference is not enough
Summarisation A long text in, a short one out. Extractive summarisation picks sentences and stays scorable; abstractive summarisation writes new ones and does not. Full page →one long textnew textROUGE, humanthe summary is right and unlike the reference
Open-ended generation A prompt in, whatever comes next out. There is no reference, the set of good answers is unbounded, and the decoding rule matters as much as the model. Full page →a promptnew texthuman, or a model asked to judgeyou optimise the automatic proxy

On the cheat sheet: NLP tasks →

Read the Scored by column first. Everything else on this page — which architecture, which pretrained model, how much data — is downstream of whether you can tell a good output from a bad one, and that is decided entirely by how many different answers would have been acceptable.

The tasks differ by the size of their answer space, and nothing else matters as much

what it can be scored againsta labela span, or a rankingnew textexactly right, or notoverlap with a referencesomebody’s judgementclassificationinferencetaggingextractive QAsearchtranslationsummarisationopen generationwhat the task returns
Tasks are not really distinguished by subject matter — they are distinguished by how big the space of correct answers is, and everything else follows from that. A label has one right answer, so accuracy means what it says. A span has a few near-misses, so scoring softens into overlap. Free text has an unbounded set of good answers, so the metric becomes a judgement and the evaluation is now the hard part of the problem. That is why the grid fills along the diagonal and why the top-right cell is permanently empty: there is no exact-match score for a paragraph. Note what this predicts about the current habit of doing every one of these tasks by generating text — it moves the work from the left column to the right one, and takes the reliable metrics away with it.

Stated as a table the nine rows look like nine subjects. Plotted by what they return and what they can be scored against, they collapse onto a diagonal, and the two empty corners are the interesting part.

There is no cell for free text scored by exact match, because there is no single correct paragraph. There is no cell for a label scored by judgement, because a label does not need one. Every task lives somewhere on the line between those, and moving right along it — label, span, ranking, sentence, paragraph — costs you the metric.

d2l organises the same territory by a different cut, "two popular and representative downstream natural language processing tasks: sentiment analysis and natural language inference, which analyze single text and relationships of text pairs, respectively" [3, ch. 16, introduction]. That split — one text or two — is the second axis worth keeping, and it is what decides whether you can precompute anything.

One text or two changes what you are allowed to precompute

If a task scores a pair, the naive implementation reads both together, and then nothing can be computed in advance. Reimers and Gurevych give the cost: finding the most similar pair among 10,000 sentences "requires about 50 million inference computations (~65 hours) with BERT" [2, Abstract], and the same construction "makes it unsuitable for semantic similarity search as well as for unsupervised tasks like clustering" [2, Abstract].

The two rows in this table that operate on whole collections — semantic search and clustering — are therefore not "pair tasks done many times". They are a different shape, and they require a representation that exists independently of what it will be compared to. That is what sentence embeddings are for.

What pretraining changed, and what it did not

Pretraining made the input side of every row interchangeable. A single pretrained representation can be "fed to various models for different downstream natural language processing tasks" [3, ch. 16, introduction], which is why the architecture column that would have dominated this table in 2015 is not in it at all.

Prompting went further and made the model interchangeable too. GPT-3 was evaluated across this whole range — "translation, question-answering, and cloze tasks, as well as several tasks that require on-the-fly reasoning or domain adaptation" — with, for every one of them, "no gradient updates or fine-tuning" [1, Abstract]. One set of weights, nine rows.

What did not change is the right-hand side of the table. The answer space of summarisation is exactly as large as it was, and the metric is exactly as unreliable.

The trap this table exists to name

Doing every task by generating text is convenient and it silently moves rows rightward on the grid. A classification problem answered by a generated word is no longer scored by accuracy on a fixed label set — it is scored by whether a string matches, which is a worse-behaved measurement wearing the same name. The convenience is real; the cost is that you have swapped a metric that works for one that needs care.

Where that matters most is the bottom row, and it has a specific failure mode worth stating: optimising the automatic proxy. On open-ended generation the proxy and the goal come apart in the direction nobody expects — see decoding, where the text a model considers most probable is reliably its worst. Any row you move into the bottom-right cell inherits that problem.

A practical reading of the table. Keep a task as far left as your product allows. If a label will do, classify. If a span will do, extract. Generate when the task genuinely has an open answer — and when you do, decide how you will know whether it worked before you build it, because that is the part the model will not solve for you.

Sources

  1. Brown, Mann, Ryder, Subbiah, Kaplan, Dhariwal, et al.. Language Models are Few-Shot Learners (2020)paperhttps://ar5iv.labs.arxiv.org/html/2005.14165
  2. Reimers, Gurevych. Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks (2019)paperhttps://ar5iv.labs.arxiv.org/html/1908.10084
  3. Zhang, Lipton, Li, Smola. Dive into Deep Learning — Natural Language Processing: Applicationsbook · retrieved 2026-09-13https://d2l.ai/chapter_natural-language-processing-applications/index.html

Have a promo code?

A code that takes 100% off unlocks everything at once. A smaller one takes its share off the price in the payment window: enter the same code there.

Write to support

A question, a problem with access, a refund? Write to us and we answer by email.

What is it about?

Your address is used only to answer you.

Message sent

Thank you. We will reply to the address you gave, by email.

Or write to us directly

support@artofds.com

Message sent Thank you. We will reply to the address you gave, by email.

Check the email address: we need it to reply.

That is our own address. Enter yours, so the reply reaches you.

This address cannot receive email. Check it for a typo.

Write a little more: at least 10 characters.

Too many messages in a short time. Try again in a few minutes.

The message could not be sent. Please write to us directly: support@artofds.com