wAIpoint
Italiano

NLP tasks (translation, extraction, dialogue)

Level: Beginner

What it is

NLP tasks are the concrete jobs we ask of language technology: translating between languages, extracting names, dates and facts from text, classifying a text (spam, sentiment, topic), answering questions, holding a dialogue. Benchmarks such as GLUE bundle several of them to compare models on the same footing.

What it is for

Choosing the right task shape is the first step of any language project. Many real needs are one of these in disguise: sorting support emails is classification, filling a form from a contract is extraction, a help desk bot is dialogue.

How to do it

The process, step by step. Libraries and tools change; these steps stay.

  1. Describe your need in one sentence and match it to a task: classify, extract, translate, summarise, answer, converse.
  2. Write down what a correct output looks like with ten real examples, including the awkward ones.
  3. Try a general language model with a clear prompt first; it often handles these tasks with no training.
  4. Measure it on a small labelled set with a fitting metric (accuracy for classification, exact match for extraction, human judgement for summaries).
  5. If a general model is too slow, expensive or unreliable, fine-tune a smaller model on your examples.
  6. Re-check on new data from time to time, since the language people use changes.

Timeline

  1. 2018GLUE: a multi-task benchmark for natural language understanding (Wang et al.). source

Sources