

# Induce an ontology from documents

If documents that describe your business domain are available but you don’t have an ontology yet, you can use AWS Context to draft one. You provide documents, such as policies, specifications, glossaries, or process descriptions. AWS Context reads them and drafts the classes, attributes, and relationships that they describe. This process is called *ontology induction*.

The result is a draft ontology. You review the draft, edit it if you need to, and publish it before you use it. The AWS Context console calls this *generating* an ontology.

If something goes wrong, see [Troubleshoot ontology induction](ontology-induce-troubleshoot.md).

**Topics**
+ [Key terms for ontology induction](#ontology-induce-terms)
+ [How ontology induction works](#ontology-induce-how)
+ [When to induce an ontology](#ontology-induce-when)
+ [Before you begin](#ontology-induce-prereqs)
+ [Choose documents, a template ontology, and a prompt](ontology-induce-inputs.md)
+ [Start an ontology induction](ontology-induce-start.md)
+ [Monitor an ontology induction](ontology-induce-track.md)
+ [Cancel or delete an ontology induction](ontology-induce-cancel-delete.md)

## Key terms for ontology induction
<a name="ontology-induce-terms"></a>

This section uses the following terms.
+  *Ontology induction* – A job that drafts a new ontology from documents that you provide. An induction has its own ID and status, so you can monitor it while it runs.
+  *Draft ontology* – The new ontology, with the status `DRAFT`, that a successful induction creates. You can review and edit a draft, but you can’t use it until you publish it.
+  *Template ontology* – An ontology that you already published and that an induction extends. In the API, it’s the `seedOntologyId` field. A template ontology is one of your own published ontologies, not a built-in ontology or an industry template. It is optional.
+  *Prompt* – Free text that says what the ontology is for, such as which concepts to focus on or which terms to use. A prompt is optional.

## How ontology induction works
<a name="ontology-induce-how"></a>

An ontology induction goes through the following stages:

1.  **You choose the inputs.** You choose one or more documents. Optionally, you also choose a template ontology and write a prompt. For more information, see [Choose documents, a template ontology, and a prompt](ontology-induce-inputs.md).

1.  **You start the induction.** AWS Context accepts the request at once and runs the induction in the background. For more information, see [Start an ontology induction](ontology-induce-start.md).

1.  ** AWS Context drafts the ontology.** It reads the text of each document and drafts classes, attributes, and relationships. Then it combines the results into one draft. For more information, see [Monitor an ontology induction](ontology-induce-track.md).

1.  **You review, edit, and publish the draft.** A successful induction creates a new ontology with the status `DRAFT`. You review the draft, edit it if you need to, and publish it. For more information, see [Review, edit, and publish a draft](ontology-review-refine-validate.md).

1.  **You use the published ontology.** You can use a published ontology in an Agent Context, or as the template ontology of a later induction. For information about how to use a published ontology, see [Next steps](ontology-draft-publish.md#ontology-draft-publish-next).

Induction always gives you a new ontology, even when you use a template ontology. It doesn’t change any Agent Context.

## When to induce an ontology
<a name="ontology-induce-when"></a>

Induction is one of three ways to get an ontology to use.
+  **Use a built-in ontology** when its common concepts fit your business. For more information, see [Built-in ontologies](ontology-built-in.md).
+  **Bring your own ontology** when your organization already maintains one. For more information, see [Bring your own ontology](ontology-byo.md).
+  **Induce an ontology** when you have documents that describe your business concepts and you want an ontology to use with an Agent Context. To build on an ontology that you already published, use it as the template ontology. For information about template ontologies, see [Choose a template ontology (optional)](ontology-induce-inputs.md#ontology-induce-inputs-seed).

You can’t use induction to extend a built-in ontology.

## Before you begin
<a name="ontology-induce-prereqs"></a>

Before you start an induction, make sure that you have the following:
+  **Documents** – One or more documents that describe your business in text.
+  **Permissions** – Permission to start an induction and to create an ontology. To add tags, you also need permission to tag each resource: the induction, the new ontology, or both. To use a template ontology, you also need permission to read it. For information about IAM policies for ontology owners, see [Ontology owner policy](security-iam.md#security-iam-ontology-owner-policy).
+ (Optional) **Template ontology** – A custom ontology that you published and that you want the new ontology to extend.