Skip to main content
Version: 0.0.5 (stable)

Default schema

DEFAULT_SCHEMA ships with Agentic GraphRAG. It has nine entity types and eight relation types. Import it from agrag.common.data_models.

from agrag.common.data_models import DEFAULT_SCHEMA

print(DEFAULT_SCHEMA.name, DEFAULT_SCHEMA.version)

SearchEngine uses DEFAULT_SCHEMA when graph_schema is omitted. Pass the same schema used for ingestion when searching a graph with custom types.

The exported schema and presets contain mutable models and lists. Do not edit their contents directly. Use DEFAULT_SCHEMA.model_copy(deep=True) to customize a schema, or call Preset.apply to obtain an independent schema. SearchEngine takes a deep copy of its input schema.

The schema is closed. The extractor reports only declared types. It has no catch-all type, catch-all relation, or wildcard pattern.

Entity types​

TypeDescription
PersonA person, living, dead, or fictional.
OrganizationAn organization such as a company, school, NGO, or club.
LocationA place with a somewhat fixed, physical extension.
EventA happening at a set time and place, such as a concert or lecture.
ProductA material or service produced or provided by an organization.
SoftwareA computer program or software application.
PublicationA written or published work such as a book, report, or article.
DatasetA structured body of information about one or more topics.
ProjectA planned, typically collaborative effort to achieve a particular aim.

Publication is not named Document, because Document is the label for each loaded source.

Relation types​

RelationDescriptionAllowed pairs (source to target)
WORKS_FORA person is employed by, or works for, an organization.Person to Organization
PART_OFThe source is a part of the target it belongs to.Organization to Organization; Project to Project; Software to Software; Publication to Publication
LOCATED_INThe source is physically situated in the target place.Organization, Event or Project to Location
OWNSThe source is the owner of the target.Person or Organization to Software, Dataset or Project
AUTHOREDThe source is primarily responsible for creating the target.Person or Organization to Publication, Software or Dataset
PARTICIPATED_INThe source took part in the target event or project.Person or Organization to Event or Project
DEPENDS_ONThe source software requires the target software or dataset to run.Software to Software or Dataset
SUPPLIESThe source provides or sells the target product or service.Organization to Product

The extractor drops a relation when its source and target types do not form an allowed pair.

Description sources​

The descriptions use public vocabularies, including schema.org, Wikidata, and Dublin Core. Person, Organization, Location, Event, Software, Dataset, and Project match schema.org types. Product follows Wikidata property P1056.

Four items use broader wording because the public vocabularies provide only a partial match:

  • Publication is narrower than the schema.org type CreativeWork.
  • PARTICIPATED_IN allows a Project target. Wikidata defines "participant in" for events.
  • DEPENDS_ON allows a Dataset target. Wikidata defines "depends on software" for software.
  • SUPPLIES describes an organization providing a product. The closest schema.org property, seller, belongs to an offer.

Presets​

A preset adds entity types to a schema. It does not add relations. The default relations do not accept preset types. See Use a preset.

PresetNameTypes added
OPERATIONSoperationsFacility, Service, Occupation
LEGALlegalContract, Regulation
TypeDescription
FacilityA place, equipment, or service that supports a specific function.
ServiceA service provided by an organization, such as delivery or printing.
OccupationA profession, which may need long training or a formal qualification.
ContractAn agreement with a lawful object, made by two or more parties.
RegulationA rule with legal force, issued by a legislative body.

The default schema with both presets has 14 entity types and 8 relation types.