By using a database like PostgreSQL or Timescale, we can build more complex and versatile RAG-systems that can retrieve not only text-documents, but also numerical data and time-series data.
To manage these multiple query types, we will also implement a query planning step, where user questions are automatically translated into a sequence of database-queries.
▬▬▬▬▬▬ LINKS ▬▬▬▬▬▬
- Try Timescale Vector free for 90 days: https://tsdb.co/sign-up-johannes
- Learn more about Timescale / AI homepage: https://tsdb.co/ai-johannes
- Instructor: https://useinstructor.com/
Connect with me on LinkedIn:
https://www.linkedin.com/in/johannesjolkkonen/
Code:
https://github.com/JohannesJolkkonen/funktio-ai-samples
▬▬▬▬▬▬ T I M E S T A M P S ▬▬▬▬▬▬
0:00 - Intro to multi-query RAG
2:06 - PostgreSQL and Timescale
3:58 - Setting up Timescale
8:36 - Creating vector tables in Timescale
14:10 - Adding vector-related tables
19:08 - Combining vector search and SQL
21:13 - Query planning with Instructor
26:20 - Executing query plan
31:44 - Using multiple queries in RAG