Skip to main content

Lesson 6 — Recap and FAQ

The five lessons in one page

Lesson 1 — why it is hard. Language is ambiguous at every level, its meaning depends on context far beyond the sentence, and most of what is communicated is inferred rather than stated. Rule-based grammars failed because exceptions outnumbered rules and real text is not grammatical.

Lesson 2 — tokenisation. Subword tokenisation keeps frequent words whole and splits rare ones into recurring fragments, giving a fixed vocabulary that handles any string. It explains token pricing, the higher cost of non-English text, and why models are unreliable at counting letters.

Lesson 3 — embeddings. Learned vectors place words used in similar contexts near each other, turning meaning into geometry so similarity becomes a dot product. Contextual embeddings compute a different vector per occurrence, which resolves ambiguity by construction.

Lesson 4 — the tasks. Classification, entity recognition, translation between major languages, extractive summarisation and transcription are reliable. Generative summarisation and question answering are fluent and can fabricate. Extractive output can be verified; generative output must be reviewed.

Lesson 5 — the limits. Facts are not represented, bias is inherited faithfully, thousands of languages are poorly served, robustness is thin, and benchmark scores overstate real performance.


From business need to approach

You need toApproachNote
Route tickets to the right teamfine-tuned classifiera few hundred examples per class
Extract fields from invoices or contractsentity recognition, annotatedannotation is the project
Search your documents by meaningembeddings plus vector searchno labels needed
Answer questions about your documentsRAG: retrieve, then generate with citationsnever generate without retrieval
Translate your product interfacea translation model plus human reviewterminology needs adapting
Summarise long reportsextractive if it will be acted onabstractive needs verification
Transcribe callsa speech modelcheck accents and jargon
Gauge customer sentimentclassifier, aspect-based if possibleone label per review loses information
Detect duplicate contentembeddings plus similarity thresholdfast and reliable

Glossary

TermWhat it means
Tokenthe unit a model processes, roughly three-quarters of an English word
Tokeniserthe component that cuts text into tokens, learned from a corpus
Embeddinga learned vector representing a token or a whole text
Contextual embeddingan embedding computed from the surrounding sentence
Bag of wordsrepresenting text by word counts, order discarded
TF-IDFword counts weighted down for words that appear everywhere
Corpusthe body of text a model was trained on
Fine-tuningadapting a pre-trained model to your task
Zero-shotasking a model to do a task with no examples
Few-shotgiving a handful of examples in the prompt
NERnamed entity recognition: finding people, places, amounts
RAGretrieval-augmented generation: retrieve documents, then answer
Extractiveoutput quoted from the source, verifiable
Abstractiveoutput composed by the model, may fabricate

The 12 questions people actually ask

1. Should I fine-tune a model or just prompt a large one?

Prompt first, because it costs nothing to try and tells you quickly whether the task is feasible. Fine-tune when you need consistent output format, lower cost per request at volume, better accuracy on a narrow task, or when your data cannot leave your premises. A fine-tuned small model frequently beats a giant prompted one on a specific classification task, at a fraction of the cost.

2. How much labelled data do I need for classification?

Fine-tuning a pre-trained model typically works from a few hundred examples per class, and a few thousand is comfortable. Before that, embeddings with nearest-neighbour assignment can work from twenty examples. Consistency matters more than volume: if your annotators disagree, that disagreement caps your accuracy.

3. Which library should I use?

Hugging Face Transformers for anything involving pre-trained models, which is most things. spaCy for fast, production-oriented pipelines with entity recognition and linguistic annotation. scikit-learn for classical baselines, which are still worth measuring. sentence-transformers for embeddings.

4. Do embeddings work across languages?

Multilingual embedding models place equivalent text from different languages near each other, so you can search French documents with an English query. Quality varies by language and follows the same availability pattern as everything else: strong for well-resourced languages, weaker elsewhere.

5. How do I stop a model inventing facts?

You cannot stop it, and you can constrain it substantially. Retrieve the relevant source passages and instruct the model to answer only from them; require citations so a human can verify; prefer extractive methods where possible; and keep review in the loop wherever the output is acted upon. Treating fabrication as a design constraint rather than a bug leads to better systems.

6. Is my data sent to a third party?

If you call a hosted API, yes, your text leaves your infrastructure — check the retention and training terms carefully, especially for personal or confidential content. Open-weight models running on your own hardware avoid this entirely, at the cost of operating them. For regulated data this is usually the deciding factor rather than model quality.

7. What is the difference between NLU and NLG?

Natural language understanding covers interpreting input: classification, extraction, intent detection. Natural language generation covers producing output: summarisation, translation, writing. Modern models often do both, and the distinction remains useful because the reliability profile is very different, as lesson 4 showed.

8. Can NLP handle mixed languages in one message?

Multilingual models cope reasonably with code-switching, which is common in many regions and rare in benchmark datasets. Expect degradation, and test explicitly on real examples if your users write this way, because the public evaluations will not tell you.

9. How do I evaluate a summarisation system?

Automated metrics comparing against a reference summary correlate only loosely with quality, so they are useful for tracking regressions and misleading as a quality claim. For anything consequential, have humans score a sample on faithfulness to the source and usefulness, and specifically count fabricated statements.

10. Are large models always better than small ones?

No. On a narrow, well-defined task with training data, a small fine-tuned model regularly matches or beats a large general one, while costing far less, responding faster and behaving more predictably. Large models earn their cost on open-ended tasks where you cannot enumerate what will be asked.

11. What is prompt engineering, really?

Writing the input so the model produces what you want: being specific about the task, providing examples, stating the output format, and giving the model the context it needs. It is genuinely effective and it is not a substitute for retrieval when facts matter, or for fine-tuning when consistency matters.

12. Where should I go after this course?

Large Language Models for where NLP stands today, Generative AI for the production side, and Ethics of AI for the bias questions raised in lesson 5.


Ready to build text systems?

The premium catalogue covers fine-tuning, RAG, embeddings at scale and production text pipelines, with a verifiable certificate after a 40-question examination. Included in every paid plan.


Last stepTake the quiz and see your attestation →