Advanced level · Module 6: Transformer Architecture and Modern NLP · Lesson 4 of 4
Large Language Models in NLP Systems
Learners place large language models in the NLP toolbox: what they do well, how to evaluate them on NLP tasks and when a small task-specific model is the better choice. Prompting and RAG application building are covered in the AI programme.
In this lesson you will
- Evaluate an LLM on a defined NLP task
- Decide between an LLM and a task-specific model
Key concepts
zero-shot and few-shot classificationtask evaluation setshallucinationcost, latency and privacysmall vs large models
The lesson
Large decoder models can classify, extract and summarise from instructions without task-specific training. For NLP engineering, the question is not 'can it?' but 'how well, at what cost, and on which languages?'.
Evaluate an LLM like any model: the same test set, the same metrics and per-language results. Record failures such as invented entities (hallucination) and inconsistent labels.
Small task-specific models are often cheaper, faster, private (they run locally) and easier to control. LLMs may help with low-data tasks in well-resourced languages. Building assistants with prompting and retrieval is taught in Rescue Academy's AI programme; this lesson focuses on evaluation and choice.
Step by step
- Define a classification task and a 100-message test set.
- Evaluate an available language model with a fixed few-shot prompt, sending no personal data.
- Compare its F1 with the fine-tuned model, overall and by language.
- Write a choice recommendation including cost and privacy.
Practice activity
Write an evaluation-based recommendation choosing between an LLM and a task-specific model for enquiry routing.
Expected result: A measured comparison and a recommendation that considers accuracy, languages, cost and privacy.
Check your understanding
-
How should an LLM be evaluated for a classification task?
Show answer
On the same labelled test set and metrics as other models, including per-language results.
-
Give one reason to prefer a small local model.
Show answer
For example lower cost, faster responses, privacy or easier control.
Further learning
Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.