Project E: an NLP system end to end
Be able to build, evaluate and serve an NLP system with tests and evals.
Prerequisites
- EBuild an eval harnessrequired
- EBuilding an API with FastAPIrequired
- EText classification with transformersrequired
Intuition
Project E: a complete, runnable NLP system. A suggestion: classify incoming support tickets (category plus urgency) and expose it as an API.
Deliverables:
- Data: ≥ 800 labelled examples (your own, synthetic with review, or an open dataset), a guideline, κ on a sample, a stratified train/val/test split.
- Baselines: majority class plus TF-IDF/LR, tuned.
- Model: a fine-tuned encoder; macro-F1 with a bootstrap CI; a confusion matrix; an error analysis of 30 cases.
- Service: FastAPI with validation, /healthz, a 503 degradation (fall back to the TF-IDF model when the transformer is missing!), logging without the text.
- CI: tests plus the eval harness with a threshold and a regression list.
- Report: the hypothesis, the method, the results with uncertainty, the limitations, the reproducibility information (commit, data hash, seeds).
Interactive
An assessment matrix (apply it to yourself before you hand in):
| Part | Pass | Strong |
|---|---|---|
| Data | a split without leakage | κ reported, edge cases in the guideline |
| Baseline | exists | tuned, with a CI |
| Model | beats the baseline | beats it outside the CI, the error analysis leads to action |
| API | answers correctly | validation, the 503 fallback tested |
| CI | tests green | an eval threshold plus regressions block the merge |
| Report | complete | negative results and limitations reported |
The most common shortcoming: the report has no uncertainty and the baseline is untuned. The second most common: the fallback exists in the code but has never been run.
Mastery means
- Builds an NLP system end to end: data → fine-tuned model → API
- Has tests, an eval harness in CI and a degraded mode
- Reports the results with a baseline and uncertainty
Sign in to do the exercises and build your mastery up.
Sources
- Hugging Face — dokumentation (Apache-2.0) — Apache-2.0
- scikit-learn User Guide (BSD-3) — BSD-3-Clause
- FastAPI — dokumentation (MIT) — MIT