Parse Documents for Retool AI while maintaining distinct sources

Hi - I'm trying to set up a workflow that I'm currently able to do with ChatGPT pretty easily. With ChatGPT, I can upload multiple files and submit my prompt. In my prompt, I request that the output be provided with tags for which specific documents were used for each part of the response.

With Retool, it seems that the AI can't reference files directly. I have to convert them all into text, which prevents me from being able to request that the original sources be tagged in the output.

Is there a feature I'm missing that supports AI queries, directly referencing the content within files?

Retool AI document actions

1 Like

Hey @simiibi - welcome to the community! :wave:

If you are sourcing your information from a static set of documents, I'd recommend utilizing a vector database. This allows you to upload a set of documents that will be used to give additional context to your query. You can then specify which vector you want to use when writing the query itself. I verified that you can ask the LLM to cite its sources and it will correctly reference the name of the file.

image

image

If you're instead wanting to upload and use a dynamic set of documents, there's not really a great solution right now. Workflows, in particular, don't currently support document uploads even though this is possible in a Retool web app. We're working on bringing the two into parity.

The approach you described, though, should still work for this use case, assuming you are able to convert the documents into text.

image

I hope this helps! Definitely let me know if you have any follow-up questions.

1 Like