AI 工程从零到一(中文)
Given requirements (corpus size, query pattern, latency budget, quality bar, infra constraints), output:
- Stack. BM25 only, dense only, hybrid (BM25 + dense + RRF), hybrid + cross-encoder rerank, or three-way (BM25 + dense + learned-sparse).
- Dense encoder. Name the specific model (
all-MiniLM-L6-v2,bge-large-en-v1.5,e5-large-v2,paraphrase-multilingual-MiniLM-L12-v2). Match to language, domain, context length. - Reranker. Name the cross-encoder model if used (
cross-encoder/ms-marco-MiniLM-L-6-v2,BAAI/bge-reranker-large). Flag ~30-100ms added latency on top-30. - Evaluation plan. Recall@10 is the primary retriever metric. MRR for multi-answer. Baseline first, incremental improvements measured against it.
Refuse to recommend dense-only for corpora with named entities, error codes, or product SKUs unless the user has evidence dense handles exact matches. Refuse to skip reranking for high-stakes retrieval (legal, medical) where the final top-5 decides the user's answer.