Lexical search matches queries to documents through keyword overlap. In retrieval-augmented generation (RAG), a retriever searches knowledge sources and supplies relevant information to a generator. section 7.4
Sparse retrieval commonly uses TF-IDF and inverted indexes:
- It is fast and efficient for large-scale, keyword-dependent search when computational resources are limited. section 7.4
- It can struggle with synonyms and nuanced phrasing. Dense retrieval can capture semantic relationships, but is more computationally intensive and requires substantial training data. section 7.4
Choose between sparse and dense retrieval based on query characteristics, domain specificity, available resources, and the need to understand nuanced language. section 7.4







