Knowledge Item Types
A Knowledge Item Type is a template that defines a configurable capability in the system. While Knowledge Feature Types describe what you know about documents, Knowledge Item Types describe what you can do - such as customizing extraction prompts, applying validation rules, or modifying processing behavior.When Do You Need Item Types?
Create a Knowledge Item Type when you want to:- Allow customization of extraction prompts for specific data elements
- Define validation rules that can be selectively applied
- Create processing behaviors that can be configured per document type
- Enable business users to customize system behavior without code changes
How Item Types Work
- Define the Type - Create a Knowledge Item Type that describes a capability (e.g., “Prompt Override”)
- Create Items - Create configured instances with specific values (e.g., “Use this prompt for invoice totals”)
- Connect via Sets - Knowledge Sets link Features to Items, triggering behaviors based on document characteristics
Item Type Structure
| Field | Purpose | Example |
|---|---|---|
slug | Unique identifier | prompt-override |
name | Display name | Prompt Override |
description | What this capability does | Customize the extraction prompt for a data element |
options | Configuration parameters users can set | targetField, promptText, model |
Options Define Configuration
Options specify what parameters users can configure when creating items:Creating an Item Type
Via YAML (GitOps)
Create a file inkodexa-resources/knowledge-item-types/:
Via API
Via Kodexa UI
- Navigate to Knowledge in the sidebar
- Click Item Types
- Click Create Item Type
- Fill in name, slug, description
- Add options to define configurable parameters
- Save
Creating Knowledge Items
Once you have an Item Type, create configured items:Via YAML
Via API
Connecting Items to Features via Knowledge Sets
Knowledge Items don’t do anything on their own - they need to be connected to documents through Knowledge Sets. A Knowledge Set says “when a document has these features, apply these items.” See Knowledge Sets for details on creating sets.Common Item Type Examples
Validation Rule
Field Ignore Rule
Processing Priority
Item Types vs Feature Types
| Aspect | Feature Type | Item Type |
|---|---|---|
| Purpose | Capture metadata about documents | Define configurable behaviors |
| Direction | Information FROM documents | Actions applied TO documents |
| Examples | Vendor, Document Type, Language | Prompt Override, Validation Rule |
| Persistence | Features are reused across documents | Items are applied via Knowledge Sets |
| Created by | Often by agents during processing | Typically by developers/admins |
Next Steps
- Knowledge Feature Types - Define document metadata categories
- Customizing Extraction - End-to-end guide using Item Types
- Adding Validation Rules - Practical validation example
