Coda AI vs Claude

The ability to create an on the fly AI query in an AI box which references a specific table by @ is really helpful

But for larger documents Coda AI sometimes reaches its limits and declines a query

I know can use another LLM such as Claude via a pack - but it is not nearly as easy to create queries that way which reference a specific table.

Any thoughts on how now or in the future I could create the equivalent ad hoc AI queries as easy as Coda AI but with a different LLM which has a larger context window?

Alternatively - how can I pass the contents of an entire table to Claude or some other pack as part of an AI query?

I am hoping that Coda AI will be upgraded to use a bigger context wondow when Coda-Brain is released.

And Coda-Brain is specifically designed to use your Coda tables.

Meantime, there is a trick for passing tables inside prompts to Coda AI (or to other LLMs using a pack).

Add a column to the table in question and give it a formula to render each row in Markdown format. You probably only need to include a few columns of interest.

Then pass this markdown column to the LLM as part of the prompt.
All the LLMs are able to understand the Markdown format for tables. You will need to add a ‘heading’ row that shows the column-names - but its just plain-old text manipulation.

Of course, you will need to filter the table to include only those rows needed; otherwise you will overflow the context window.

It took us a lot of experimentation to fine-tune this - but it works great.

Much appreciated @Agile_Dynamics

Sounds like Coda Brain will be ideal when it is released but this will work for now.

Will Coda Brain be available for non-Enterprise users? [I don’t mind a paid account - but Enterprise makes no sense for a very small team.]

Question - how would you construct the formula so the LLM understands the column/row relationships? Can I construct a JSON string via formula which does this?