Journal
5 min read

The day my 2Pac pool party filled up with Buddhist meditation

What does an automatic DJ play when nobody suggests anything? I first asked an LLM for songs, then a search engine. Both let me down, each in its own way.

A pool afternoon with friends, a week before my birthday. I'm testing Orfeo in almost-real conditions. We start with 2Pac.

A few songs later, the speakers switch to Buddhist meditation.

Not a remix. Not a sample. Actual Buddhist meditation, very original, by the pool. I laughed, I cut it, and I opened the code.

That bug is my favourite of the whole project, because it tells in one scene a problem that took me three versions to understand.

The real problem: the lulls

In Orfeo, guests suggest songs and vote. As long as they keep suggesting, it's easy: there's something to play.

But a party isn't a steady stream of suggestions. People talk, eat, swim. Nobody takes their phone out for twenty minutes. And during those twenty minutes, the music must not stop.

So the machine has to find songs on its own. The question is: where?

Act 1: ask the LLM

First idea, the obvious one. I have an LLM running locally on the Mac. I describe the mood of the moment, it gives me songs, I look them up in the catalog.

It worked. For three days.

The problem is that an LLM makes things up. Not often, but it does. Depending on the models I measured, between 0.5% and 23% of the suggested songs didn't exist. A real artist with a track they never released. A plausible title, right in the style, completely fictional.

That's when I understood my mistake. An artist and a title are a fact. It's deterministic: the track exists or it doesn't. Asking for a fact from a machine that manufactures plausibility is picking the wrong tool.

I turned it into a rule, written in black and white in the project's decisions: the LLM never names a song. Ever again.

Act 2: navigate a real catalog

If the LLM can't name songs, you have to start from songs that already exist. The ones the party just played.

Orfeo uses Deezer's public API for that — it's open, no key needed — and follows a dead simple path:

a played track → its artist → that artist's radio → real tracks

Every track is identified by its ISRC, the international code of a recording. That's what lets me navigate on Deezer and play on Apple Music: same code, same track.

With this approach, a made-up song becomes structurally impossible. Everything that comes out of the system exists somewhere in a catalog.

One issue remained: an artist's radio keeps you in their world, not necessarily in the energy of the moment. So I gave the LLM a small role back. Not to name songs — to translate a phase of the party into genres. "Quiet drinks, energy 2 out of 5" becomes a few keywords, and I search the catalog for those keywords.

An LLM describing a mood: that, it can do. I was pleased with myself.

Act 3: the pool

Back to the water.

At the very start of a session, nothing has finished playing yet. So no history, so no artist to start from. Result: 100% of the filler tracks came from the genre search.

For a quiet phase, the LLM suggested terms like "ambient" or "chill". Reasonable. Except the endpoint I was using isn't a genre filter. It's a full-text search. You search "ambient", it returns everything containing that word — including artists whose name it is.

And there is a whole catalog of wellness music whose artists are called exactly that. "Musique de Réflexion Academy". "Buddhist méditation académie".

The worst part is what came next. My system then scores each candidate on how well it fits the phase. Buddhist meditation for a phase at energy 2 out of 5? Perfect score. The machine was delighted with its choice.

They were real answers to the wrong question.

The fix: listen to the room

Three changes, one idea.

Start from what's playing now. The current track and the guests' suggestions are the starting point, before any track has even finished. If the room is listening to 2Pac, navigation starts from 2Pac.

A closed vocabulary. No more full-text search. Genres go through the catalog's official list and its charts. A "Rap" chart can't hand you an artist whose name merely contains the word.

Tell the LLM it's a party. The prompt now states the context and the artists currently playing, and no longer describes a quiet phase as elevator music.

A week later, at my birthday, the lulls were filled without a single wrong note. Nobody meditated.

What I take from it

Two lessons, and neither is in a tutorial.

The first: an LLM is good at describing, bad at quoting. A mood, a genre, an intention — yes. A title, a name, a verifiable fact — no. It's not a flaw in the model, it's just the wrong tool for that.

The second one stings more: replacing the LLM with a real API isn't enough to be right. My search engine made nothing up. It was just answering a different question from mine, with the same confidence.

And all my tests passed. It took a pool, some friends and 2Pac to see it.

— Pato