Using OpenTelemetry feedback to train small language models
· Do Minh Tuan · Future Pulse 🔮
A talk by Ben O'Mahony makes a case I have been waiting to hear someone make properly: stop paying frontier-model prices for work a small model could do, and use your own users' behavior to build the training data.
The mechanism he describes is to instrument your application with OpenTelemetry, the open standard for collecting traces and metrics, and log what users do with AI suggestions. Accept, dismiss, or ask for a rewrite. Each of those is a label. Collect enough of them and you can fine-tune a small language model that handles your specific task, cheaply and locally.
On the surface it is a tidy loop. In practice the loop depends entirely on whether those labels mean what you think they mean, and that is where I would spend my skepticism.
What distillation actually is
A frontier model is the big, expensive one that seems to know everything. A small language model, or SLM, is a compact model trained for a narrower job. Distillation is the process of using the big model's outputs, plus your own data, to teach the small one to behave well on your task.
That is not new. What is interesting here is where the labels come from. Most teams either pay people to label data or use a stronger model to grade a weaker one. O'Mahony's suggestion is to treat ordinary product usage as the labeling step.
If a developer accepts a suggested code fix, that is a positive example. If they reject it, negative. The telemetry already exists in most products; the insight is to point it at training instead of just dashboards.
Why accept and reject are weaker signals than they sound
Here is my problem with the clean version of this story. Accepting a suggestion does not mean the suggestion was good. It means it was good enough to stop thinking about. Developers accept fixes and then edit them. They accept a wrong answer because it is faster to correct than to write from scratch.
Rejecting is just as muddy. A suggestion can be technically right and still rejected because it does not match the team's style, or because the developer did not read it, or because the tool was slow that day.
None of that makes the approach useless. It makes the raw signal a starting point. If I were building this, I would log the edit that follows an acceptance, the file it landed in, and whether tests passed. That turns a weak label into a much better one, and it costs almost nothing extra.
There is also a selection effect worth naming. The users who keep using the tool are the ones whose workflow already fits it. Train only on their behavior and you build a model that is very good at serving people like them, which may be fine or may quietly narrow your product.
Logging a decision with OpenTelemetry is a handful of lines. Here is roughly what it looks like in Node, using the standard API:
const { trace } = require('@opentelemetry/api');
function logUserFeedback(suggestionId, userAction) {
const tracer = trace.getTracer('ai-feedback-collector');
const span = tracer.startSpan('record_user_action');
span.setAttribute('suggestion.id', suggestionId);
span.setAttribute('user.action', userAction);
span.end();
}
logUserFeedback('suggest-9912', 'accepted');
The interesting engineering is downstream. Where do those spans land, how long do you keep them, and how do you join them to the actual suggestion content and the final code? A span with an ID and a word is not a training example. You need the input, the output, and the outcome in one place.
That usually means a pipeline into a warehouse, plus a schema that will not fall apart when you change the prompt. Most teams underestimate this part by a lot.
The talk's other argument is that a self-hosted small model keeps user data private, unlike sending everything to a third-party API.
That is true, and it is also incomplete. If you log user interactions to build the dataset, you have created a store of user code and prompts inside your own infrastructure. The privacy benefit moves rather than disappears. You still need retention limits, access control, and a way to remove a customer's data.
For a team selling to European clients, this is not a detail. A training corpus built from customer code is the kind of thing that shows up in a security review, and 'we only use it internally' is not an answer that satisfies anyone.
If you have one narrow, repetitive task with high volume, such as classifying support tickets or generating a specific kind of code change, this approach makes sense. The task is stable, the output is checkable, and the volume justifies the engineering.
If your product does many things, or your task changes every month, a small model will be a maintenance burden. You will spend your time retraining instead of shipping, and the API bill you were trying to avoid will look cheap.
I would also push back on the framing that users label your data for free. They do not. They generate the signal as a side effect of doing their job, and you owe them a clear explanation of what you collect. That is a consent question, not a cost optimisation.
Start by logging, not training. Run the telemetry for a quarter, look at the distribution of outcomes, and see whether the accept rate is even meaningful. Many teams discover their tool is accepted so rarely that there is nothing to learn from.
Then start with evaluation rather than fine-tuning. Use the collected data to build a test set for the small model. If a small model already passes on your task, you do not need distillation, you need a cheaper prompt.
The idea is sound and the direction is right. I just think the hard part is the dataset, not the model, and the talk spends most of its time on the model.
Written with AI assistance, reviewed and edited by Do Minh Tuan.