retrieve_docs function for a simple vector similarity search or query to combine retrieval with language model generation:
Related questions
-
Q: What is the difference between keyword and vector search?
A: Keyword search matches exact terms via an inverted index, while vector search compares dense embeddings to capture semantic similarity even when different words are used. -
Q: How can I limit search to a specific document category?
A: Pass afiltersdictionary when callingretrieve_docsorquery, e.g.filters={"category": "finance"}, to restrict results to documents with matching metadata. -
Q: When should I use
queryinstead ofretrieve_docs?
A: Usequerywhen you need the language model to read the retrieved docs and generate a synthesized answer; useretrieve_docswhen you only need the raw documents.

