Looking for some basic advice about best practices to get me started with a task.
Goal: go through a few hundreds entries in Supabase, run a LLM analysis on each entry (using a fixed system prompt), and generate a list of categories.
The categories list should then be saved and re-used in subsequent queries, so over time we’re curating the list (bonus: remember which lines provided which categories)
I guess I’ll need an AI Agent node that uses Supabase as RAG source. It will need to go over each line, then run again over the whole list once it has extracted all categories.
This feels like a trivial workflow but I’ll still be happy for some guidance
For the sake of documentation and resolution of this post:
The solution I found was to add a “Loop Over items” node.
I then run my AI analysis/operation, fit the output to my needs, and save back to supabase (or do whatever else you need to do).
In a previous version I didn’t save back to supabase, but used the “Done” branch of the loop node, then ran the operation.
Note the query I run in the first Supabase node. I use a string query select=id,url,markdown¶meter_A=eq.{{ $json.parameter_A }}&order=id.asc{{ $if($json.limit > 0, "&limit="+$json.limit, '') }} which allows me to control the exact query, and also pass in some variable parameters from a previous step (webform, chat, whatever)