---
title: "Discussion on \"Semantic Search Over Transcripts in Python: What Embeddings Fix and What They Don't\" | Hashnode"
description: "Discussion on \"Semantic Search Over Transcripts in Python: What Embeddings Fix and What They Don't\". Keyword, vector and hybrid search on a 28-paragraph transcript in Python, with real output, honest misses, and code you can run."
url: "https://hashnode.com/posts/semantic-search-over-transcripts-in-python/6ac3469f8ffc43b6b8fbc33a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Semantic Search Over Transcripts in Python: What Embeddings Fix and What They Don't](https://libraryminds.hashnode.dev/semantic-search-over-transcripts-in-python?utm_source=hashnode&utm_medium=feed)

Keyword, vector and hybrid search on a 28-paragraph transcript in Python, with real output, honest misses, and code you can run.

Oct 5 · 24 min read · libraryminds.hashnode.dev  
Read the article

-   [#nlp](https://hashnode.com/tag/nlp)
-   [#scikit-learn](https://hashnode.com/tag/scikit-learn)
-   [#search](https://hashnode.com/tag/search)
-   [#machine-learning](https://hashnode.com/tag/machine-learning)
-   [#python](https://hashnode.com/tag/python)
-   [#scikitlearn](https://hashnode.com/tag/scikitlearn)

## Written by

[Libraryminds](https://hashnode.com/@libraryminds)

@libraryminds · Bengaluru, India

  
[View profile](https://hashnode.com/@libraryminds)

Search Any Video Like Google

Libraryminds turns YouTube videos, uploaded recordings, podcasts, lectures, and meetings into timestamped transcripts and a searchable personal library. You can search by meaning, jump back to the source moment, generate summaries or chapters, and export the transcript, so useful information does not stay buried inside hours of video.

## Responses 5

Markdown supported · ⌘↵ to post

[Kartik N V J K](https://hashnode.com/@kartik-nvj)

[Oct 5](https://hashnode.com/posts/semantic-search-over-transcripts-in-python/6ac3469f8ffc43b6b8fbc33a/comment/6ac40da3a88d44ea74845865)

Defining the correct answers before running the queries is the step most retrieval demos skip, and it is the only reason your "vector won one, lost one" result means anything. The honest LSA-on-28-paragraphs caveat matters too, since fitting on the corpus you are testing flatters recall in a way a pretrained encoder would not. I went through the same measure-against-a-gold-set exercise with LlamaIndex and wrote up how I score it here: [kartiknvjk.hashnode.dev/evaluating-llamaindex-rag…](https://kartiknvjk.hashnode.dev/evaluating-llamaindex-rag-2026)

[Libraryminds](https://hashnode.com/@libraryminds)

[Oct 6](https://hashnode.com/posts/semantic-search-over-transcripts-in-python/6ac3469f8ffc43b6b8fbc33a/comment/6ac40da3a88d44ea74845865#reply-6ac44f48fb220b19d35e1f8c)

I also agree with the point in your article about scoring retrieval separately from the answer, since that is what this test does too.

[Ahmet Özel](https://hashnode.com/@ahmetozel)

[Oct 5](https://hashnode.com/posts/semantic-search-over-transcripts-in-python/6ac3469f8ffc43b6b8fbc33a/comment/6ac39a54076e470931f059e9)

The 'reduce churn' example is a useful demonstration of vocabulary coverage rather than a general failure of semantic embeddings. In the LSA version, churn has no TF-IDF feature at all, so the query effectively becomes reduce before the projection; the pretrained swap tests a materially different source of knowledge.

I would print the recognized and discarded query terms next to each result list. Then compare 'reduce churn' with 'reduce cancellations' and a no-overlap paraphrase under both embeddings, leaving the relevance labels fixed. That would make it clear which gains come from corpus vocabulary, the learned projection or pretrained semantics, rather than treating vector search as one interchangeable method.

[Libraryminds](https://hashnode.com/@libraryminds)

[Oct 5](https://hashnode.com/posts/semantic-search-over-transcripts-in-python/6ac3469f8ffc43b6b8fbc33a/comment/6ac39a54076e470931f059e9#reply-6ac3a18b20b5065f3d157773)

Thanks Ahmet, this is a good way to split it. I built your version and added it to the post as an update, with the code and the real output. The right answers stay fixed for all three queries, and the script prints which query words the model used.

"reduce churn": only "reduce" is used, so keyword and LSA both find 0 of 3. "reduce cancellations": both words are used. Both find 1 of 3, but LSA ranks the right paragraph first and keyword ranks it second. "subscriber attrition": no word is in the transcript, so both return nothing.

So in this small test, vocabulary changes the result the most, and the learned projection changed the order once and the count never. I have not run the pretrained half yet, so the post says "not run" and gives no numbers for it. If you run it on your side, I would like to compare.

I also added a line near the top that says the vector search in this post is a small LSA stand-in, so the title is not read as a claim about all embeddings.

[Ahmet Özel](https://hashnode.com/@ahmetozel)

[Oct 6](https://hashnode.com/posts/semantic-search-over-transcripts-in-python/6ac3469f8ffc43b6b8fbc33a/comment/6ac39a54076e470931f059e9#reply-6ac539f88b6eb3d8fcebc171)

Thanks for running that comparison and keeping the pretrained half explicitly unmeasured. The printed query vocabulary now makes the zero-result cases explainable, and the unchanged hit count with a different rank is a useful distinction.

I have not run the pretrained version, so I do not have results to compare. For that extension, I would preserve the same corpus, relevance labels and cutoff, and report ranking changes separately from newly retrieved relevant paragraphs. The zero-vector case should remain explicit rather than producing arbitrary nearest neighbours.
