Skip to main content
Version: v2.4.0

Ready to Race?

Before starting the demo, confirm that all setup steps have been completed:




Let the Race Begin

Choose your driver

Choose a driver number <N> from 1 through 100. That is your driver for the rest of the use case. For example, Driver 7 is Driver 7 in chat, Driver007 in SQL, and driver_007.md when you upload the briefing.

A few prompts use <M> for any other driver you want to compare against.

Multiple Drivers

If several people are "racing" together, each participant should pick a different driver number.

Open Chatbot. Before each step, use Tool Selection in the sidebar to match the settings shown.

Step 1: LLM-only

Settings

Vector Search: Off; NL2SQL: Off

Introduce yourself:

I am Driver <N>

Ask:

What is my driving style?

How many championship points do I have?

What team am I on?

What to look for: the model either refuses, hedges, or makes up an answer. It has no idea who Driver <N> is in this championship.

The model is capable, but it has no idea what "Driver <N>" means in this championship. Next, we connect it to the data.

Context and Grounding

The model's trained knowledge does not include this championship. The AI Optimizer augments each answer at runtime: conversation history establishes who "I," "my," and "me" refer to, while NL2SQL and Vector Search retrieve current database rows and driver notes.

The model answers from that retrieved context rather than guessing from its trained knowledge. The following steps show how the answer changes as structured data, documents, and then both sources become available.

Please Remember Me!

After introducing your driver, leave History and Context enabled so later questions can resolve "I," "my," and "me." Before switching to another driver, select Clear to start a new conversation.

Step 2: Add NL2SQL

Settings

Vector Search: Off; NL2SQL: On

Ask again with History and Context on:

What team am I on?

Compare the answer the model gave without NL2SQL with the new answer. The response is now grounded with data from the Oracle AI Database.

Follow up with some additional questions:

What is my driving style, vehicle setup, and team?

Compare Driver <M> with me on total points, best finish, average lap time, and incidents.

Which team is leading before Round 6?

Summarize my driver briefing.

What to look for: the agent calls SQLcl to query the relevant racing tables and views, returning exact numbers for your driver and the championship through Round 5. For Summarize my driver briefing., with only NL2SQL enabled, it should say that the structured database does not have that information.

These answers come from the live database in real time, not a nightly extract or a stale dashboard. But notice what it can't answer yet: anything about coaching, debriefs, or Round 6 before the final insert.

Settings

Vector Search: On; NL2SQL: Off

Before asking, embed your driver document into a vector store. In Tools > Split/Embed:

  1. Select Create New Vector Store.
  2. Set Knowledge Base Source to Local and upload the driver_<NNN>.md file you downloaded for your driver (e.g. driver_007.md for Driver 7).
  3. Use a Vector Store Alias such as DRIVER_DOCS.
  4. Click Populate Vector Store.

If multiple people are running the use case together, embed all the relevant driver docs into the same store in one pass.

Ask:

Say What?

If you are using a small model or a CPU, you can try enabling Prompt Rephrase.

If the model cannot cope with rephrasing, disable it and include your driver number in each query, for example:

I am Driver <N>; Summarize my driver briefing.

Summarize my driver briefing.

What did my coach say I should improve?

What setup advice was given to me?

What risks or weaknesses are mentioned in my notes?

Give me three practical focus areas for my next simulator session.

What to look for: the model retrieves your driver doc and answers in the voice of a race engineer, naming the specific corner phases, tyre calls, and coaching priorities written for your driver.

It's the same model and the same chat, but the answer is completely different, because we grounded it in the team's own coaching notes without any fine-tuning or retraining.

Step 4: Both Together

Settings

Vector Search: On; NL2SQL: On

Ask:

Use my database results and my documents to summarize my season so far.

Based on my points, incidents, and coaching notes, what should I focus on next?

Did my structured performance match the feedback in my documents?

Compare Driver <N> with Driver <M> using both database results and driver notes.

What to look for: for prompts that clearly need both sources, the combined-mode classifier routes the question to both tools and synthesizes a single answer. It cites SQL-derived facts (points, finishes, lap times) and weaves in the coaching narrative (what the debrief said about those results). For other prompts, it can select the single tool that best fits the question.

Neither tool gets here alone. The numbers live in the database and the story lives in the documents; the answer the driver actually wants needs both.

Final Reveal: Who Won the Championship?

Settings

Vector Search: Off; NL2SQL: On

Before this step, ask the model who won the championship. With no Round 6 results loaded, the prompt instructs the model to say the finale has not been recorded yet and to refuse to name a winner.

