Domain schemas reference
Reference for built-in domain schemas and custom schema creation. This page is a short overview and index; each subsystem has its own page.
Overview
Domain schemas define entity types with descriptions that improve GLiNER2.5 zero-shot extraction accuracy: the model reads each description as an annotation guideline. Each schema supplies domain-specific labels and descriptions; assess extraction quality on your own sample data.
A DomainSchema is a catalog: labels with descriptions and no endpoint typing. DomainSchema.to_ontology() converts one into an OntologyDocument, which is what the extractor compiles. Each built-in catalog has a matching ontology template of the same name (neo4j_agent_memory.ontology.get_template), and GLiNER2Extractor.for_schema and ExtractorBuilder.with_gliner_schema resolve names through it, so the poleo, podcast and news templates bring typed relationships as well as labels.
On this subsystem
-
Built-in domain schemas — the eight built-in catalogs (
poleo,podcast,news,scientific,business,entertainment,medical,legal), the relationships their ontology templates declare, and how to select one withGLiNER2Extractor.for_schema,ExtractorBuilder.with_gliner_schema, orlist_schemas/get_schema. -
Custom schemas and persistence — custom
DomainSchemaandOntologyDocumentexamples, the Bolt-onlySchemaManageroverview, the label-to-POLE+O entity type mapping, and theDomainSchema/EntityTypeConfig/RelationTypeConfig/EntitySchemaConfigmodels. -
SchemaManager persistence API —
save_schema,load_schema,list_schemas,set_active_version,delete_schema, and the rest of theneo4j_agent_memory.schema.SchemaManagerCRUD surface.