So I don't really buy it and I have yet to see it work better than any rdbms search index.
Tell me I am wrong, I would like to see a local model based on my own docs being able to answer me quality answers based on quality prompts.
Basically if you have a database of three emails and ask when Biff wanted to meet for lunch, a RAG system would select the most relevant email based on any kind of search - embeddings are most fashionable, and create a prompt like
"""Given this document: <your email>, answer the question "When does Biff want to meet for lunch?"""
Sibling comment from discordance has a more accurate description of RAG. There's a longer description from Nvidia here: https://blogs.nvidia.com/blog/what-is-retrieval-augmented-ge...
1. First you create embeddings from your documents
2. Store that in a vector db
3. Ask what the user wants and do a search in the vector db (cosine similarity etc)
4. Feed the relevant search results to your LLM and do the usual LLM stuff with the returned embeddings and chunks of the documents
Would you define RAG only as 'prompt optimisation that involves embeddings'?