Text templating (for LLM prompts)

Hey all - I am looking to build some LLM prompts that require the ability to iterate over arrays or access portions of an object.

It seems expressions provides a good way to provide the insertion of variables (by using the concat ~ operator) into text. But what if I want to do something more complex like iterate thru an array?

So if have an array that can have a unknown number of entries:

["a","b","c","d"]

And I want the text in a variable to read:

This is letter a
This is letter b
This is letter c
This is letter d

Anyone run into this before? Curious how people are building truly dynamic LLM calls in Xano.

4 replies