Skip to main content

Setup

Before You Begin

You'll need:

The demo assets are under docs/demos/mortgage/:

FilePurpose
schema.sqlOracle DDL plus eight labelled mortgage applications and a summary view.
prompts.jsonPrompt bundle that tunes NL2SQL, Vector Search, and combined-mode questions.
corpus/Lending criteria, evidence guidance, and one application pack per mortgagor.

Load the data

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/mortgage ai-optimizer-db:/tmp/mortgage
podman exec -it ai-optimizer-db sqlplus '<AIO_DB_USERNAME>/<AIO_DB_PASSWORD>@<AIO_DB_DSN>'
@/tmp/mortgage/schema.sql

schema.sql drops and recreates the mortgage demo tables and view, so run it only in a database or schema you are happy to reset. It seeds eight applications with varied locations, incomes, employment types, expenditure, and LTV profiles.

Verify the seed

Confirm that the seed contains the mortgage summary view:

SELECT mortgagor_label, property_location,
requested_loan_amount, loan_to_value_pct
FROM mortgage_application_summary
ORDER BY mortgagor_label;

Import the prompts

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

This installs:

  • A mortgage-review system prompt
  • An NL2SQL prompt for application and portfolio data
  • A Vector Search prompt for criteria, evidence guidance, and application packs
  • A combined-mode classifier and synthesis prompt for policy-aware questions

See Prompt Engineering for more on managing prompts.

Enable 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.

See Model Configuration for more on configuring models.

Embed the corpus

In Tools > Split/Embed, create one vector store from all files in corpus/. Use an alias such as MORTGAGE_DEMO_DOCS.