Use cases by industry
Use case: merchandising
A buyer on the floor at Summit Outfitters needs a straight answer: which hero SKUs are about to stock out, what a category is actually earning across stores, and who owns the fix — not a stale spreadsheet, and not a confident guess about numbers nobody can trace. This guide builds that merchandising analyst end to end across seven module slices: Intake to ingest the store and category docs, Atlas to type them into a retail graph, Warrant to certify the reorder policy, Conduit to bind the live retail data warehouse, Lens to answer with citations, Lineage to trace any figure back to its source, and Crucible & Ports to measure the accuracy and ship the agent.
Follow along in the seeded workspace
yarn demo:seed retail — it appears as the Summit Outfitters (Retail) workspace, with a dozen densely-wikilinked docs, the merchandising ontology, the summit-rdw connector, a data-enabled agent with a saved run, sample answer-policy decisions, alerts, and a golden set already in place. The command is idempotent — re-running reuses the same workspace. Full catalog: Demo workspaces.Prerequisites
- A workspace key with
kb:write,kb:read,data:read,data:run,agents:run, andruns:read, exported as$ELI_KEY. See Getting started. - Owner/admin on the workspace, to certify concepts and configure the data connector.
- An enabled chat model, so
/queryand the agent can generate — otherwise409 no-model-configured.
1 · Intake — ingest the merchandising knowledge
Summit's merchandising knowledge already lives as markdown — a store-network-overview.md, per-store interviews, category and vendor references, campaign recaps like Trail Season Launch, and findings like the Inventory Health Review. Post each straight in so it becomes searchable, citable documents. The seed did this for a dozen files; this is how you'd add one:
/api/v1/documentsBearer · kb:writeSave markdown through the vault. The file, chunks, and full-text index commit before 201; embedding and graph enrichment continue as detached work, so the response contains stored-document metadata only.
The chunks and FTS index are already committed at 201. Detached embedding and extraction can then let Atlas reconcile references into the concept graph. The create payload does not expose enrichment state. Watch the store profiles (stores/boulder-flagship.md), category docs (categories/technical-apparel.md), and vendor pages (vendors/granite-textiles.md) all cross-link into one graph. Have a Confluence or SharePoint of merchandising docs instead? Wire it as a content connector per Ingest documents — the rest of this guide is identical.
2 · Atlas — type the retail graph
Extraction alone gives you a bag of names. Atlas types them against the workspace ontology — Store, Category, Vendor, Campaign, FulfillmentMethod, and System — and records typed relations: a Store carries a Category, a Vendor supplies a Category, a Campaign promotes a Category or Store, a Store fulfills_via a method. That structure is what lets retrieval follow the merchandising web, not just the text. Pull a key entity — Technical Apparel, the flagship category — and read its type, authority, and edges:
/api/v1/entities/{id}Bearer · kb:readFetch one entity with its ontology type, authority tier, and typed relations. This is the structured view Lens uses to expand a question into the right neighborhood of the graph.
Note the authority tier: machine_extracted. Atlas gave you the shape of the graph — who supplies what, who carries what — but nothing here has been vouched for yet. That is the job of the next slice.
3 · Warrant — certify the reorder policy
Every inventory answer in this workspace turns on one governed concept: the Reorder Point Policy. If a buyer is going to act on "below reorder point," that policy has to be vouched for. In Warrant, propose its canonical definition as a reviewable change rather than editing silently, then certify it — certified is the only tier the analyst states without hedging:
/api/v1/change-requestsBearer · kb:writePropose the canonical definition as a reviewable change. Approval promotes authority to at least curated and records the reviewer on the revision.
/api/v1/entities/{id}/certifyBearer · kb:writeOwner/admin sign-off — authority certified. Also starts the review clock: nextReviewAt lands at now + the workspace's reviewIntervalDays, so a certified policy can't quietly go stale.
Do the same for the source finding — verify the Inventory Health Review so its provenance carries a governance tier:
/api/v1/documents/{id}/verifyBearer · kb:writeGlean-style document verification. Stamps the verification tier, the verifier, and the next re-verify date — the governance block Lineage reports and the manifest counts.
Governance is what lets the answer policy commit. Ask "Which SKUs at Boulder Flagship are below reorder point?" and the engine returns answer at confidence 0.83 (confidence_above_answer_floor) because the claim rests on the certified Reorder Point Policy plus live data. Ask something thinner — "Should we mark down the Cascade rain shells now?" — and it returns answer_with_caveat at 0.41 (confidence_in_caveat_band), hedging instead of committing. That contrast is exactly the payoff of certifying.
Curate in the UI too
4 · Conduit — wire in the live retail data warehouse
Documents describe the assortment; the Retail Data Warehouseknows what actually sold and what's on hand right now. Conduit binds governed, read-only named queries onto entities. Summit's warehouse is wired as the summit-rdwconnector with three queries the buyers actually use. List what's available — you see slugs, titles, and param specs, never credentials or SQL:
/api/v1/data/queriesBearer · data:readList named queries (domain components) available to run, with their parameter specs and owning connector.
/api/v1/data/queries/{slug}/runBearer · data:runExecute a named query with validated params. Read-only, row-capped (maxRows 200), timed, and provenance-logged. Params are bound, never interpolated. Returns a dataCallId — the [Dn] provenance anchor.
Bound to entities, so the question runs it for you
/run by hand: Boulder Flagship → low-stock-by-store (with store fixed to the literal "Boulder Flagship"), Technical Apparel → category-performance-by-store (with category read from the question), and Retail Data Warehouse → net-sales-by-store. Authoring connectors and SQL is a deliberately UI-only, owner/admin task — the API consumes the governed surface, it never writes SQL. See Query live data.5 · Lens — a buyer asks, and gets a cited, live answer
Now the payoff. A buyer asks in plain language; Lens retrieves the documents, detects the entities in the question, runs their bound queries as governed [Dn] lookups, and grounds the answer in both documents ([Sn]) and live rows ([Dn]) — under the answer policy. Ask the workspace's signature question with includeData: true:
/api/v1/queryBearer · agents:runRun the grounded query pipeline: retrieval + entity detection + bound data lookups + one generation + a groundedness check + the answer-policy engine. Returns a dual-cited answer with a policy decision. The workspace comes from the key.
The policy block is the trust signal: answer at 0.83 because the claim rests on a certified concept plus a logged, read-only query — with the live figure carrying its [D1] anchor and the definition its [S1] citation. Ask something the warehouse and docs can't back — "What will holiday foot traffic be next year?" — and the policy engine returns abstain_with_pointers (no_relevant_chunks) rather than inventing a number. This same result also fires the seeded inventory.stockoutalert ("6 SKUs below reorder point; Granite Textiles lead time is 4 weeks"), and the whole pipeline is a native MCP tool, so it drops straight into a buyer's Claude or BI assistant.
6 · Lineage — trace the answer back to its source
A category manager acting on this asks the fair question: where is this coming from, and can I trust it? The answer cited D1 → a live summit-rdw query and S1 → docId 01KY18…. Pull that document's lineage and read the whole trail in one call — origin, governance, and the downstream answers it is grounding right now:
/api/v1/documents/{id}/lineageBearer · kb:read or runs:readThe unified per-document lineage trail: origin provenance, governance, the audit trail, derived knowledge, and downstream impact. This is how you prove an answer's pedigree end to end.
There it is, closed loop: the answer traces to an ingested finding (merchandising/inventory-health-review.md), the document is certified, and it is currently grounding 9 answers — so an edit to it has a known blast radius. And the live figure has its own trail: the [D1] anchor points at a data_calls row that recorded the exact SQL, the bound param (store = "Boulder Flagship"), and the status. Two provenance trails behind one answer — the document and the query — and the manager didn't have to trust the model; they read the pedigree.
Same trail, in the document view
DocumentLineage as a visual trail on the document page (via the BFF at GET /api/w/{workspaceId}/documents/{docId}/lineage), and an agent can pull it mid-run with the kb_document_lineage MCP tool. One shape, three surfaces.7 · Crucible & Ports — lock accuracy in, then ship the analyst
Merchandising changes weekly — new campaigns, shifting lead times, mid-season markdowns — and a wrong inventory answer costs a sale or a margin point. Capture the questions buyers actually ask as a golden set so Crucible can prove the assistant still answers them after every change. The seed ships the Merchandising Q&A baseline set with items like "Which vendor supplies Summit Outfitters' technical apparel?" (Granite Textiles), "Who manages the Boulder Flagship store?" (Dylan Cruz), and the harder "Why did footwear maintained margin erode during the Trail Season Launch?". Anchor a provenance qrel from the vendor doc that should ground the first one:
/api/v1/qrelsBearer · kb:writeAuthor a graded relevance judgment for a golden item. source=provenance derives the highest-grade judgment from the item's anchored citation — deterministic, no judge model needed.
Run the set, then read the metrics for the run. Retrieval and abstention numbers are deterministic; RAGAS numbers carry the judge model that produced them:
/api/v1/evals/runs/{id}/metricsBearer · kb:read or runs:readRetrieval, RAGAS, and abstention metrics for one run — overall and by facet. The ruler for 'did the assistant get worse?'
Once the numbers hold, ship it. The workspace seeds the merchandising-analyst agent — data-enabled, cites the document or data source for every claim, and abstains without verified backing. Drive the exact same harness the UI uses over the agents surface:
/api/v1/agents/{slug}/runsBearer · agents:runStart a run of the named agent. SSE stream when stream is true (default); a blocking JSON RunResult when false. Runs are keyed, attributed, and budgeted, and leave a full step trace.
The seeded run leaves a full, ordered step trace at GET /api/v1/runs/{id} — the model calls, the kb_search and the summit-rdwdata lookup, tokens, and cost — so every automated answer comes with its own receipt. When a metric drops after a merchandising change, the golden set names exactly which question regressed, and promoting that miss back into the set turns it into a permanent test. That is the dashed loop in the diagram: Crucible's regressions steer the next round of Warrant curation. Compare two configs behind a two-gate significance test in Measure & compare.
The leverage
Seven slices, one retail graph, one audit trail. The buyer gets a fast, cited, live answer; the manager can trace any figure to a certified concept and a logged read-only query and see its blast radius; and the analyst is shipped, budgeted, and measured, so accuracy is a number you watch rather than a hope. Swap outdoor gear for grocery, apparel, or hardgoods and the shape is identical — the platform doesn't care what the SKUs are, only that every answer is grounded, governed, traceable, and measured.
Keep going