YAML file that defines the structure of your knowledge graph. It specifies the types of entities and relationships that can exist in your graph, acting as a schema to ensure data consistency and to guide the query generation process.
By defining a clear and explicit ontology, you enable a1facts to validate incoming data and construct precise queries.
Example
Here is an example of an ontology for financial analysis, taken from the Stock Analysis cookbook example.company.yaml
Key Concepts
The ontology is defined by the following key concepts, which are organized into a hierarchical structure in the YAML file.`name`
`name`
Type:
stringThe top-level name of the ontology, used to identify it.`description`
`description`
Type:
stringA brief description of the ontology’s purpose and scope.`entities`
`entities`
Type:
listA list of entity types that can exist in the knowledge graph. Each entity represents a class of objects.`relationships`
`relationships`
Type:
listA list of relationship types that define how entities can be connected.