Start an ontology induction
When you start an induction, AWS Context checks your request and then runs the induction in the background. The request returns at once, and a new induction has the status INDUCING. The new ontology doesn’t exist until the induction succeeds.
You can start an induction on the AWS Context console or with the API. Before you start, prepare your inputs. For more information about how to prepare them, see Choose documents, a template ontology, and a prompt.
On the console, a wizard collects your inputs in three steps: Ontology details, Additional requirements, and Review and generate.
To start an ontology induction on the console, follow these steps:
-
On the Ontologies page, choose Create ontology.
-
On the Ontology details step, enter a name for the new ontology and, optionally, a description.
-
Under Ontology files, upload your documents.
-
(Optional) To extend an existing ontology, under Additional settings, choose a Template ontology.
-
(Optional) On the Additional requirements step, enter a prompt in Requirements.
-
On the Review and generate step, check your choices.
-
Choose Generate ontology.
The induction starts, and its status is Inducing. To follow it, see Monitor an ontology induction.
On the Ontology details step, you can also add tags. The console applies the same tags to the induction and to the new ontology.
Start an ontology induction with the API
To start an induction with the API, call StartOntologyInduction. Send a name for the new ontology (ontologyName), your documents (inputConfig.documents), and a client token (clientToken). All three are required. A template ontology (seedOntologyId) and a prompt (prompt) are optional. The response has the induction’s ID (ontologyInductionId), its ARN, and its status, which is INDUCING for a new induction.
The following example shows the inputs for starting an induction with StartOntologyInduction. It isn’t a complete request. Replace the values in angle brackets with your own values.
StartOntologyInduction ontologyName: Claims ontology inputConfig: documents: - name: claims-handling-policy.pdf contentType: PDF content: <the bytes of the document> - name: claims-glossary.md contentType: MARKDOWN content: <the bytes of the document> seedOntologyId: <optional: the ID or ARN of a published custom ontology> prompt: Focus on claims, policies, and the parties to a claim. clientToken: <a unique token for this request>
StartOntologyInduction request fields
The following table describes each field in the request.
| Field | Description and rules |
|---|---|
|
|
Required. The name of the new ontology, 1 to 128 characters. It can’t start or end with a space or another blank or invisible character, and it can’t contain control characters. |
|
|
Optional. A description of the new ontology, up to 1,024 characters. It can’t contain control characters, such as tabs or line breaks. |
|
|
Required. Your documents, 1 to 100. Each document has a Give each document a name that is different from the others. AWS Context removes leading and trailing spaces before it compares names. If you give a name of only spaces, AWS Context counts it as the name |
|
|
Optional. The ID or ARN of the template ontology. For information about the rules, see Choose a template ontology (optional). |
|
|
Optional. The prompt, 1 to 8,000 characters. |
|
|
Optional. |
|
|
Required. A request without a token fails with a |
AWS Context has a quota for how many inductions an account can have in progress at the same time. When you reach the quota, StartOntologyInduction fails with a ServiceQuotaExceededException. Start the induction again when one of your other inductions ends. Inductions in progress also count toward the number of ontologies that an account can have. When the ontologies and the inductions in progress together reach that quota, StartOntologyInduction fails with a ServiceQuotaExceededException whose resource type is ontology. For information about what to do, see An induction doesn’t start.