16. Capstone: Banking Complaint Intelligence
Use one business problem to connect classical NLP, Transformers, retrieval and MLOps.
01 Learning objectives
By the end of this module, you should be able to explain the concept in plain language, connect it to a use case, and recognize when it is — and is not — appropriate.
-
Objective 1
Build a classical baseline.
-
Objective 2
Compare with a Transformer classifier.
-
Objective 3
Add semantic search/RAG.
-
Objective 4
Design production controls.
02 Phase 1 — Classical baseline
Dataset: complaint text + resolution/category label.
Pipeline:
clean_text → TF-IDF (1,2 grams) → Logistic Regression → category probability
Start here because it is fast, explainable and provides a benchmark.
03 Phase 2 — Transformer classifier
Fine-tune an encoder model for the same labels.
Compare:
- macro F1,
- minority-category recall,
- latency,
- training/inference cost,
- explainability.
04 Phase 3 — Investigator retrieval
Embed historical resolved complaints and policy documents. Retrieve similar cases or policy passages for a new complaint.
05 Phase 4 — RAG assistant
Combine:
- complaint record,
- structured customer/account facts,
- retrieved policy,
- similar historical cases,
- LLM-generated investigator summary.
Keep human review for consequential decisions.
06 Phase 5 — Production controls
Version the model/tokenizer/index, capture predictions and confidence, monitor drift, test policy grounding, enforce metadata access controls, and preserve audit traces.
07 Pitfalls and nuances
These are the mistakes most likely to create a wrong mental model or a weak implementation.
-
Pitfall 1
Jumping straight to an LLM without a baseline.
-
Pitfall 2
Using generated text as an unreviewed final decision.
-
Pitfall 3
Mixing training/test periods in ways that leak future information.
08 Checkpoint questions
Try answering these without looking back at the module. If the explanation is clear in your own words, you are ready to continue.
-
Check 1
Which component should be your benchmark?
-
Check 2
What would justify the extra cost of a Transformer?
-
Check 3
What controls would you require before using RAG in a regulated workflow?