Skip to main contentOverview
The RAG framework supports a hybrid search approach, integrating Weaviate’s vector-based semantic search with traditional text-based retrieval methods, including BM25 and Term Frequency (TF). This combination ensures that search results are both contextually relevant and keyword-accurate, allowing AI agents to retrieve information that matches user intent with a balance of semantic and lexical relevance.
How Hybrid Search Works in RAG Framework with Weaviate
- Vector Search: Weaviate uses embeddings generated by models like OpenAI’s text2Vec to perform similarity searches based on semantic meaning. This approach retrieves content based on how closely document embeddings match the meaning of the query.
- Textual Matching (BM25 & TF): Weaviate incorporates BM25 and Term Frequency (TF) as scoring mechanisms to re-rank vector search results, ensuring that documents containing relevant keywords are prioritized.