LeverageAI← Back to the guide

LeverageAI / Practical worksheets

Knowledge-base build record

Run the example, then plan the records and tests for one business question.

Your answers stay in this tab. Save an editable copy before you leave.

Download and unzip the code example. The default run needs Node.js 22 or later and no API account. Use the worksheet when adapting the design.

See the example ↓

Question and records

Boundaries

Answer and review

Tests

Worked example · Invented for this guide

The downloadable reporting question

Invented teaching example. No client outcome is claimed.

Sources

Two invented reporting agreements for client A, with separate validity periods.

Selection

The query identifies client A, reporting-frequency, account-a and 2026-10-01.

Only the current authorised agreement is selected.

Answer

monthly; source report-a-current; exact quotation and original dates included.

Negative tests

An account-a request for client B returns unknown.

The two current budget decisions disagree and require a person.

A request after all reporting records expire returns unknown.

The sample answer path
  1. Application

    Identify the client and topic

    Use the supplied example identity; a real service must obtain it from an authenticated session.

  2. Software

    Select authorised, current records

    Check client, team, validity dates, collection date and complete source information.

  3. Software

    Check agreement between sources

    Return unknown when the available current facts disagree.

  4. Software or optional model

    Propose and validate an answer

    Accept only the selected structured value with a matching record ID and exact quotation.

The final answer includes origin and dates from the records. The model cannot supply replacement metadata.