Media Retrieval Lab

Search, ask about, and summarize English and Japanese videos and podcasts. Hybrid RAG with timestamped sources, summaries that cite the transcript, and evaluation that pairs human labels with LLM judges.

Created
Feb 2026
Updated
Nov 2026
MCPPythonFAISSBM25Hybrid SearchAgentic RetrievalRetrieval EvaluationSummary Evaluation
View on GitHub →
On this page

Overview

Media Retrieval Lab is a multilingual RAG system for English and Japanese videos, podcasts and recordings. You can search a library, ask questions across it, or summarize a long episode, and every answer cites the transcript lines it came from, with a link back to that moment.

Under the hood it combines hybrid retrieval (semantic and keyword search, plus reranking), an agentic search loop that switches strategies when results look weak, and routing that shortlists the right videos before searching inside them. Answers stay grounded in the retrieved passages and say what the evidence doesn't cover. Assistants such as Codex can also use the library as a tool through MCP.

Every part is measured with human labels and LLM judges: retrieval against relevance labels, and summaries against key points I labeled myself, graded by an LLM judge whose grades I checked by hand. Formerly YouTube Transcript Lab.

Hybrid retrieval for a Stephen Curry question, with ranked transcript passages that each link to their moment in the video. The passages I keep become the grounding for the answer.

Why I Started Building It

I started this wanting to try building a RAG system, because of the shift toward designing retrieval systems for AI and LLMs. Around the same time, I had been learning Japanese for over a year and had started listening to long-form Japanese videos to improve my listening. I wished there were an easier way to search them, pull out the key points, and ask questions about what was said. This project combined the two.

Once I started building it, it slowly expanded to include more and more features. It became more than a simple RAG system: I kept improving the retrieval and many other parts. Figuring out the right eval for each feature, and making the most of it, became one of the key parts of the project.

How It Works

From any source to a cited answer or summary, and back to the moment it came from.
  • Bring in. Index YouTube videos and playlists from their captions, and transcribe podcasts and local audio or video with Whisper. Follow channels and podcast feeds for a What’s new digest of recent episodes.
  • Search. Hybrid retrieval combines semantic search (E5 embeddings in FAISS) with Japanese-aware keyword search (BM25), plus optional reranking.
  • Ask and summarize. Answers and summaries from ChatGPT, Claude or Sakana AI cite the transcript lines behind each point and say what the evidence doesn’t cover. Long episodes split into sections, and collections compare videos by theme.
  • Evaluate. Compare search runs side by side, score retrieval against relevance labels, and score summaries against key points I labeled by hand.

Technical details on GitHub →

Key Findings

I tested search with questions in English and Japanese, including questions in one language about a recording in the other, and scored summaries of long episodes. LLM judges graded both, and I checked the summary grades against my own labels.

Simpler search won. Plain semantic search ranked passages best of the standard setups, ahead of hybrid search (nDCG@10 of 0.63 against 0.59).

Reranking hurt until I cleaned up the question. Reranking the raw question dropped the score to 0.38. Removing show and episode names first raised it to 0.78, but made search about 15 times slower.

Translation bridged the two languages. When a question and a recording were in different languages, translating the question for keyword search gave a clear gain.

Summaries stayed grounded; section breaks were the hard part. 98.6% of summary points were supported by the lines they cite. Placing where each section starts was the weak spot, and I’m still improving it.

Key areas for an 86-minute interview. Each key point cites transcript lines and links to its moment in the video.

Search study and summary results on GitHub →

How It Evolved

Transcript search and RAG (Feb–Aug 2026). The project began by indexing YouTube transcripts and answering questions with timestamp citations, with summaries and study tools along the way. Search then combined semantic and keyword matching, gained reranking, and began reading the surrounding transcript when a short passage wasn’t enough.

Measuring search (Aug–Nov 2026). Side-by-side comparisons, relevance labels and metrics made it possible to check whether a change actually helped. A development study then compared seven search setups on questions asked in English and Japanese, including questions in one language about a recording in the other. The public repo includes a runner for testing other collections and a baseline for search speed.

Answers across videos (Oct–Nov 2026). An experimental setup lets assistants such as Codex search the library and read transcript passages through MCP (Model Context Protocol). Comparing it with direct retrieval improved multi-video answers, speaker attribution and exact Japanese quotes, and Ask now shortlists the most likely videos before searching inside them.

Long episodes, podcasts and local files (Nov 2026). Summaries split a long episode into its sections and tie every point to the transcript lines it came from, within one video or across several, scored against sections and key points I labeled by hand. Podcasts and my own audio and video files are now transcribed locally, so the same tools work beyond YouTube.

Project Status

Active. Next, I’m comparing embedding models for English and Japanese search and scoring answer quality.