Custom Subject Types
Integrating platforms can define their own Custom Subject Types to represent domain-specific entities. This allows the Memory Platform to handle industry-specific data (e.g., Tenants, Cases, Suppliers) with the same power as built-in types.
Defining Custom Types
Custom types are defined within the Platform Configuration. When you define a custom type, you are telling the visualizer and the engine how to treat that entity.
Configuration Example
{
"id": "tenant",
"label": "Tenant",
"pluralLabel": "Tenants",
"icon": "Briefcase",
"color": "#7C3AED",
"mapping": {
"type": "subject",
"field": "tenant",
"graphNodeType": "Tenant"
}
}
Why Use Custom Types?
- Domain-Specific Navigation: The visualizer creates dedicated tabs and selectors for your custom types.
- Specialized Graph Nodes: Custom types become distinct node types in the Knowledge Graph, allowing for domain-specific relationship patterns.
- Scoped Extractions: You can instruct the extraction engine to look specifically for your custom types (e.g., "Extract information about the Supplier XYZ").
- Enhanced Filtering: Create secondary filters that only apply to a specific custom type (e.g., "Filter Tenants by 'Closing Date'").
Best Practices
- Use Singular Slugs: Use
tenantinstead oftenantsfor thetypeID. - Provide Icons: Specify a Lucide icon name to make the UI intuitive.
- Link to Graph Nodes: Always specify a
graphNodeTypeto ensure the Knowledge Graph properly represents your entities. - Map to Structured Data: If your platform already has a database of these entities, ensure the
idyou use in the Memory Platform matches your internal ID.