Skip to main content
Version: v2.4.0

Setup

Before You Begin

You'll need:

Everything you need lives under docs/demos/racing/ in the source repository:

FilePurpose
schema.sqlOracle DDL plus seed data for 20 teams, 100 drivers, and Rounds 1–5. Round 6 is scheduled but has no team points yet.
prompts.jsonA motorsport-analyst prompt bundle that tunes the NL2SQL, Vector Search, and combined-mode prompts for this dataset.
corpus/100 per-driver Markdown briefings used in Step 3.
finale_insert.sqlThe late Round 6 team-points insert used during the Final Reveal.

Download the files you need from the GitHub links above, and keep them together in a local racing/ directory.

Load the schema

Connect to your Oracle AI Database as the user the AI Optimizer is configured to use, and run schema.sql.

If you are using the database created during the Walkthrough, it runs in a container that cannot access files on your host. Copy the demo directory into the container first, then load the script from inside it:

podman cp /path/to/racing ai-optimizer-db:/tmp/racing
podman exec -it ai-optimizer-db sqlplus '<AIO_DB_USERNAME>/<AIO_DB_PASSWORD>@<AIO_DB_DSN>'

AIO_DB_USERNAME, AIO_DB_PASSWORD, and AIO_DB_DSN are the username, password, and connection string configured in Configuration > Databases. The Walkthrough uses WALKTHROUGH, OrA_41_OpTIMIZER, and //localhost:1521/FREEPDB1.

@/tmp/racing/schema.sql

Use the CORE database created by the Walkthrough for this demo. schema.sql drops and recreates the racing tables, so run it only in a database or schema you are happy to reset. It then seeds Rounds 1-5 for all 100 drivers.

The per-team strength factor is randomized on every reset, so the pre-finale standings and the eventual champion change each time you re-run the script.

Verify the seed

Confirm that the seed contains a known driver with results before Round 6:

SELECT driver_label, team_id FROM drivers WHERE driver_code = 'Driver001';

SELECT COUNT(*) FROM race_results rr JOIN drivers d USING (driver_id)
WHERE d.driver_code = 'Driver001';

Import the prompts

In the AI Optimizer, navigate to Tools > Prompts, select Upload, choose the prompts.json file you downloaded, then select Upload Prompts.

This installs:

  • A motorsport-analyst system prompt
  • An NL2SQL prompt
  • A Vector Search prompt that grounds answers in the retrieved driver documents
  • A combined-mode classifier and synthesis prompt that routes structured vs. narrative asks

See Prompt Engineering for more on managing prompts.

Enable Models

Enable the language and embedding models if they are not already enabled.

The demo has been tuned against the on-premises models used in the Walkthrough: Ollama granite4.1:8b with mxbai-embed-large. Other Language Models may work, especially larger ones, but may require some prompt engineering.

See Model Configuration for more on configuring models.