Feature

Describe a rule in plain language, review the draft

Updated 20 August 2026

The AdOps AI rule builder turns a plain-language description into draft rule JSON using a LangChain service backed by Claude, working from the same 45-metric grammar the manual builder uses. It returns a confidence score from 0 to 100 with the draft, which you review and edit before the rule runs.

A plain-language goal becomes draft rule tasks in the normal editor, tagged as AI generated and scored 0 to 100 for confidence.

In numbers

The figures behind this feature

Confidence score range
0 to 100 Returned with the generated tasks and shown on each task card
Metric grammar size
45 metrics Injected into the system prompt from the live catalogue on every request
Progress stages shown
6 From Analyzing your goals to Finalizing recommendations, capped at 95 percent until the response lands
Request timeout
30 seconds HTTP timeout from the management API to the AI service
Extended thinking budget
10,000 tokens Default thinking budget on the AI service, configurable by environment
Output validation
None beyond JSON parsing The draft is for you to review before the rule goes live
The AdOps AI Rule Generator modal: a goal field holding a typed objective about scaling campaigns above ROAS 3, four example goals below it, and a Generate Rules button. Sample data
Describe the outcome and let the assistant draft the conditions. A preview — this panel is behind a feature flag in the shipped build. Read the details

The AdOps AI rule builder turns a plain-language goal into draft rule tasks. AdOps injects its live 45-metric catalogue into the prompt so the model works from the real grammar, then appends the returned tasks to the rule you are editing with a confidence score from 0 to 100. The draft is a starting point you review, not an approved rule.

What does the AI rule builder actually do?

You open the Generate with AI modal from the rule form and describe the outcome you want. The modal carries example goals to calibrate the detail level, and a staged progress bar narrates six steps while the request runs, from Analyzing your goals through Finalizing recommendations. The modal locks while a generation is in flight so a half-written rule cannot be closed out from under you.

Behind that, AdOps builds a system prompt from the metric catalogue stored in its database, sends it with your text to the AI service, and reads the tasks and confidence score off the response.

Why is the metric catalogue in the prompt?

Because a model asked to write rules for a system it cannot see will invent field names. AdOps avoids that by serialising its current catalogue on every request: each of the 45 metrics with its id, display name, category, unit, whether it supports a lookback period, its Meta API field and the exact operators it allows.

The prompt states the constraint plainly, requiring the model to use only metric ids that exist in the supplied schema and only the operators listed for each metric. Because the catalogue is a database collection rather than a hardcoded list, deactivating a metric removes it from the next generation with no prompt maintenance.

The AI service itself runs on a Claude model through LangChain with extended thinking enabled and a default budget of 10,000 thinking tokens, so the model reasons through the schema before emitting JSON rather than answering in one pass. Model name, token ceiling and thinking budget are all environment settings.

What the AI rule builder does not do

This is the part worth reading twice.

AdOps does not validate the model’s output against the metric grammar. The response has its code fences stripped and is parsed as JSON; if parsing fails the raw text is returned instead. There is no schema check confirming that a returned metric id exists, that an operator is permitted for that metric, or that a period is valid for it. A generated rule is a draft, and the reason it lands in the ordinary editor is so that you can read every condition before setting it live.

The model’s reasoning trace is captured by the service and stored, but it is not rendered in the interface. What you see is the tasks and the confidence score.

The confidence score is the model’s own estimate. It is a useful triage signal for deciding which drafts to read carefully, and it is not a prediction of campaign outcomes.

How does a generated rule reach the editor?

Generated tasks are not a separate artifact living in a preview pane. They are built into the same task list the rule form uses for hand-written tasks, with the same action picker, the same action frequency control, the same condition rows and the same value fields.

Each generated task renders with an AI Generated badge and a confidence chip showing the score as a percentage, and it stays editable. Change a threshold, swap the period, delete a condition, add one of your own. When you save, it is simply a rule.

The practical workflow is short: describe the goal, read every condition the draft produced, correct the thresholds against your own economics, save as draft, then set live once the estimated match count looks right.

What gets logged?

Every generation writes an AI log row before the call and updates it after, storing the request, the response body, the response time in milliseconds, the confidence score and a status. Generations made while editing an existing rule are attributed to that rule, so the log can be filtered to one rule’s generation history.

That log is queryable per user, newest first, 10 rows per page by default. It answers what was asked, what came back, how long it took and how confident the model claimed to be.

Capabilities

What this feature does, item by item.

Each line is a behaviour you can reproduce in the product today.

