Skip to content

Whisper fallback for YouTube + Knowledge Graph test isolation fix - #123

Merged
Matee-ur-Rehman merged 2 commits into
QuantumLogicsLabs:mainfrom
usmanali434:feature/knowledge-graph
Sep 12, 2026
Merged

Matee-ur-Rehman merged 2 commits into
QuantumLogicsLabs:mainfrom
usmanali434:feature/knowledge-graph

Conversation

@usmanali434

Copy link
Copy Markdown
Contributor

Whisper Model — Implemented

Adds a fallback path in ingestion's YouTube transcript fetching: when a
video has no available captions, audio is downloaded (yt_dlp) and
transcribed locally with Whisper instead of failing/returning empty text.
Tested against both a caption-disabled video and a normal captioned video
to confirm the existing fast path still works unchanged.

Knowledge Graph — Bug Fixed

The graph service's test suite was inserting synthetic test vectors
directly into the real, shared ChromaDB collection instead of an isolated
test database. Since a Chroma collection's dimension is fixed by its
first insert, this locked the real collection to 16 dimensions —
incompatible with the real embedding model's 384-dim output — breaking
real ingestion for anyone using the shared store.

Fix: tests now use an ephemeral in-memory Chroma client, never touching
the real store. Verified the actual fix by deleting the corrupted
collection, re-ingesting real documents, and confirming /graph correctly
returns real nodes and edges (including correctly showing an unrelated
document with no false connections).

Known follow-up (not in this PR)

ingestion/main.py's JWT auth (from the earlier NV-2 fix) appears to be
missing from the current working copy — investigating separately whether
this was lost during a merge/reorg. Will follow up once confirmed.

- Implemented Whisper-based transcription fallback for YouTube videos
  with disabled/unavailable captions (ingestion/youtube/whisper_fallback.py),
  wired into transcript.py's fetch_transcript(). Tested on both
  caption-disabled and normal videos.

- Fixed a bug where knowledge_graph's test suite wrote synthetic
  16-dimension vectors directly into the real, shared ChromaDB
  collection, permanently locking it to an incompatible dimension
  and breaking real ingestion (384-dim). Tests now use an isolated,
  in-memory Chroma client instead. Verified fix against real ingested
  documents post-recreation of the collection.
@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

@usmanali434 is attempting to deploy a commit to the mrymfarid684-3634's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Matee-ur-Rehman
Matee-ur-Rehman merged commit fb3512a into QuantumLogicsLabs:main Sep 12, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants