Skip to content

Use ohi with NVIDIA Auto Ontology

Use ohi to give the terms in NVIDIA Auto Ontology standard names and definitions. Auto Ontology reads your databases and builds an ontology that AI agents use to answer questions with SQL. On its own, it lets a language model name each term, so the names follow your table names and can differ between databases and teams. A standard ontology gives you agreed names and definitions to use instead.

ohi finds these ontologies, downloads them with their dependencies and pins their versions in a lock file. Everyone on your team then matches terms against the same files. This guide uses schema.org and the Wide World Importers sample database from Auto Ontology’s quickstart.

To use other ontologies, search on ohi.dev or use ohi search.

Auto Ontology can’t load an ontology directly: its Apache Ossie import expects tables, not concepts. So you match the terms yourself:

  1. ohi downloads the ontologies as Apache Ossie YAML files. It writes down which ones you chose in ohi.yaml, and the exact files in ohi.lock.json.
  2. You look up a standard concept for each Auto Ontology term in those files.
  3. In Auto Ontology’s Glossary, you add the concept, its IRI and its definition to the term’s description, rename the term if you want to, and certify it.
  • ohi installed.
  • Auto Ontology running, with semantic compilation finished. Follow the quickstart, which loads the Wide World Importers database.
  1. Create a project that saves ontologies as Apache Ossie files in an ontologies folder:

    Terminal window
    ohi init ao-ontologies --default_format ossie-yaml --to ontologies
    cd ao-ontologies

    Ossie files are plain YAML with a name, an IRI and a description for each concept, so they’re easy to search.

  2. Add your ontologies:

    Terminal window
    ohi add schemaorg/schemaorg@30.1

    schema.org covers orders, invoices, products, people and places, which fits a sales database like Wide World Importers. Each ontology lands in its own folder, along with any ontologies it depends on.

  3. Check that the files are there:

    Terminal window
    find ontologies -name '*.ossie.yaml'

    In PowerShell, run Get-ChildItem ontologies -Recurse -Filter *.ossie.yaml. You should see one file, schemaorg.ossie.yaml.

  4. Commit ohi.yaml and ohi.lock.json to git. Your teammates can then run ohi sync to get the exact same files, so everyone matches terms against the same concepts. Learn more in Manage ontology projects.

  1. In Auto Ontology, open the Glossary to see the terms it generated, such as Invoice, Invoice Line and Customer.

    Auto Ontology Glossary with the generated terms Invoice and Invoice Line

  2. Search the downloaded files for a word from the term’s name:

    Terminal window
    grep -ri -A3 -- '- concept: .*invoice' ontologies

    In PowerShell, run Get-ChildItem ontologies -Recurse -Filter *.ossie.yaml | Select-String '- concept: .*invoice' -Context 0,3.

    A concept’s entry looks like this:

    - concept: Invoice
    type: EntityType
    iri: schema:Invoice
    description: A statement of the money due for goods or services; a bill.

    Skip results without a type line, which only mention the concept, and data types such as Text, Number and DateTime, which describe column values.

  3. Pick the concept that means the same thing as the term. Watch out for these cases:

    • The names match, such as the term Invoice and schema.org Invoice. Check the definition anyway.
    • A concept is named after one word of the term, such as Invoice for Invoice Line. These are often wrong: an invoice line isn’t an invoice. A better match for Invoice Line is OrderItem.
    • Nothing matches. schema.org has no Customer or Supplier concept, for example. Try the term’s synonyms, or leave the term as it is.
  4. Write out the concept’s full IRI. The prefixes list at the top of the file says what each short prefix stands for. In schema.org, schema:Invoice is https://schema.org/Invoice.

  1. Keep a copy of the model as it is now. In Auto Ontology, go to Settings > Import / Export. Under Export Model, choose Native Auto Ontology and select Export.

  2. In the Glossary, select a term you matched, such as Invoice Line, and select Edit.

  3. To rename the term, change its name.

  4. At the end of the description, add a paragraph with the concept, its full IRI, the ontology it comes from and the first sentence of its definition:

    Standard term: OrderItem (https://schema.org/OrderItem) from schemaorg/schemaorg@30.1 on ohi.dev. An order item is a line of an order.

    Starting each paragraph with Standard term: makes them easy to find and update later.

  5. Save your changes, then do the same for the other terms you matched.

Auto Ontology updates its search index for each term you change, so the agent finds the new names and descriptions straight away. If you can’t edit a term, ask an Auto Ontology admin to check your role. If you have many terms to update, ask on Discord for help.

Check that Auto Ontology uses the new terms

Section titled “Check that Auto Ontology uses the new terms”
  1. In the Glossary, select a term you updated and select Edit to see its whole description. The Glossary list shows only the first three lines, so the Standard term paragraph is often cut off.

    Auto Ontology Glossary page for Invoice Line in edit mode, with the description ending in the schema.org OrderItem standard term

  2. Certify the term’s name and description once you’re happy with them, using the certification control next to each one.

  3. Ask a question in Chat, such as the one from the quickstart:

    What was revenue for the USB food flash drive - sushi roll in Pennsylvania in June 2015?

    The answer shows its SQL and the steps the agent took. Check that it still finds the right tables, especially for terms you renamed.

  1. Find the latest version with ohi inspect <ontology_id>, for example ohi inspect schemaorg/schemaorg.
  2. Change the version in ohi.yaml and run ohi sync.
  3. The new version goes into a new folder, named after its version. Delete the old version’s folder, so your searches don’t find both.
  4. For each term with a Standard term paragraph, look up the concept in the new files and update the paragraph’s version, IRI and definition.
  • To undo a change, edit the term again: put back its old name and remove the Standard term paragraph. Your exported copy shows what the term looked like before.
  • To remove the ontologies, delete the ontologies folder. ohi sync brings them back.

NeverBlink, the team behind ohi, maintains this guide, not NVIDIA. If something does not work, open an ohi issue or ask on Discord. For problems with Auto Ontology itself, use the Auto Ontology issue tracker.