Setup
Before You Begin
You'll need:
- A configured AI Optimizer from the Walkthrough, or an equivalent installation with an enabled embedding model and a language model with solid tool use.
- A dedicated Oracle AI Database user with permission to create tables and views, and its database connection selected in the AI Optimizer. The
DB_DEVELOPER_ROLEgranted in the Walkthrough is sufficient. - SQLcl installed where the Server runs. The Server registers the configured database aliases for NL2SQL.
Everything you need lives under docs/demos/racing/ in the source repository:
| File | Purpose |
|---|---|
schema.sql | Oracle DDL plus seed data for 20 teams, 100 drivers, and Rounds 1–5. Round 6 is scheduled but has no team points yet. |
prompts.json | A 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.sql | The 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
schema.sql resets the racing and embedding tables owned by the connected user. Run the demo with a dedicated database user so its schema can be reset without affecting embeddings used by other workloads.
Connect to the dedicated demo database as its application user, then run schema.sql.
For the database created during the Walkthrough, copy the demo directory into its container, then load the script from inside it:
podman cp /path/to/racing ai-optimizer-db:/tmp/racing
podman exec -it ai-optimizer-db \
sqlplus 'WALKTHROUGH/OrA_41_OpTIMIZER@FREEPDB1'
@/tmp/racing/schema.sql
The script 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.
The bundle includes:
- Motorsport-analyst prompts for LLM-only and tool-enabled agents
- An NL2SQL prompt with the racing schema
- Vector Search prompts for retrieval, contextualization, discovery, and grading
- Combined-mode classifier and synthesis prompts
- A Testbed evaluation prompt
See Prompt Engineering for more on managing prompts.
Enable Models
Enable the language and embedding models.
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.