Back to AskTube

00 AskTube AI

Every answer points at the second it came from.

A YouTube video is a timeline. So is the answer about it. This is the path a question takes through that timeline — search, ingest, embed, retrieve, cite — and why the last step is the one that matters.

The ribbon ahead of you is a transcript. Scroll to travel along it.

01Search

A question arrives before the video does.

The learner asks in words, not in video IDs. The YouTube Data API returns candidates; the agent binds itself to exactly one of them and is forbidden from wandering to another — a rule learned the hard way, after it once answered from a video nobody had asked for.

Prohibition, not preference: a soft “focus on this video” lost to the workflow block above it in the same prompt.

02Ingest

The transcript becomes a track.

Captions arrive as hundreds of fragments, each with a start and a duration. Whisper transcribes the video itself when no captions exist. What comes out is one continuous thing with time along its length — the ribbon under the camera.

YouTube refuses datacenter IPs, so the fetch leaves through a rotating residential proxy. Roughly one attempt in six still draws a flagged exit IP, which is why a block is retried rather than reported.

03Chunk & embed

Cut into spans, then turned into coordinates.

The track is cut at semantic boundaries into pieces of about 600 characters, each keeping the timestamps of the segments it covers. Every piece becomes a vector — the cloud drifting above the ribbon — and lands in Postgres with pgvector.

Chunk size
600characters
Context share
29%of the video, at top-5
Overlap
1segment per boundary

600 was chosen for context share, not hit rate. At 1200 the top five chunks handed the model 53% of a whole video, which undercuts a prompt that promises to answer only from what it was given.

04Retrieve

Five spans, and the honesty to say none.

The question is rewritten into something standalone — “and what happens first?” means nothing to a vector search — then matched against the cloud by cosine distance. Five chunks come back. On-topic questions score 0.48–0.66; anything above 0.78 is a question this video cannot answer, and saying so is the correct result.

top_k
5measured, not guessed
Rank 1 hits
16of 26 content cases
Eval set
29cases, two videos

The second evaluation video is a biology lecture, chosen because it shares no vocabulary with the programming one. Without an unrelated pair, a filter that silently stopped working would still look correct.

05Answer

The citation is the product.

The model sees only those spans and the original question — never the rewrite, which is a guess about intent. Each claim carries the timestamp of the span it came from, validated against real chunks before it is allowed to appear. An invented mark is dropped, not shown.

01:10 – 02:24 · fWjsdhR3z3c

A broad question — “what is this video about?” — skips retrieval entirely and summarises every chunk in one call. Top-5 answers that question badly by construction.

06 What this buys

An answer you can check in one click.

Grounding is a claim until someone can verify it. The timestamp is what turns the claim into something falsifiable: click it, land on the second, and see whether the video says what the answer says it does.

Try it on a video