Building Chat Bot that uses context from imported tables

Hello @t2na!

For training an AI model, the common practice is to insert your data into a vector database. This can store a large amount of data and the AI tool will be able to 'remember' the datapoints you have given it to give you insights.

Trying to pass that same amount of data every time you ask a question is a major bottleneck. Once you get all the tables from your postgresql db you can add new data when needed but don't need to duplicate work.

Depending on how large your tables are, you might need to use chunking to break up the data uploads to the Vector DB to avoid overloading it with too much at one time but that shouldn't be too hard to do.

You can check out our docs for Retool's hosted Vector DB as well as use other online resources for different vector DB resources and can use AI to find out the best ways to get your table data converted int vectors for AI training as well :sweat_smile:

1 Like