Week 4 · Wednesday 14 October 2026 · 10:00–13:00
AI for Business and FinTech · European School of Economics, Florence
| 1–3 | 23 Sep – 7 Oct | data, a model, and an honest evaluation ✓ |
| 4 | 14 Oct | call a model from code; make it cite your documents |
| 5 | 21 Oct | agents, tools, evals · the product lens |
| — | 1 Nov | case brief, 40% — on what you build today and next week |
From today you are building the thing you will be assessed on.
A feature is what you know at t; the target is what happens after. The base rate is the score to beat.
A shuffled split let the future leak into training. Nothing to the right of the wall may fit what is on the left.
A probability is not a decision: the threshold comes from the cost of each kind of error.
Calibration: when the model says 70%, does it happen 70% of the time?
| system prompt | who the model is, and what it must never do |
| the prompt | what you are asking, this time |
| temperature | 0 when the answer must be reproducible |
| schema | the shape the answer must have, validated |
And three numbers come back with every response, whether you look or not:
tokens in · tokens out · latency. Log all three from the first call. In week 10 you will need them to say what this costs at volume, and by then nobody remembers.
The schema stops your code crashing. It does nothing about whether the number in the field is real.
LAB · session.ipynb § A
T = 0 three times, then at T = 1 three times. Look at what changed.The model has never read your contract, your filing, or last month’s board pack. It was trained before they existed, and it cannot open a file.
Bet before we build
Two ways to fix this: paste the whole document into the prompt, or retrieve just the relevant part. When does the first one stop working?
At about the point where it becomes expensive, slow, and worse — models attend badly to the middle of very long inputs. Retrieval is the alternative, and it is four steps.
Not one word in common, and still the three nearest. That is what an embedding buys you.
LAB · session.ipynb § B
Corpus: risk sections from three filings, two whitepapers, a MiCA summary.
LAB · session.ipynb § B6
Write ten questions with answers you computed independently of the system.
Run them. Record hits and misses. For each miss, write retrieval or generation next to it.
That table is your evidence section in the case brief. Build it now, not the night before.
Homework 4 — extend the retrieval system with a corpus of your own, write ten test questions with expected answers, record hits and misses, and explain each miss as retrieval or generation.
Due Tuesday 20 October, 23:59.
Next week the model stops answering and starts acting — and everything that can go wrong, does.
AI for Business & FinTech · ESE Florence