Interview Bank
328 questions total; 1 shown with current filters.
CourseAllFrom Frontend Engineer to Agent Engineer in 30 DaysPrompt Engineering From Scratch in 5 DaysMastering Claude: From Conversation to Claude Code in 5 DaysMastering Codex and the OpenAI Agents SDK in 5 DaysMCP in 7 Days: Wire Tools Into Any AgentAgent Skills in 7 Days: Turn Experience Into Reusable CapabilityContext Engineering in 5 DaysRAG in 14 Days: From Retrieval to Trustworthy AnswersBuild an AI Short-Drama Production Pipeline With Agents in 14 Days
Tag
All#retrieval-failure1#evaluation15#chunking6#cost6#embeddings5#agentic-rag4#architecture4#hybrid-search4#ingestion4#abstention3#data-quality3#access-control2
92 more tagsShow fewer tags
#citation-verification2#contextual-retrieval2#cost-tradeoff2#debugging2#failure-modes2#golden-set2#long-context2#multi-hop2#observability2#query-rewriting2#ranking2#recall2#refusal2#retrospective2#system-design2#api-design1#bi-encoder1#bm251#caching1#citations1#content-hash1#context-assembly1#coreference1#cost-optimization1#cross-encoder1#dimensions1#embedding-migration1#engineering-judgement1#error-propagation1#evidence1#failure-analysis1#faithfulness1#fallback1#filter-pushdown1#filtering1#fine-tuning1#graph-rag1#grounding1#hallucination1#hnsw1#hyde1#incremental-sync1#index-maintenance1#index-routing1#indexing1#information-retrieval1#intent-routing1#invalidation1#iterative-scan1#ivfflat1#latency1#latency-budget1#llm-as-judge1#metadata1#model-selection1#modularity1#multi-tenancy1#multi-turn1#normalisation1#ocr1#ordering1#overlap1#parent-child1#pdf-parsing1#prioritization1#production-readiness1#prompt-caching1#prompt-engineering1#prompting1#quantization1#query-transformation1#rag1#rag-basics1#rank-fusion1#reliability1#rerank1#retrieval1#retrieval-metrics1#retrieval-quality1#risk-assessment1#rollout1#scaling1#self-reflection1#similarity1#stakeholder-communication1#streaming1#thresholds1#tool-design1#trade-offs1#vector-database1#vector-index1#zero-downtime1
RAG in 14 Days: From Retrieval to Trustworthy Answers
D2 Embeddings and Vector Search: Similarity, Dimensionality, and Model Choice; Storing Text in pgvector
Can vector search fully replace keyword search? Give a query where vectors are bound to fail, and say how you would fix it.向量检索能完全取代关键词检索吗?举一个向量必然失手的查询,并说说你会怎么补。
Common in ChinaCommon overseasIntermediate#hybrid-search#embeddings#retrieval-failureHow to reason about it · think before answering
- This is a stance question where the stance matters less than the counter-example. Without a concrete, reproducible failing query, the rest of the answer reads as theory.
- Enumerate the failure classes up front: error and status codes, version numbers and SKUs, names and employee IDs, order or document identifiers, and negation. The first four share one property: their value lies in exact literal identity, which embeddings deliberately blur into semantic neighbourhoods.
- Give a reproducible example: ask whether rate limiting returns 429. BM25 lands on the API document that literally contains 429, while vector search may rank a topically similar product manual that never mentions the code.
- Call out negation separately: 'supports PDF export' and 'does not support PDF export' sit almost on top of each other because they discuss the same thing. Vectors cannot carry that distinction; the generation step reading the source has to.
- The fix: run both retrievers and fuse the rankings, BM25 on the lexical side and nearest neighbour on the vector side, combined with reciprocal rank fusion. That is hybrid search, covered on day 9. Fusion helps precisely because the two systems fail on different queries.
- Expected follow-up: could you drop the keyword path and rewrite queries instead? Rewriting helps with vocabulary mismatch, but it cannot rescue exact identifiers, since there is no paraphrase of 429.
分析过程 · 先想清楚再作答
- 这题是典型的「立场题」,答「能」或「不能」都不重要,重要的是你能不能举出一个具体到能复现的反例。举不出例子,前面说得再漂亮也会被判成没做过。
- 先给失手的类型,一次给全:错误码与状态码(429、E1032)、版本号与型号(v2.3.1、X20 Pro)、人名与工号、订单号与文档编号、以及否定表达。前四类的共同点是**这些词的价值在于字面唯一,而向量只保留语义邻近**,模型会把 429 和「限流」「超时」这些话题相近的东西编到一起,反而把真正写着 429 的那篇挤下去。
- 拿一个能复现的例子说:问「限流超了返回 429 吗」,BM25 稳稳命中写着 429 的接口文档,向量却可能把话题相近但没提 429 的产品手册排在前面。这个现象在本课第 2 天的实验里就能亲眼看到。
- 否定表达要单独强调:「支持导出 PDF」和「不支持导出 PDF」在向量空间里几乎重合,因为它们谈的是同一件事。指望向量区分肯定与否定一定翻车,这一层要靠生成侧读原文来判断。
- 怎么补:两路并行跑再融合,关键词一路用 BM25、向量一路用最近邻,用倒数排名融合把两个名次合成一个。这就是混合检索,本课第 9 天展开。要点是**两套的错法不一样**,所以合起来才有增益——如果两套错在同一批查询上,融合是白做的。
- 可预期的追问:那关键词一路能不能扔掉、改成让模型改写查询?可以缓解一部分(第 10 天的查询改写),但改写救不了字面唯一的标识符——你没法把 429 改写成别的说法。
Key points
- No: codes, version numbers, names and IDs matter as exact literals, which embeddings blur into neighbourhoods.
- Concrete example: asking whether rate limiting returns 429, where BM25 hits the document containing 429 and vectors surface a topically similar one that never mentions it.
- Negation is a second failure class, since affirmative and negative statements sit almost on top of each other.
- The remedy is hybrid retrieval: run both paths and merge with reciprocal rank fusion.
- Fusion pays off because the two paths fail differently; query rewriting helps vocabulary mismatch but not exact identifiers.
答题要点
- 不能取代:错误码、版本号、人名、单号这类词的价值在于字面唯一,向量只保留语义邻近。
- 具体反例:问「限流超了返回 429 吗」,BM25 命中写着 429 的文档,向量把话题相近却没提 429 的文档排前面。
- 否定表达是另一类失手:肯定句与否定句在向量空间里几乎重合。
- 补法是混合检索:两路并行再用倒数排名融合合并名次。
- 融合有增益的前提是两套的错法不同;查询改写能缓解词汇不匹配,但救不了字面唯一的标识符。