Entry points at a glance
You can get an ontology in three ways:
-
Apply a built-in ontology – Use one of the ontologies that AWS Context provides, as it is. For more information, see Built-in ontologies.
-
Bring your own ontology – Upload an ontology that you already maintain. It’s published as soon as AWS Context accepts it, without a draft. For more information, see Bring your own ontology.
-
Induce an ontology from documents – Have AWS Context draft an ontology from documents that you provide. You review and validate the draft (Review, edit, and publish a draft), then publish it (Publish a draft ontology). For more information, see Induce an ontology from documents.
After that, a custom ontology enters AWS Context at four points, and each point uses it for a different purpose. You can use an ontology at some points and not others. For example, you can import an ontology only to link your tables to its classes, without using it to extract entities from documents.
Ontology induction
AWS Context reads documents that you provide, such as policies, glossaries, or specifications, and drafts an ontology from them. You can give it a template ontology to extend and a prompt that says what to focus on. Induction creates an ontology. It doesn’t change any Agent Context until you use the published ontology in one. For more information, see Induce an ontology from documents.
Ingestion
When you map a knowledge base connection into an Agent Context, you choose the ontology for that mapping. AWS Context uses the ontology’s classes to find and type the entities that it extracts from each document. Each extracted entity becomes a node of its class, linked to the document that it came from. You can use a custom ontology only on a knowledge base connection. Catalog connections, such as an AWS Glue Data Catalog, are ingested from their schema with a built-in ontology. For more information, see Data mapping.
Import into the Agent Context
AWS Context imports the custom ontology itself into the Agent Context: its classes, properties, relationships, hierarchy, labels, and rules become nodes and edges in the Amazon Neptune Analytics graph associated with the Agent Context, and its terms become searchable. AWS Context imports an ontology when you map it to a knowledge base connection. You can also import an ontology yourself, for example to link your tables to its classes. For more information, see Start grounding by associating an ontology.
Depending on the Agent Context’s curation policy, AWS Context applies the import at once or holds it as a proposal for you to accept. After the import, AWS Context proposes links from your catalog tables to the classes that they represent, so that an agent can find a table by the business concept that it holds. This is called grounding. For more information, see Grounding structured data in an ontology. For more information about reviewing proposals, see Review proposals and quality signals.
Retrieval
When you or your agent ask AWS Context a question, its retrieval agent finds the part of the graph associated with the Agent Context that is relevant to the question. You don’t query the graph or choose the ontology terms yourself. The retrieval agent searches the graph, which includes the ontology’s terms, and follows links from them to the tables and columns grounded to them.
When a question involves one of the ontology’s terms, AWS Context also gives the retrieval agent more of the ontology than the term itself:
-
Rules on the term – the complete rule, written out in plain words, for rules such as SHACL shapes, OWL restrictions, and limits on a property’s values. This includes rules that a class inherits from its parent classes.
-
What its links mean – what standard links to other terms mean for the question, such as equivalent terms, renamed terms, and more specific kinds of a term.
The retrieval agent has these rules and links in context when it answers. For more information, see How a custom ontology is used in agentic retrieval.