Skip to main content

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?

  1. Domain-Specific Navigation: The visualizer creates dedicated tabs and selectors for your custom types.
  2. Specialized Graph Nodes: Custom types become distinct node types in the Knowledge Graph, allowing for domain-specific relationship patterns.
  3. Scoped Extractions: You can instruct the extraction engine to look specifically for your custom types (e.g., "Extract information about the Supplier XYZ").
  4. 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 tenant instead of tenants for the type ID.
  • Provide Icons: Specify a Lucide icon name to make the UI intuitive.
  • Link to Graph Nodes: Always specify a graphNodeType to ensure the Knowledge Graph properly represents your entities.
  • Map to Structured Data: If your platform already has a database of these entities, ensure the id you use in the Memory Platform matches your internal ID.