Data tables

Setting up an AI field

Let a column be computed by the agent from others — extract themes, translate, score.

What an AI field is — and is not

An AI field is a column whose value is neither user input nor a deterministic formula — instead, the agent computes it per row from a prompt at refresh time. Think of it as "run one small LLM call per row, save the result".

It is not real-time, free, or deterministic. Every refresh burns tokens and outputs vary. So it shines for batch jobs — tagging, summarizing, translating — and is a bad fit for displaying live state.

Three things to configure

  • Prompt — what to compute; use {column_name} to reference other fields on the row
  • Source fields — which columns the prompt reads, used for change detection in Auto mode
  • Model — prefer cheap fast ones like haiku or gpt-4o-mini; reserve GPT-4 / Sonnet for real reasoning
  • Output format (optional) — text, JSON, or select enum; select-typed output is auto-cast and validated

Example prompts

Three prompts cover roughly 80% of use cases: extraction, classification, generation. Notice how each one constrains output format — that is the single biggest lever for reducing variance.

// Theme extraction (output: JSON array)
From the {transcript} below, extract 3 themes as a JSON array.
Output only the JSON, no commentary.

// Sentiment classification (output: select enum)
Classify the sentiment of {feedback} as one of:
positive, neutral, negative.
Output only the single word.

// Summary generation (output: text, length-bounded)
Summarize {article_body} in 2 sentences for a busy product manager.
Lead with the most actionable insight.

Auto vs Manual mode

In Auto mode, any change to a source field triggers a re-compute for that row — feels magical until you accidentally trigger 1000 rows. In Manual mode, nothing runs until you click refresh; you choose "all rows", "current view", or "selected rows".

Default to Manual. Promote to Auto only after the prompt has stabilized. Manual has a bonus: after a successful batch, export the result column to CSV as an audit trail — future prompt tweaks will not silently overwrite history.

Cost control

  • Use cheap models — haiku is about $0.001 per row; GPT-4 is about $0.05
  • Pass only what the prompt needs — {summary} is 50x cheaper than {full_transcript}
  • For one-shot batches, check "Skip rows with non-empty output" so you do not double-charge
  • Check Settings → Usage for per-table / per-field token tallies — anomalies pop immediately
  • Pro multi-provider routing lets you pin AI fields to a cheap provider while chat uses a premium one

Debugging AI fields

A row looks wrong? Right-click the cell → "Show last prompt" to see exactly what was sent to the model. Nine times out of ten the issue is an empty source field that turned into undefined in the prompt, leaving the model to guess.

After editing a prompt, invalidate cached outputs via Settings → Tables → AI fields → "Invalidate cache". The next refresh recomputes everything from scratch.

Related articles

Ready when you are.

Kition is a local-first AI workspace. Markdown documents, structured tables, and an AI agent — running on your own machine, against the model provider you choose.