Skip to content

Rebuild Test Data

💡 TL;DR - Rebuild Test Data

Proper rule operation requires existing data be correct - see Data Model Design

ChatGPT sometimes fails to properly compute the test data. You can rebuild your test data to match the derivation rules by using genai-utils --rebuild-test-data.

Overview

Basic operation:

  1. Builds database/test_data/test_data.py from docs/response.json
  2. Runs it to create database/test_data/db.sqlite
  3. Copies database/test_data/db.sqlite to database/db.sqlite

 

Example

Fixes project issues by rebuilding the database to conform to the derivation rules:

  1. Create genai_demo:

    als genai --using=system/genai/examples/genai_demo/genai_demo.prompt --project-name=genai_demo
    

  2. Rebuild:

    cd genai_demo
    als genai-utils --rebuild-test-data