RAG Workflows with Weaviate

End-to-End RAG with Weaviate

JP Hwang

Senior Developer Educator, Weaviate

Looking back...

 

chapter1_recap.png

End-to-End RAG with Weaviate

Coming up!

chapter2_comingup.png

End-to-End RAG with Weaviate

From strings to PDFs

 

  • PDFs
    • Headings
    • Tables
    • Images → Chapter 3

 

  • docling → convert PDFs to markdown
  • Goal: Be able to ask documents questions

hai_ai-index-report-2025_chapter2_excerpts_1_of_8.jpg

1 Stanford AI Index Report 2025
End-to-End RAG with Weaviate

Back to the "R" in RAG

retrieval_zoomed2.png

End-to-End RAG with Weaviate

Searching with vectors

 

search_strategy1.png

 

  1. Create text embeddings
  2. Compare cosine distances
  3. Retrieve the most similar document(s)

 

  • Robust to synonyms, typos, alternative wordings
  • Good choice for "messy" inputs
End-to-End RAG with Weaviate

Searching with keywords

 

search_strategy2.png

 

  1. Look at frequency of term usage in documents
  2. Retrieve the document(s) with the most usage

 

  • Simpler and faster
  • Less flexible to "messy" inputs
End-to-End RAG with Weaviate

The best of both words: hybrid search

 

search_strategy3.png

 

  1. Performs both searches simultaneously
  2. Weights both rankings by value $\alpha$
End-to-End RAG with Weaviate

Let's practice!

End-to-End RAG with Weaviate

Preparing Video For Download...