Now load the Round 6 team points. As the same database user, run finale_insert.sql from your racing/ directory:

@/path/to/racing/finale_insert.sql

If you are using the Walkthrough database container, run:

@/tmp/racing/finale_insert.sql

This inserts the final Round 6 team points into team_race_points and makes them visible through championship_team_standings.

Ask:

Using the database championship standings, which team won the championship? Show the pre-finale points, the Round 6 points, and the final total.

Which teams were in contention before Round 6, and how did the final Round 6 database insert change the result?

Why could NL2SQL not answer the final championship winner before the Round 6 insert?

What to look for: the model queries championship_team_standings, presents pre-finale team points, Round 6 points, and final totals as a table, and names the champion. It will also explain why it couldn't answer this question a few minutes earlier.

This is the question that proves the database is live. We didn't re-index documents or rebuild a dashboard. The final classification arrived as structured data, and the assistant calculated the championship from it.

More Questions to Try

Variations on each step, organized by what they demonstrate.

NL2SQL variations (Step 2)

PromptWhy ask it
Which drivers have the same driving style as Driver <N>?WHERE driving_style = (SELECT ...). Correlated lookup.
What is my team's engineering focus?Two-table join (drivers → teams). Trivial to verify on screen.
Did I have any incidents? How many pit stops did I make?Aggregates over incidents and pit_stops.
Which race had the highest field average lap time?Uses the race_summary view, a clean view-vs-raw-table comparison.
Which team has the most incidents this season?GROUP BY over team_standings.incident_count.

Vector Search variations (Step 3)

PromptWhy ask it
What does my race debrief say?Pulls the engineer's debrief paragraph.
What setup advice was given to me?Tests retrieval on a specific section of the driver doc.
What does my brief say about overtaking opportunities?Cross-section pull; the answer is woven across the briefing and coaching notes.

Combined-mode variations (Step 4)

PromptWhy ask it
Which race should I review first, based on my worst structured result and my debrief notes?Joins a SQL ranking with a document recommendation.
Did my structured performance match the feedback in my documents?The most interesting answer here; sometimes the model finds a contradiction.
Compare Driver <N> with Driver <M> using both database results and driver notes.Two drivers, two sources each; stress-tests the orchestrator.

Troubleshooting

  • Step 2 returns empty results or asks for column names: confirm prompts.json was imported. The racing-tuned optimizer_nl2sql-tools-default prompt includes the demo schema and tells the agent to run SQL directly. Re-import if Step 2 is flaky.
  • Step 2 invents Round 6 results or a champion: the model is over-reaching. The racing NL2SQL prompt explicitly forbids this, so re-import prompts.json and try again.
  • Step 3 says "no relevant sources": the vector store is empty for that driver, or the embedding model differs from the one used at retrieval time. Re-embed the participant's downloaded driver_<NNN>.md file using the same model selected in Configuration → Models.
  • Step 4 answers from only one tool: the classifier picked one path. Rephrase to make the dual-source nature explicit (...using both my database results and my documents...). This is more common with smaller local models because they have weaker tool use.
  • Final Reveal names the wrong champion or refuses: confirm finale_insert.sql ran and that championship_team_standings returns non-zero round6_points for each team.
  • Driver identifier ambiguity (e.g. Driver 1 matches multiple rows): switch to the padded code (Driver001). The racing prompt tells the model to normalize, but smaller models slip.

Resetting Between Runs

To re-run the use case from scratch, open Configuration > Databases and delete the vector store you created. Database Configuration shows the available vector-store controls.

Then re-run schema.sql, re-embed the downloaded driver_<NNN>.md file during Step 3, and run finale_insert.sql during the Final Reveal. If you customized any of the racing prompts in the AI Optimizer, click Reset Instructions on each, and the originals will be re-installed from prompts.json on the next import.

Because schema.sql randomizes per-team form on every reset, the pre-finale standings and the eventual champion change each time. This is intentional: it keeps the Final Reveal genuinely unknown right up to the moment you load the Round 6 points.

What's Next?

  • Extend the Racing Championship with Deep Data Security.
  • Build your own use case. Swap in your own DDL and seed data, write a prompts.json that teaches the model your schema, and curate a document corpus that mirrors the qualitative side of your domain. The four-step progression (LLM-only → NL2SQL → Vector Search → both) is reusable.
  • Try the Testbed to evaluate the same questions against different models, prompts, or embedding strategies.
  • Read Agents and Flows to understand how the AI Optimizer routes each turn between the NL2SQL agent, the Vector Search flow, and the combined-mode classifier.