How to get started with Coda AI?

Practical tips to get the results you need

6 min readJul 25, 2023

--

In Coda we have late July 2023 three ways to use AI:

  • on the canvas, acces via “ / “ to see the options
  • in a table on row level and on column level
  • AI blocks — via the canvas

These AI tools permit you for example to:

  • Create a table with as many columns as you find rows in table and use the names as column names (works great, but is also risky, certainly when you are new to Coda and you don’t yet understand how to set up tables properly).
  • Get me a list of products from (the AI, or somewhere in your doc).
  • Address correction, name corrections (I blogged about).

This is all good stuff and while the address and name parts are not 100% correct, applying AI goes faster than most other things I can imagine. Progression, not perfection. In my opinion these advantages AI offers are helpful, but not essential in a Coda context.

Coda can do more, offers even better applications. Isn’t that promising? Before we explore this (more about this approach here), we start with the basics.

AI Blocks

The canvas is the home of the AI block, you find it by typing / and then writing ‘AI block’

getting the AI block

Below what you see when selecting the AI block. You are directly invited to do something with it.

The AI block as it presents itself.

And once you are in there: you can change the prompt via the top left magic symbol.

how it works — wrting one poem

One prompt can also create 5 poems in an AI block as asked for. Excellent job. This is the kind of work most Coda makers can see happening without reading this or any other blog. You only need to know how to find the AI block (back slash on the canvas and type ‘ai bl’).

I am a poet and I need 5 poems

Each poem is about cleaning the house

Each poem should have a different style one can recognize without seeing the name of the writer that inspired you

Each poem has 6 lines

Poems are separated by a line break

Poems start with a H3 heading that shows the essence of the poem that follows
5 poems generated via one prompt

The different flavors are part of a single task. We can add extra complexities manually, but it will remain one prompt with one task.

Spice it up the Coda way

The advantage Coda offers is that we can use formulas, controllers and actions to instruct our prompts. In the screenshot below I replaced a few variables with controllers on the canvas.

showing how to make prompts more dynamic

and as expected this worked very well:

using variables in our prompts

This is a start, the very beginning. Before we continue with adding Coda logic like buttons, a few words about the prompt design.

Prompt design:

I was listening to a Google podcast on prompting and they discriminated between these three which I noticed as well in a few Twitter posts.

  • Zero shot prompt: the model is given a natural language description of the task and is expected to learn the task from the description alone
  • One shot prompt: the model is provided with one example to the LLM within the prompt to give some guidance on what type of response you want.
  • Few shot prompt: similar to one shot prompt, but the model is given multiple labeled examples of the task.

I am mainly interested in the few shot prompt for content generation using the AI column and the AI block. Both can be referenced and fueled with examples. Many examples are needed to avoid confabulation.

Confabulation risk

When asking for input there is the confabulation risk. Large Language Models are prone to producing incorrect, but plausible facts, a phenomenon known as confabulation or hallucination. These errors can be deeply woven into the outputs of the AI, and can be hard to detect. As a prompt artist we have to understand very well the elements that design a proper prompt, one that will stick to the logic we want the AI to follow.

Proper prompting

To avoid confabulation in our prompt design we follow in the next blogs a specific set up. It took me some time to understand and accept that I had to relate to the AI as I would approach a person you endow with a task. When writing formulas, you step away from human aspects, they hinder more than help. In this AI context it is all about humanization.

  • Role & goal
  • Do’s and don’ts (tasks and limit the scope, telling what — not — to do)
  • Style. This one has a double meaning. It is about formatting like present it as H3, but also style the outcome as in this example or these exemples.

What I present looks a bit like the contribution of Bill. His and other variations are all efforts to make prompting easier to understand and better in output. They all have in common that you start with the most important things first and that is that you define the role you take up and the goal you are after.

bill offers an intesting set up

The presented approach aligns also with more research driven remarks we find in papers on AI as you see below. Notice the word ‘then’ used to instruct the AI with executing steps

More instructions you find here.

The common elements are the relevance of order, steps and precision. In programming and in the Coda Formula Language these elements matter as well, but as said with AI you have to learn to relate to AI and that may be harder for many classical formed developers than for people with a background in humanities.

My background is in Philosophy. This master was an exercise in learning to ask the right questions in a logical way. This time to a bot.

In our next blog we focus on prompt design in the context of legal texts. You want to read the official Coda AI blog on the matter? Have a look.

My name is Christiaan and blog about Coda. Since the summer of 2023 mainly about how to Coda with AI to support organisations dealing with texts and templates. My blogs are for beginners and experienced users. The central theme is that in Coda everything is a list.

I hope you enjoyed this article. If you have questions feel free to reach out. Though this article is for free, my work (including advice) won’t be, but there is always room for a chat to see what can be done. You find my (for free) contributions to the Coda Community and on Twitter.

Coda comes with a set of building blocks ー like pages for infinite depth, tables that talk to each other, and buttons that take action inside or outside your doc ーso anyone can make a doc as powerful as an app (source).

Not to forget: the Coda Community provides great insights for free once you add a sample doc.

--

--

Christiaan Huizer

Written by Christiaan Huizer

I write about how to Coda . You find blogs for beginners and experienced makers. I publish about 1 / week. Welcome!