Video → Transcript → Vector → Grounded answers

Search YouTube by meaning, not keywords.

InsightTube AI pulls videos, extracts their transcripts, and embeds them into a vector database. Ask in plain English and get an answer grounded in the exact videos it retrieved — with every source cited.

Built on

YouTubeYouTubeFastAPIFastAPILangChainLangChainOpenAIOpenAIChromaChromaDB
insighttube · semantic search
embed
OpenAIAnswer · grounded in 3 sources

Attention lets each token weigh every other token, forming context-aware representations. The key insight is that queries, keys and values let the model look back at relevant earlier positions…

Sources

But what is a neural network?
94%

But what is a neural network?

3Blue1Brown

Let's build GPT: from scratch
91%

Let's build GPT: from scratch

Andrej Karpathy

Intro to LLMs & retrieval
88%

Intro to LLMs & retrieval

AI Explained

/ the pipeline

From a video to a grounded answer.

Every query travels the same six steps. Watch one request move through the system.

step 1 / 6Video Videos are pulled by query or channel.
YouTube1
Video
YouTube Data API
2
Transcript
Speech-to-text
Hugging Face3
Embed
sentence-transformers
[0.21, -0.44, 0.88, …]
Chroma4
Store
ChromaDB
▸ [0.21, …]▸ [-0.44, …]▸ [0.88, …]▸ indexed
5
Retrieve
top-k nearest
Q
OpenAI6
Answer
LangChain · OpenAI
cited

← scroll to follow the flow →

LangChain orchestrated by LangChainChroma stored in ChromaDBOpenAI answered by OpenAI

/ build your own

Drop in videos. Chat with them.

Add YouTube videos to a knowledge base — tap them on the left or paste a URL in the chat. Each one is ingested, transcribed and indexed in real time. Then ask anything, and the assistant answers using only the videos you added.

YouTube Knowledge base0/0 indexed

No videos yet — add some below.

tap to add

OpenAIChat with your videos
YouTube

Add at least one video to your knowledge base to start asking questions.

try: youtube.com/watch?v=aircAruvnKk

/ vector space

Meaning becomes geometry.

Every video's transcript is embedded into a point in high-dimensional space. Videos that meansimilar things land close together. A query drops in and pulls its nearest neighbours — that's semantic search, visualised. Drag to orbit.

video
query + top-3
drag to orbit · 68 videos indexed

live query

retrieving “Transformers
neighbour 10%
neighbour 20%
neighbour 30%
q = [0.31, -0.12, 0.84, …] · 384-d
Why 3D? Real embeddings live in 384 dimensions — far more than we can draw. This is a projection: the clustering you see is what makes retrieval work.

/ trust & safety

Retrieval you can trust, failures you can see.

The whole point of the RAG pattern is observability. Guardrails and evaluation make sure the system gets better on purpose — not by accident.

Retrieval guardrails

Answers are constrained to retrieved context. If the store has nothing relevant, the model says so instead of guessing — wrong answers fail in a visible, debuggable way.

  • Context-grounded generation
  • Explicit low-confidence signals
  • Source citations on every answer

Eval harness

Question-and-expected-source pairs measure whether retrieval actually got better after a model swap — so improvements are evidence-based, not vibes.

  • Retrieval recall @ k
  • Answer faithfulness scoring
  • Regression tracking per change

API security

Every service sits behind typed contracts and standard hardening — secrets never leave the container, and requests are validated before they touch the model.

  • Pydantic input validation
  • Rate limiting & sane defaults
  • Secrets via env, never committed

Observability

Each stage logs what it did and how long it took, so a slow or failing step is localised instantly instead of hidden inside one monolithic request.

  • Per-stage latency traces
  • Structured pipeline logs
  • Containerised, isolated failures

/ stack

A deliberate, small stack.

Each tool does one job. They're wired together with typed contracts, so when something breaks it fails loudly and locally — not silently somewhere downstream.

Python
Python
runtime
FastAPI
FastAPI
backend
Pydantic
Pydantic
validation
LangChain
LangChain
orchestration
OpenAI
OpenAI
LLM
Hugging Face
sentence-transformers
embeddings
Chroma
ChromaDB
vector store
Streamlit
Streamlit
dashboard
Docker
Docker
containers
semantic_engine.py
from core.ai.semantic_engine import NLQueryEngine

# ask anything in plain English
engine = NLQueryEngine()
res = await engine.ask(
    "best videos on vector databases?"
)

# embed → retrieve top-k → grounded answer
print(res["answer"])  # grounded in res["sources"]

Run the whole pipeline locally.

Clone the repo, add your API keys, and bring up the dashboard and API in containers. Dashboard on :8501, Swagger on :8000/docs.

$ ./scripts/setup.sh && ./scripts/start.sh