Long Context: Everything is loaded into the prompt at once.
RAG: Dynamically fetches only the most relevant pieces of information using semantic search.
Isn’t there a limit to the size of the prompt?
Yes, that’s one of the advantages of RAG as it helps you dynamically feed text into the model based on semantic similarity to the question as opposed to sending all text into the context window.