Skip to main content
The Knowledge System is how Kodexa captures information about documents and uses that information to customize processing. It connects what you know about documents to what you do with them.
Knowledge connects document context to behavior inside Activity execution

The Two Sides of Knowledge

”What We Know” - Document Metadata

You define Feature Types once, then create Features of that type. Multiple documents can share the same Feature (e.g., 50 invoices all linked to “Acme Corp”).

”What We Do” - Configurable Behaviors

Item Types define what can be configured. Items are the actual configurations with specific values.

The Bridge - Knowledge Sets

Knowledge Sets are the rules that say “when a document has these features, apply these items.”

When Do You Need This?

Track Document Metadata

Track which vendor invoices came from, classify document types, identify languages

Customize Extraction

Use different extraction prompts for different document types

Apply Validation Rules

Apply specific validation rules based on document characteristics

Automate Configuration

Let agents propose knowledge configurations for human approval

Quick Example: Vendor Tracking

Goal: Track which vendor each invoice comes from. Step 1: Create a Feature Type
Step 2: Create Features
Step 3: Link to Documents As invoices are processed, they get linked to the appropriate vendor feature. Now you can:
  • Search for all documents from a specific vendor
  • See which vendor a document belongs to
  • Trigger different processing based on vendor

Quick Example: Customizing Extraction

Goal: Use different extraction prompts for 10K vs 10Q documents. Step 1: Create Feature Type + Features
Step 2: Create Item Type + Items
Step 3: Create Knowledge Sets

Detailed Guides

Knowledge Feature Types

Define categories of document metadata with natural keys and display properties

Knowledge Item Types

Define configurable capabilities like prompt overrides and validation rules

Customizing Extraction

End-to-end guide: different prompts for different document types

Adding Validation Rules

End-to-end guide: conditional validation based on document features

Knowledge and Agents

How agents build and consume knowledge with human-in-the-loop approval

Knowledge Set Attachments

Knowledge sets can have set-level file attachments — files that belong to the knowledge set itself rather than to individual items. These are useful for storing reference documents, images, templates, or other supporting files that apply to the entire set.

Uploading Attachments

Upload attachments via the API using a multipart form POST:
Each attachment includes:

Referencing Attachments in Markdown

Attachments can be referenced in knowledge item markdown content using the attachment:// protocol:
When the platform renders the markdown, it resolves attachment:// references to presigned download URLs for the corresponding files.

CLI Sync Format

When defining knowledge sets via the CLI sync YAML format, attachments can be declared alongside items and features:

Managing Attachments

Use the following API endpoints to manage set-level attachments:
  • ListGET /api/knowledge-sets/{id}/attachments
  • UploadPOST /api/knowledge-sets/{id}/attachments
  • DownloadGET /api/knowledge-sets/{id}/attachments/{attachmentId}
  • DeleteDELETE /api/knowledge-sets/{id}/attachments/{attachmentId}
See the Knowledge Sets API Reference for full details.

Expression-Based Matching

Knowledge sets use expression trees to define when a set of items should be applied to a document. Expressions support logical operators for flexible feature matching.

Expression Operators

Example

To match documents that have both the “10K” filing type and the “Acme Corp” vendor feature:
To match documents that are either 10K or 10Q filings:
To match documents that are 10K filings but not from Acme Corp:

Simple and Advanced Editing

You can build a knowledge set’s matching expression in one of two modes. Simple mode works from a flat list of features. You pick the features that should take part in matching from a palette, then choose a single rule that applies to the whole set:
  • Match ALL — a document must carry every selected feature to qualify (an AND across the features).
  • Match ANY — a document needs at least one of the selected features to qualify (an OR across the features).
This covers the most common cases and keeps the whole rule readable as a single list. Advanced mode exposes the full expression tree, letting you nest AND, OR, and NOT groups to describe conditions a flat list can’t capture — for example, “is a 10K and is not from a particular vendor.” You can switch to Advanced mode at any time. Collapsing an advanced expression back to Simple mode is only lossless when it is already a flat list of features. If the expression contains NOT conditions or nested groups, the platform asks you to confirm first: simplifying keeps a flat list of the features the expression references but drops the NOT and nested-group logic.

How Assessment Works

When a document’s features change (e.g., a new feature is assigned via an intake, script step, or agent), the platform evaluates all knowledge sets against the document’s current feature set. The assessment produces four categories: This drives automatic reprocessing — when a document gains or loses a knowledge set match, the platform can trigger the appropriate processing pipeline.

Reference

For GitOps deployment of knowledge resources, see: