RAG for Everyone

← Back to practice

Chapter 13 Interview Prep45 min review

Interview Questions: Local TF-IDF + SVD Embeddings

Use these to explain local retrieval as a serious engineering tool, not a toy.

Q01

What is TF-IDF?

TF-IDF weighs terms by how important they are in a document and how rare they are across the corpus.

Q02

What does SVD add?

SVD compresses high-dimensional sparse TF-IDF vectors into lower-dimensional latent vectors that capture broader word-pattern structure.

Q03

When is TF-IDF strong?

Exact terms, IDs, error codes, product names, policy numbers, and domains where vocabulary overlap matters.

Q04

When is TF-IDF weak?

Paraphrase, multilingual search, deep semantics, context, negation, and vocabulary mismatch.

Q05

Why use local embeddings in a learning project?

They are transparent, private, cheap, dependency-light, and excellent for teaching retrieval mechanics.

Q06

What must be versioned?

Tokenizer, cleaning rules, vocabulary, IDF values, SVD projection, corpus version, and index release.

Q07

How can SVD hurt retrieval?

Too much compression can blur rare but important terms and make distinct documents look too similar.

Q08

How do you debug TF-IDF retrieval?

Inspect query tokens, missing tokens, matched terms, top weighted terms, scores, and whether cleaning removed important identifiers.

Q09

How does this fit with neural embeddings?

TF-IDF can be a baseline, fallback, exact-term engine, or hybrid partner with neural retrieval.

Q10

How do you evaluate it?

Use golden queries split by exact-term, paraphrase, stale-content, and domain-specific cases. Track Recall@k, MRR, and failure labels.

← Practice BankProject →