Use Long Context or RAG?

Use Long Context or RAG?

Update: 2025-01-10
Share

Description

In this one, I discuss the dilemma between using retrieval-based generation and the newer "long context models".


Long context models, like the Gemini suite of models, allow us to send up to millions of tokens (thousands of text pages), whereas retrieval (RAG)-based systems allow us to search through as much (if not more) content and retrieve only the necessary bits to send the LLM for improved answers.


Both have advantages and disadvantages. This short episode will help you better understand when to use each.



Build Your First Scalable Product with LLMs: https://academy.towardsai.net/courses/beginner-to-advanced-llm-dev?ref=1f9b29


Master LLMs and Get Industry-ready Now: https://academy.towardsai.net/?ref=1f9b29


Our ebook: https://academy.towardsai.net/courses/buildingllmsforproduction?ref=1f9b29

Comments 
In Channel
loading
00:00
00:00
x

0.5x

0.8x

1.0x

1.25x

1.5x

2.0x

3.0x

Sleep Timer

Off

End of Episode

5 Minutes

10 Minutes

15 Minutes

30 Minutes

45 Minutes

60 Minutes

120 Minutes

Use Long Context or RAG?

Use Long Context or RAG?

Louis-François Bouchard