A goal in your own words
Describe what you want, for example scaling campaigns above a ROAS threshold when daily spend stays under a limit. The modal ships example goals to show the level of detail that works.
Grounded in the live metric catalogue
The system prompt is rebuilt on every request from the metric catalogue in the database, so the model is shown the 45 metrics, their allowed operators and their allowed periods as they exist now.
A confidence score you can see
The generation returns a confidence score from 0 to 100 alongside the tasks. The rule form renders it as a percentage chip on each generated task, next to an AI Generated badge.
Drafts land in the normal editor
Generated tasks are pushed into the same task list a human edits, with the same action, frequency, value and condition controls. Nothing about them is read-only.
A queryable generation log
Every generation is written to a log before the call and updated after it with the response, the latency in milliseconds, the confidence score and the status, filterable by rule.

Questions

Asked about this feature.

Direct answers, with the numbers attached.

How does the AdOps AI rule builder work?

You describe an advertising goal in free text. AdOps loads its live metric catalogue, injects it into a system prompt that names the allowed metrics, operators, periods and action shapes, sends the request to its AI service, and appends the returned tasks to the rule you are editing with a confidence score.

Does the AI check its own output against the metric grammar?

No. AdOps strips code fences from the model response and parses it as JSON, but it does not validate the parsed result against the metric schema. The AI rule builder drafts a rule for a human to review, and the draft opens in the normal editor so every field can be corrected.

What does the confidence score mean?

The confidence score is a number from 0 to 100 that the model returns alongside the generated tasks, and AdOps stores it on the generation log and renders it on each generated task card. Treat it as the model's own estimate, not as a measurement of how the rule will perform.

Can I tell which parts of a rule the AI wrote?

Yes. Tasks produced by the AI rule builder are marked in the rule form with an AI Generated badge and a confidence chip, and they carry generation metadata on the saved rule, so an AI-drafted task stays distinguishable from one written by hand.

Is there a record of what was generated?

Every generation is written to an AI log twice, once before the call and once after, capturing the request, the response, the response time in milliseconds, the confidence score and the status. The log is readable per user and filterable by rule.

Write this rule against your own account.

Every feature on this page is available on every plan. Connect one ad account, copy a template, and read the log after the first run.

Contact us See pricing

14 days free · no card · billed in Rupiah

Inside the product

What the screens actually look like

Nine screens from the working dashboard — the rule builder, the metric picker, the dayparting grid and the log that records what happened. Scroll the strip.

  • The AdOps Performance Dashboard showing a Purchase ROAS card at 2.380x and an Aggregated ROAS card at 2.088x, both badged Profitable, a Monthly Budget card at Rp 155jt, and a Spend Breakdown ranking the top five ad accounts against a budget utilisation bar at 45.5 per cent.
    Performance Dashboard. Two ROAS figures to three decimals, a budget meter, and spend ranked by ad account — over Today, Last 7 days, Last 30 days or This month.
  • The AdOps rule list showing twelve automation rules, each with an on/off toggle, the ad accounts it manages, and when it last triggered — some minutes ago, others on a dated timestamp.
    Rule List. Every rule, what it manages and when it last fired. The toggle is the only thing between draft and live.
  • The AdOps condition builder showing a task with time-of-day conditions across seven day tags, a nested AND group holding a lifetime spend condition under 400,000, and a second task with four stacked metric conditions.
    Conditions. Metric, period, operator, value — joined with AND or OR, and nestable, so a rule can say something a dropdown cannot.
  • The AdOps metric picker open over a condition row: a panel with Meta Ads and Custom metrics tabs, a search box, and a scrolling list of metrics with Spend selected.
    Metric picker. Forty-five Meta metrics and your own sheet columns in the same list, each carrying a reporting period and any of six operators.
  • The AdOps dayparting timetable: a grid of hours against the seven days of the week, with the daytime hours filled navy for every day and the night hours and weekend evenings left empty.
    Dayparting grid. Or draw the hours instead. Anything outside the shape you fill in simply does not run.
  • An AdOps execution log detail: one campaign, two action panels badged Not Executed, each listing the action parameters and every condition evaluated with its actual value, its expected value and a Pass or Fail badge.
    Rule Log detail. Why a rule did nothing is recorded as carefully as why it did something — actual against expected, condition by condition.
  • The AdOps activity log listing budget increases and campaign renames, each row naming the affected campaign by id, the rule that caused it and how long ago it happened.
    Activity Log. One row per change AdOps made in your account, naming the campaign and the rule responsible.
  • The AdOps ad account list: eighteen Meta ad accounts with on/off toggles, account ids, Active or Inactive badges and this month’s spend in rupiah.
    Ad Accounts. Accounts discovered from Meta arrive switched off. Nothing is read, and nothing is changed, until you turn one on.
  • The AdOps custom metric editor mapping a Google Spreadsheet: a spreadsheet id, a sheet name, a column to match campaigns on and a column holding the values.
    Custom metric. Point AdOps at a sheet, name the matching column and the value column, and your own number joins the metric list.

Every figure is rebuilt from the product’s own interface and filled with invented data — no customer name, ad account or spend figure appears anywhere on this site. See how a run works