the AI layer
A grid your team can talk to.
The people who read your data all day should be able to ask it a question, get a figure explained, and make a change in the words they would use out loud. The AI layer gives the grid all three, and it does it on your terms: you bring the model and the key, the grid grounds every answer in the figures it computed, and nothing changes until a person approves it.
three things a person can do
Explain a figure, ask a question, change data.
Explain a figure in plain language
Press Explain on a stat tile, a column or the whole filtered view and get a few sentences that say what the numbers show, ready to paste into an email. Every figure in the reading is reconciled against a value the grid actually computed for what is on screen, so a number that traces to nothing is stripped before you see it. It follows your filters, so narrowing the grid and asking again narrates the narrower set.
Ask your data in plain English
Drop an ask bar above the grid and someone types "show overdue invoices by region" or "sort by amount, biggest first". The grid answers by filtering, sorting and grouping itself. The model returns a query, never data, and the grid checks that query against its own columns and runs it in its own engine, so every row you see is a real row the grid returned. Point the ask bar at one feed and a single question moves the grid, a chart and the tiles together.
Change data, safely
Someone types the change the way they would say it, "set the Network Upgrade project to In Progress", and the grid shows exactly what it would do before it does anything: it finds the row they named, resolves the label to the value you store, and lays out a before and after diff. Nothing is written until a person approves it, and every approved change goes through the same gate one of your own people's edits does, so a rule that blocks or reviews a change leaves nothing to chance, and any change can be undone.
on your terms
Your model, your key, your decision.
The grid ships no model and holds no key
The grid makes no AI call of its own. It calls one callback you supply, so you choose the model, hold the key, and own the request and the privacy decision. What leaves the browser is only what your callback sends, and there is no flag that turns that on by accident.
Grounded in what the grid computed
An explanation is a plain-language rendering of figures the grid worked out here, so it cannot make a number up. An answer to a question is a query the grid validates and runs itself. A proposed change is checked against your real columns and rules, so an unknown column, an unknown label or a value your rules reject is refused rather than half applied.
A person is always in the loop
Every answer is shown before it lands. A reshaped view previews the resolved query in plain words, and a change previews a before and after diff bounded to the rows you are looking at. A model that gets something slightly wrong produces a visible wrong answer you can decline, not a silent one you have to catch later.
Included, not an add-on
The AI layer is part of the grid you already have, not a separate tier or a metered service. It is a small opt-in module that changes nothing in the grid core, and a page that never shows an ask bar never loads it.
one callback to your model
All three, from one place you control.
Load the AI module and hand createAI a single callback to your own
model. From there the grid gains an ask bar, an explain panel and an actor bar, each checking
its work against your real columns before anything reaches the screen. Build your own interface
instead with the same calls underneath.
<!-- the grid and the AI module, as globals -->
<script src="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid/lattice-grid.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid/modules/ai.min.js"></script>
<script>
var createAI = LatticeGridAI.createAI;
// You supply the model. You supply the key. The grid makes no AI call of its
// own; it calls this one callback and checks whatever it returns.
var ai = createAI(grid, {
ask: async function (req) {
var reply = await myModel(req); // your model, your key, your network call
return reply;
}
});
ai.askBar(document.querySelector('#ask')); // ask your data a question
ai.actorBar(document.querySelector('#change')); // propose a change, you approve
var reading = await ai.explain('revenue'); // explain a figure in plain words
</script>
Try it on localhost, free.
Every AI demo runs the whole thing in your browser with no key, so you can watch a figure get explained, ask your data a question and approve a change before you decide anything. Licence per domain when you ship.
Explain a figure Ask your data Change data safely Move many views at once