Skip to content

Blog

Build a Data Flow by Describing It, Then Check Every Node

A hands-on walkthrough of Ciaren's Flow assistant: describe a sales report in one sentence, review the nodes, change it, undo it and diagnose a failed run.

About this post

Published
Reading time
8 min
Author
Ciaren team

Topics: flow-assistant, tutorial, visual-etl, data-cleaning

Can you get a working data flow by typing one sentence? With the Flow assistant in Ciaren 0.4.0 and later, yes: you describe the result, the assistant proposes ordinary nodes with their settings, and you decide whether to save them. Nothing is saved until you choose Apply and save, and nothing runs until you choose Run. This walkthrough builds a small sales summary that way, then changes it, undoes a change, asks the bundled guides a question, and works through a failed run.

You need Ciaren 0.4.0 or later and an API key from one of the supported providers. The assistant is off until you add a key under Connections → Assistant API keys, and provider calls are billed to that key, so a key with a spending limit is a good idea. The quick start covers the setup.

The file

Download sales.csv. It has six orders and the usual problems of a hand-kept export:

csv
order_id,region,amount,ordered_at,internal_note
1001,North,120.50,2024-01-03,batch-a
1002,south,89.00,2024-01-03,batch-a
1003,North,,2024-01-04,batch-b
1004,South,-5.00,2024-01-04,refund
1005,,42.25,2024-01-05,batch-b
1006,north,210.00,2024-01-06,batch-c

The region is spelled three ways, one order has no amount, one is a refund, and one has no region. The report you want is total sales and order count per region, largest first, without the internal note.

Upload the file on Datasets, create a blank flow in the same project, and open Assistant in the editor toolbar.

1. Describe the report

Choose Build, select sales.csv under Input dataset, and type the whole report as one request:

Drop internal_note, remove rows with no amount and refunds (amount of 0 or less), lowercase region and fill a missing region with Unknown, then total amount and count order_id per region, largest total first

Then choose Create proposal. Two things in that sentence matter more than its length.

First, it names the columns. By default the provider does not receive your column names, only references and coarse types. Names you type in the request are matched to the dataset's columns, so amount and order_id in your text point at real columns. Our docs record that a shorter version of this request, without the column names, ran but guessed some columns.

Second, it turns a business rule into a condition. "Refunds (amount of 0 or less)" can become a filter. "Remove refunds" leaves the assistant to guess which rows are refunds. When a request leaves a real choice open, the assistant replies with a question and one button per option instead of a proposal.

2. Read the proposal before you apply it

When we sent this request with DeepSeek's deepseek-flash model, the proposal had eight nodes. Your model can produce a different plan, so treat this list as what to compare against, not a promise:

NodeSettingWhat to check
File Inputsales.csvThe right dataset and version
Drop Columnsinternal_noteOnly the note is dropped
Filter by Expressionamount > 0One filter covers two of your instructions
String Transformregion to lowercaseRuns before the fill
Fill Nullsregion with UnknownFills region only, not amount
Group By Aggregateby region: sum amount, count order_idBoth measures are there
Sort Rowsamount, descendingSorts the totals, not the input rows
File OutputCSVThe output you expect

The filter is the one to read slowly. You asked for two things, rows with no amount and refunds, and got one expression. That is correct here: a comparison with a missing value keeps no row, so amount > 0 drops order 1003 and order 1004 together. If you wanted the missing amounts kept for a separate review, this is the moment to say so, before anything is saved.

The order of String Transform and Fill Nulls also shows up in the result. Lowercasing runs first, so the filled value keeps its capital letter: the regions come out as north, south and Unknown.

The proposal lists every setting of each new node, and the expression nodes show their whole expression. If something is off, choose Edit request and say what to change, Regenerate for a fresh attempt, or Discard. The assistant's own checks run on placeholder rows with your column types, so they confirm that types and wiring fit. They cannot tell you whether the result is what you meant. That part is your review.

Four stages of a Flow assistant request: describe, proposal, apply and save, run. Only the run reads your real rows, and you start it.

3. Apply, then run it yourself

Choose Apply and save. The nodes appear on the canvas as a new saved revision of the flow, and a message offers Undo for about 12 seconds. Applying never runs the flow. Close the panel, choose Run, and open the output:

regionamountorder_id
north330.502
south89.001
Unknown42.251

Check it against the input before you trust it. The totals add up to 461.75, which is 120.50 + 89.00 + 42.25 + 210.00, the four positive amounts. The counts add up to 4, one per order that survived the filter. If you see 456.75, the refund got through. If you see a North row next to north, the lowercasing did not happen.

4. Change it with one more sentence

The flow is now on the canvas, so the next request describes a change instead of a whole flow. Say you only want regions with real volume in the report:

Keep only regions whose total amount is above 50

The assistant sees the node types and connections on the canvas, but not their current settings, so say what should change rather than "fix the filter". Its proposal lists the nodes it adds or updates and the connections it moves.

Read where the new filter sits. After Group By Aggregate, it tests each region's total and drops Unknown. Before it, it would test each order. On these six rows both placements happen to give the same two rows, because order 1005 is the only order under 50 and the only Unknown order. The output cannot tell you which one you got. The proposal can.

5. Undo a change you no longer want

Two kinds of undo are available, and they do different things:

  • Within about 12 seconds of Apply and save, the Undo in the message reverses that saved change as a new revision.
  • Later, open Assistant → Activity. Each confirmed change has an entry. Preview reversal shows the inverse without touching the flow, and Confirm reversal saves it as another revision. A reversal keeps unrelated later edits when it can prove that is safe, for example a later sort edit.

The Undo button in the editor toolbar is different again: it edits the canvas in memory, like any manual edit. Save or discard pending edits before you reverse a saved change.

6. Ask the guides instead of searching

Choose Guides and ask a question about Ciaren itself, for example how to put the run date in the output file name. The server searches the documentation bundled with your installed version and sends up to five matching passages to the model, which picks one. The answer is that passage, with a link to its exact revision and line, so you can read it in context. When no passage supports an answer, it can tell you so. The index is English only.

7. When next month's run fails

A month later, the February export arrives without the internal_note column. You upload it, select it in the File Input, and choose Run. The run fails at Drop Columns, because the column it should drop does not exist.

Choose Diagnose. It looks at the flow's most recent failed run, sorts the error into a category on the server, and sends the category and the shape of the graph to the model, not your rows or the raw error text. Diagnose proposes a fix only for two narrow cases: an inner Join that drops unmatched rows, and a single-input flow made only of basic cleaning steps such as filters, sorts and column drops. This flow also has String Transform, Fill Nulls and Group By Aggregate, so you get a check to make and a note that the canvas needs a manual edit.

That is the honest answer here. The assistant cannot delete a node that was already on the canvas, so remove Drop Columns yourself and connect the File Input to the filter. Then run it again and repeat the totals check from step 3.

It is still your flow

Everything the assistant built is an ordinary Ciaren node. You can open any of them and change a setting by hand, run the flow with pandas or Polars, and choose Export to get a standalone Python script of the same flow. The script does not need Ciaren or the assistant to run. The sales analysis example builds the same report by hand, with its exported pandas code, if you want to compare the two.

Results depend on the provider and model you pick. The Flow assistant guide lists which nodes it can create, what it never touches, and its limits. The prompt examples show 20 tested requests and the flows they produced.

Keep reading