LeverageAI / Practical worksheets
Knowledge-base build record
Run the example, then plan the records and tests for one business question.
- Runnable source files and synthetic records
- Tests for dates, evidence and client boundaries
- A build worksheet and completed example
A free worksheet from ailevrg.com/guides/ai-knowledge-base
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 ↓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.
Application
Identify the client and topic
Use the supplied example identity; a real service must obtain it from an authenticated session.
Software
Select authorised, current records
Check client, team, validity dates, collection date and complete source information.
Software
Check agreement between sources
Return unknown when the available current facts disagree.
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.