03Engineering
Engineering

Context is the work

AAMEAndré Alves, Matchlytics EngineeringApr 22 · 20263 min readEngineering

A stroke model that looks only at the ball and the racquet can tell you what kind of hit just happened. That's table stakes. It won't tell you whether that hit mattered, whether it was the right choice, or whether it changed the match.

Getting to any of those answers is not a question of accuracy. It's a question of context.

24kLabeled strokes in training set
94%Raw model accuracy
8+Context signals per stroke
A single moment — and everything that has to wrap around it for the moment to mean anything.

What context actually is

For us, "context" is not a vibe. It's a structured bundle of signals that surround every single event the camera sees. When a ball comes off the glass and gets hit, the model doesn't just see frame[t]. It sees:

  • The court side the hitter is on, and which role they usually play there.
  • The rally phase — first three shots, mid-rally trade, net battle, scramble.
  • Who hit the previous shot, and what type it was.
  • Where both opposing players are standing, and where they've been standing for the last two seconds.
  • Whether this rally is on a break point, a set point, a deuce, or nothing in particular.
  • The score pressure — is the hitter up a break, down two games, or level?

That list isn't exhaustive. It is also not optional.

The mistake of a context-free model

The first version of our bandeja classifier was context-free. Give it a clip of the overhead, it gives you a label. Bandeja, víbora, bajada. 94% on our held-out set. We shipped it, coaches used it, players saw it.

Then we listened to the coaches.

The complaint was not about accuracy. It was about usefulness. "You're telling me my player hit 14 bandejas this match. I know he hit bandejas. What I want to know is whether he should have."

The accuracy number can be right and the product can still be wrong.

What changed when we added context

Before and after context: same clip, different conversation.

When we added just four context signals — court side, rally phase, opponent position, prior stroke — the model's raw accuracy barely moved. What changed was the tier of questions it could now answer.

Without context
With context
Question
What stroke was that?
Was that the right stroke for that moment?
Output
bandeja · 0.93
bandeja · 0.93 · suboptimal for this setup
Coach value
Counts a stroke
Flags a decision
Player value
Reviews a highlight
Learns a pattern

The first row does not have an accuracy column. That is the point. We did not make the model smarter. We made it aware of what it was looking at.

Why this matters for everything we build next

Every new model on our roadmap has this structure. A classifier at the core, a rich context layer around it. The court is too small and a padel match too dense for anything else to work.

Every model we ship from here on follows the same shape.

The short version

  • A stroke is a frame. A match is a story.
  • Accuracy on the frame is necessary and nowhere near sufficient.
  • The context layer is where product value lives. It is also where most of the engineering work goes.

More on this as we roll the next model out — the role-aware positioning tracker has a context spec three times longer than its classifier spec, and we think that's the right ratio.

— André & the Engineering team