Setup a text-to-SQL workflow over the data with additional techniques:
- Query-Time Table Retrieval: Dynamically retrieve relevant tables in the text-to-SQL prompt.
- Query-Time Sample Row retrieval: Embed/Index each row, and dynamically retrieve example rows for each table in the text-to-SQL prompt.
NOTE: Any Text-to-SQL application should be aware that executing arbitrary SQL queries can be a security risk. It is recommended to take precautions as needed, such as using restricted roles, read-only databases, sandboxing, etc.