Query an LLM about an uploaded file?

Is there any easy way to query an LLM (not bothered which at this stage, but I have API keys for OpenAI and Vertex/Gemini) about a file I’ve uploaded to it? The use case is listing things from an Excel spreadsheet.

I can upload a file to OpenAI using the OpenAI node, but I’m danged if I can figure out how to then send a prompt for which that file is in context. I managed to hack together an HTTP POST that uploaded it to Gemini along with a prompt, but I think the file format wasn’t supported. Either way, I’m a bit stumped! It’s an easy operation in their respective UIs, so I’m sure it must be possible.

Any advice would be most gratefully received.

1 Like

Hi @Deejay

Here’s a few thoughts, and I’ll send you a sample workflow as well.

  • LLM’s can convert files to text and feed that text to another llm
  • LLm’s can do the same with audio, video, and mp4 files.

Give me a min, and I’ll send you a workflow. What kind of file types do you want to send to the llm?

:sparkling_heart: If this helped you, click the heart to show it’s useful to others.

Thanks. I’m uploading an Excel spreadsheet, but not OpenOffice or whatever it’s called these days.

1 Like

ok @Deejay

Here’s a workflow that takes in an audio file, and a pdf and gives it to an llm. Let me see on the excel file.

:sparkling_heart: If this helped you, click the heart to show it’s useful to others.

@Deejay

If you are looking to have the llm query an excel or csv document, its best to upload it into somethign like supabase, and have the llm write a query against the supabase table.

Here’s an example where data can come from google drive and the llm can query it.

This example can get data from all types of files, including csv/excel.

:sparkling_heart: If this helped you, click the heart to show it’s useful to others.
:white_check_mark: If this solved your issue, mark it as the solution to help the community.