Skip to main content

How it works

A decade ago, recommendation engines were highly tuned algorithms. A show might be weighted on a variety of characteristics, such as "good for families"... or it might just be tagged with descriptors like "drama."

When you asked a recommendation engine what you would like to watch next, it would quantify the characteristics of the things that you'd liked so far, and it would try to find items that matched. And if it was advanced enough, that would have actually been an AI engine.

But today, we primarily use generative AI. So mjuch so that "generative AI" has become synonymous with AI, which isn't strictly true. When generative AI finds a recommendation, it doesn't think through characteristics or descriptors. Generative AI like Large Language Models (LLMs) are merely prediction engines.

In the simplest terms, without getting into things like tokens, the AI predicts what other people would likely say in response to your request. When you ask for "a show like Friends," the AI responds with what the average person would say to that request.

LLMs are a lot like crowdsourcing an answer. They aren't giving you the best possible answer through quantifiable and measurable statistics, they're giving you the most likely answer delivered from their sample data.

1. Input Your Preferences

In our system, we begin by inputting your preferences. In this case, you're allowed to list up to five shows you love and five shows you hate.

This is to give the AI enough information to actually provide a granular answer. If you wanted "shows like Friends," you could probably just Google that.

2. The AI system prompt

Once you've entered the shows you like (and the shows you hate), we send a system prompt:

You are a television show recommendation engine. 

You will return only a JSON with 3 recommendations for television shows, containing a title and a description.

You will use this JSON structure:
[
{
"title": "string",
"description": "string"
},
{
"title": "string",
"description": "string"
},
{
"title": "string",
"description": "string"
}
]

You will not include any shows that have previously been recommended.

The system prompt tells the system how to respond. You'll note that this system prompt doesn't contain any custom information, such as show names.

Because AI systems can be erratic, there are benefits to requesting highly structured information. In this case, we are telling it exactly what information to return so that we can better predict the information we receive.

3. The user prompt

Once we've sent the system prompt, we send the user prompt. The user prompt actually is customized to what the user has sent before:

Based on the following loved and hated TV shows, recommend a great new TV show to watch:

Loved shows: ${lovedShows.filter(show => show.trim() !== "").join(", ")}
Hated shows: ${hatedShows.filter(show => show.trim() !== "").join(", ")}

Avoid recommending any of these previously recommended shows:
${avoidedShows.length > 0 ? avoidedShows.join(", ") : "None"}

We don't need to give the system any further information, because we have already preloaded that with the system prompt.

The system receives something like this:

Based on the following loved and hated TV shows, recommend a great new TV show to watch:

Loved shows: Parks and Recreation
Hated shows: Friends

But it doesn't think about this. It doesn't quantify scores the way that a traditional recommendation engine might. Instead, the AI simply predicts what an individual might say given those show tastes. In this case, it's very likely to report: The Office, Brooklyn Nine-Nine, and 30 Rock.

And because it's using crowdsourced information, it's likely to be right. There are benefits to this type of technology. As an example, I can write "parks and rec" or "parks & rec" or any number of similar things and still receive a viable response.