Browser fixture adapter, strict result validation, source checks, human review, abort/timeout tests and a lazy Vue annotation reader.
02 / AI integration workbench
Evidence before
automation.
Turn a service ticket into a reviewable next step. Inspect the sources, test the contract, then decide what happens.
Ticket → grounded draft → human → adapter
A small workflow. Explicit boundaries.
Synthetic service ticket
12–2,000 characters. Document instructions are untrusted data. Text and drafts stay in this tab’s memory.
Ready. Four fixture attempts per ten seconds.
A grounded draft
The adapter returns a typed classification, recommendation and exact source spans. Invalid output never reaches review.
Inspect the output schema
Read the source material
Locally authored synthetic documents, revision 1. Citation links highlight exact spans. Matching text does not establish a recommendation’s correctness.
04 / Human decision
You decide. The adapter waits.
No customer contact or real service API is connected.
Generate a valid, actionable draft to begin review.
Open this view to load the local Vue runtime.
Measure the contract
Failures belong in the test set.
Reproducible synthetic cases measure fixture behavior, not model quality or production throughput.
No evaluation run in this tab yet.
| Case | Result | Elapsed (ms) |
|---|---|---|
| Run the evaluation set to populate this table. | ||
Method: performance.now() around each assertion, sequentially in this browser. Cancellation and timeout tests use accelerated 30/10 ms fixtures; service-desk latency is intentionally 650 ms. Timing depends on this device and is not a service-level claim.
Engineering evidence
Test fixtures, approvals, and failure cases.
The optional server-side Responses API adapter. It needs approved infrastructure, authentication, budget and review before enabling. No key belongs in this page.
Live model reliability, people leadership, paying client references, high-traffic operations or RFP compliance.
Lab discussion / AI Integration Workbench
What would you try next?
Ask about the code, compare an approach, or describe an edge case. Reader comments are reviewed before publication.
Code walkthrough
Follow the implementation in code.
These short excerpts connect the lab’s behavior to its implementation. Each example links to the full tutorial step for its context, tradeoffs and checkpoint. Names and dependencies belong to that source; the excerpts are not standalone programs.
Define the data contract before the prompt.
Accept a small, predictable payload and make abstention representable. Begin with the synthetic tickets and documents in core.mjs . Dealer references use the shared Lab’s synthetic D001 -style identifiers; there is no private customer join.
const input = validateInput({
ticketId: 'SYN-1042',
body: syntheticTicket,
scenario: 'normal'
});
const draft = validateResult(fixtureResult(input), input);
Put each external dependency behind an adapter.
Keep provider behavior replaceable and failure states observable. Start with the validated contract. Live provider access is not required or authorized for this demo.
const controller = new AbortController();
const adapter = makeFixtureAdapter({ latency: 650, timeout: 2500 });
const result = await adapter.analyze(input, { signal: controller.signal });
// On cancel or an edit:
controller.abort();
Make citations verifiable by the application.
Give reviewers exact evidence they can inspect. Use immutable revisioned source documents and the current trimmed input text.
const source = sources.find(s => s.id === cite.sourceId);
if (!source ||
source.text.slice(cite.start, cite.end) !== cite.quote ||
cite.end - cite.start !== cite.quote.length) {
throw new Error('Citation rejected');
}
Make human review a state transition.
Prevent an actionable draft from becoming an external action by accident. Use a validated result and an explicit reviewer confirmation.
const review = approve(draft, { confirmed, note });
const receipt = await fixtureHandoff(review, { signal });
// receipt.sent is always false in this demo
Measure the behavior you can actually prove.
Verify contract handling, not a fictional production benchmark. Run the pure Node tests and the browser workflow against a loopback preview.
node --test lab/ai-workbench/tests/core.test.mjs
# From an isolated test installation with Playwright 1.62.1:
PLAYWRIGHT_MODULE=/absolute/test-dir/node_modules/playwright/index.mjs \
LAB_BASE_URL=http://127.0.0.1:4173 node lab/ai-workbench/tests/browser.mjs