Smart Entry

Pick a supplier and four fields predict at once — cost center, account code, project, approver. Tab to accept, Esc to reject.

Smart Entry: screenshot from the ERP demo
📋 ERP_predictERP
In shortPick a supplier, four fields predict at once — cost center, account code, project, approver. Tab to accept, Esc to reject.

The problem

ERP data-entry forms are the most repetitive UI in the modern enterprise. Every row asks for the same eight fields; the user fills in two and the rest follow by historical pattern. Multiplied across the thousands of rows a clerk enters per month, the effort cost is enormous and the error rate is non-zero — every misclick produces downstream cleanup.

Smart Entry inverts the flow. The user picks ONE field (usually the supplier or the project); the system predicts the rest in parallel and pre-fills the form. The user reviews, tabs to accept, or hits Esc to override. The cognitive load on the predictable fields collapses; the user's attention goes to the truly novel parts of the row.

How it works

Smart Entry is _predict wired into the form UI itself. When the user enters the supplier (and, as they type it, the description), the form asks for the remaining fields: one _predict per field, each conditioned on what has been entered so far. The predicted values render as soft fills in the empty inputs.

Each predicted field has its own confidence, shown beside it and coloured by band: green from 0.85, gold from 0.5, red below. The user tabs through to accept, or types to override, per field, and a field the user has entered is never overwritten by a later prediction. Every override written back to the table is in the next query, so the next row's prediction reflects the correction.

{
  "from": "purchases",
  "predict": "cost_center",
  "where": {
    "supplier": "Lindström Oy",
    "description": "Workwear order"
  },
  "select": [
    "$p",
    "$value",
    {
      "$why": {
        "highlight": {
          "posPreTag": "«",
          "posPostTag": "»"
        }
      }
    }
  ],
  "limit": 10
}

// One query per field: the form sends the same body with predict
// set to account_code, project and approver.

For the full architecture, see the technology overview. For the broader narrative across multiple use cases, read The Predictive Application. For the whole picture, see predictive ERP.

See it live

This use case runs in the 📋 ERP demo today. Click through to the live application and inspect the queries that produce the result.

Open the live demo →

Build it with Claude Code

Paste this prompt into Claude Code, or another coding agent, in your own codebase. It runs Aito locally from the Docker image, reads the API docs written for agents, and follows a working reference implementation.

Smart entry: a prompt for Claude Code
Add smart entry to this codebase using Aito, a predictive database. The feature: predict the cost center, account code, project and approver of a new purchase as soon as the user picks the supplier, from our purchase history, for the user to accept or reject.

1. Run Aito locally: `docker pull ghcr.io/aitohq/aito`, then follow https://aito.ai/docker/ to start it with your own API keys (keep them in the environment, never in code).
2. Read https://aito.ai/docs/api/llms.txt for the v2 query shapes before writing any query.
3. Read the use-case guide: https://aito.ai/use-cases/smart-entry/
4. Use this reference implementation as the pattern (schema, data load and queries): https://github.com/AitoDotAI/aito-erp-demo/blob/main/src/smartentry_service.py and https://github.com/AitoDotAI/aito-erp-demo/blob/main/src/aito_client.py
5. Find the matching tables in this codebase, design the Aito schema for them (links between tables where we have foreign keys), and load a sample.
6. Measure before wiring the UI: hold out recent rows, run the predictions, and report accuracy against the current behaviour.
7. In the UI, show the confidence ($p) and the reasons ($why). Fill in automatically only above a threshold I choose; below it, suggest.

Ask me before changing anything outside the new feature.

Frequently asked

How is Smart Entry different from Smart Form Fill?

Smart Form Fill is the general pattern; Smart Entry is the ERP-specific instance wired into purchase-order entry. Same underlying _predict, one query per field; same UX of tab-to-accept. Smart Entry uses ERP-specific fields (supplier, cost_center, project, approver) by convention.

How does the form handle the case where the supplier is new?

A new supplier returns low confidence on the predicted fields, shown in red beside each one, so the user knows to fill them rather than accept them. The entry flows back as the new supplier's first observation; the next row from that supplier will have higher confidence as more data accumulates.

Can users disable Smart Entry per field or per form?

Yes. Application-level toggle. Most deployments enable Smart Entry for high-confidence fields and leave low-stakes fields manual. The user-level toggle lets individual clerks turn it off if they prefer.

Does this slow down the form?

No. Smart Entry runs in the background while the user types on the anchor fields, debounced, and fills the fields when the predictions arrive; the user can keep typing meanwhile, and nothing they have entered is overwritten.

How does Smart Entry interact with copy-paste from spreadsheets?

Paste fills the anchor fields; Smart Entry runs the prediction once paste completes. The user reviews the full row of predicted values rather than per-field. Bulk paste with smart-entry post-processing is a common workflow for monthly entry batches.