| RAG is not just traditional search. It's any augmented data that can be fed to the LLM. The most useful and verifiable RAG setup I've seen is hooking up a RDBMS and LLM, and asking querying questions in English to retrieve the table data. You can do it in several steps. 1. Extract the metadata of the tables, e.g. table names, columns of each table, related columns of the tables, indexed columns, etc. This is your RAG data. 2. Build the RAG context with the metadata, i.e. listing each table, its columns, relationships, etc. 3. Feed the RAG context and the user's querying questions to the LLM. Tell LLM to generate a SQL for the question given the RAG context. 4. Run the SQL query on the database. It's uncannily good. And it can be easily verified given the SQL. |