Find Your Next Favorite: Smart Search on PlayBroadcast

At PlayBroadcast, we believe discovery is at the heart of every great streaming experience. Whether you’re hunting for a hidden indie gem, a channel that speaks your language, or that one video where your favorite streamer finally beats the final boss—our search needs to keep up.

Today we’re excited to share how we’re using semantic search and full text search as a hybrid to deliver fast, relevant results across games, channels, and videos—all powered by OpenAI embeddings, Supabase, and pgvector.


Traditional keyword search only knows what you type literally. Semantic search, on the other hand, understands meaning:

  • 🔍 You type “laid back farming sim with cute graphics”
  • 🤖 Behind the scenes, we transform your phrase into a 2000-dimensional OpenAI embedding
  • 📊 We compare that embedding against our pre-computed game embeddings
  • 🚜 You get back titles like Rilakkuma Farm or Dream Life in the Country Side—even though you never mentioned a name!

Our Implementation Stack

  1. Data in Supabase
    We store our primary tables—games, channels, users, and video metadata—in Postgres via Supabase.
  2. Generating Embeddings
    • We run an Edge Function that calls OpenAI’s text-embedding-3-large on each record’s title, description, tags, etc.
    • The resulting vector (an array of floats) is stored in a vector column, indexed with pgvector’s vector_ip_ops class.
  3. Query-Time Workflow
    • User submits a search query in our UI.
    • We call OpenAI to embed the query string.
    • Results hit your browser in under 3 seconds, even on a 320k-row table!

Hybrid Search: Best of Both Worlds

We didn’t rip out keyword search completely—sometimes you know exactly what you want:

  • Exact Game Name → traditional full-text search (via to_tsvector + GIN index)
  • “Games with dragons and castles” → semantic search kicks in

Our “hybrid” query runs both, then merges and ranks results so you never lose precision for known queries but gain relevance for exploratory ones.


Beyond Games: Channels & Videos

  • Channels: Embed channel descriptions, community tags, and streamer bios for semantic discovery (e.g. “speedrunner who loves horror games”).
  • Videos: A possible feature idea we've had is to run transcription (e.g. Whisper or OpenAI’s transcription API) on video content to generate embeddings from the transcript—unlocking inside-content search as an optional future feature.

We publish these deep technical posts to give you a transparent look at how we build PlayBroadcast—everything from vector indexing strategies and hybrid SQL queries to future ideas like in-video transcript search and AI-powered recommendations. We want you to:

  • See our process: understand the architecture, tools, and experiments behind every feature
  • Explore possibilities: get a sneak peek at what's on the horizon
  • Shape the roadmap: tell us which deep dives you’d like next

Your feedback directly influences our engineering priorities and helps us deliver the discovery experience you deserve. Thanks for reading, and keep those search queries coming!