Process Library & AI Evaluation - Configuration Guide
Overview
The Process Library is a collection of defined "Processes" that enable AI-powered document evaluation and automated determination. Each process configures context, criteria, and knowledge that allows the AI system to evaluate submitted applications, documents, or forms.
Process Library Capabilities
| Feature | Description |
|---|---|
| Process Configuration | Define evaluation processes for applications and documents |
| Template Upload | Upload PDF templates or use existing forms |
| AI Autofill | Configure AI to automatically extract and fill fields |
| Field Detection | Automatic detection of fields from uploaded templates |
| Intake Configuration | Set up how documents/forms are received |
| Automated Determination | AI-powered evaluation resulting in approvals/rejections |
Prerequisites
Before creating processes, ensure:
- User has appropriate permissions for Document Processing module
- Forms/entities exist if using existing form option
- Template documents are prepared (if using template upload)
Section 1: Process Library Overview
1.1 Process Types
| Type | Value | Description |
|---|---|---|
| Application/Form | application | For form-based submissions (permits, applications) |
| Document/Contract | document | For document-based processing (contracts, agreements) |
1.2 Process Statuses
| Status | Value | Description |
|---|---|---|
| Published | Published | Process is active and available |
| Draft | Draft | Process is in development |
1.3 Process Library Navigation
Navigation: Document Processing -> Process Library
The Process Library table displays:
- Process name
- Process type
- Intake type
- Description
- Last modified date
Available Actions:
- Edit process
- View process
- Delete process
Section 2: Creating a New Process
2.1 Process Creation Steps
Creating a process follows a 5-step wizard:
Step 1: Basic Info
|-- Name, Type, Description
Step 2: Template
|-- Upload template OR Select existing form OR Start from scratch
Step 3: Entity
|-- Configure fields, Create AI fields, Add custom fields
Step 4: Form
|-- Configure form layout, Add fields, Set validation
Step 5: Intake
|-- Configure how submissions are received
2.2 Step 1: Basic Info
Navigation: Process Library -> + Add New Process -> Basic Info
| Field | Field Name | Description | Required |
|---|---|---|---|
| Process Name | name | Name for the process | Yes |
| Process Type | type | Application/Form or Document/Contract | Yes |
| Description | description | Description of the process purpose | No |
2.3 Step 2: Template
Navigation: Process Creation -> Step 2: Template
Three options for template setup:
| Option | Description |
|---|---|
| Upload Template | Upload an empty or prefilled PDF template |
| Select Existing Form | Choose a form from Entity Manager |
| Start from Scratch | Create with only default fields |
Template Fields:
| Field | Field Name | Description |
|---|---|---|
| Attachment | attachment | Uploaded template file |
| Entity Form | entityForm | Selected existing form |
2.4 Step 3: Entity (Field Configuration)
Navigation: Process Creation -> Step 3: Entity
In this step, you configure the entity fields for the process:
- Automatic Field Detection: System detects fields from uploaded template
- Add Missing Fields: Manually add fields not detected
- Configure AI Fields: Enable AI autofill for fields
- Create Custom Fields: Add dropdown, text, number fields
Field Types Available
The process supports all standard field types plus AI-enhanced fields:
- Text, Text Area
- Dropdown, Radio, Checkbox
- Date, Number
- File, Signature
- And all other entity field types
AI Autofill Configuration
Navigation: Field -> Three-dot menu -> Autofill with AI
This opens the AI sidebar for configuring AI-powered field filling.
Section 3: AI Autofill Configuration
3.1 AI Autofill Overview
AI Autofill allows the system to automatically extract information from documents and fill form fields using AI analysis.
3.2 AI Autofill Settings
| Setting | Field Name | Description |
|---|---|---|
| Field to Analyze | watch_field_id | Source field for AI to analyze |
| AI Instructions | instructions | Instructions for the AI (max 3000 chars) |
| Field to Assign | output_value | Target field to populate with result |
3.3 Configuring AI Instructions
Navigation: AI Sidebar -> Add Instruction
When configuring AI autofill:
- Select Field to Analyze: Choose which field the AI should read/analyze
- Write AI Instructions: Provide clear instructions for what to extract
- Select Field to Assign: Choose which field receives the extracted value
- Add Instruction: Click to add the instruction to the list
- Test AI Instruction: Test the instruction with sample data
Instruction List Features:
- View all configured instructions
- Edit existing instructions
- Delete instructions
- Reorder instructions
3.4 AI Instruction Best Practices
When writing AI instructions:
| Practice | Example |
|---|---|
| Be Specific | "Extract the applicant's full legal name from the first section" |
| Define Format | "Format phone numbers as (XXX) XXX-XXXX" |
| Handle Missing Data | "If address is not found, leave blank" |
| Specify Sources | "Look for permit number in the header or footer" |
3.5 Evaluation Data Structure
When AI evaluates instructions, the system stores detailed evaluation data:
Evaluation Instruction Data:
| Field | Type | Description |
|---|---|---|
reasoning | string | AI's reasoning for the evaluation decision |
matched_condition | boolean | Whether the AI condition was matched |
output_value | string[] | null | Extracted values from the evaluation |
Watched Field Instruction:
| Field | Type | Description |
|---|---|---|
_id | string | Unique instruction identifier |
watch_field | WatchField | The field being analyzed |
evaluation_data | EvaluationFieldData | null | Results of AI evaluation |
instructions | Instruction[] | Array of configured instructions |
3.6 AI Instruction Data Model
Each AI instruction contains:
| Field | API Key | Description |
|---|---|---|
| Instruction ID | uuid | Unique identifier |
| AI Field ID | ai_field_id | Associated AI field |
| Watch Field ID | watch_field_id | Source field to analyze |
| Instructions | instructions | Text instructions for AI |
| Output Value | output_value | Target field assignment |
Section 4: Knowledge Base Integration
4.1 Knowledge Base Overview
The AI system can be enhanced with external knowledge sources to improve accuracy and context-awareness. Knowledge sources provide reference data that the AI uses during field extraction and evaluation.
Navigation: AI Sidebar -> Knowledge Tab -> Add Knowledge Dropdown
4.2 Knowledge Source Types
| Type | API Value | Description |
|---|---|---|
| API | api | External REST API endpoints |
| Document | document | Uploaded reference documents |
| Website | website | Web pages for reference |
| SharePoint | sharepoint | SharePoint document libraries |
| Text | text | Plain text knowledge entries |
| Entity | entity | Entity data from the system |
4.3 Adding API Knowledge
Navigation: Add Knowledge -> API
Configure external API endpoints to provide reference data:
HTTP Configuration:
| Field | Description | Required |
|---|---|---|
| Method | HTTP method (GET, POST, PUT, DELETE) | Yes |
| URL | API endpoint URL (must be valid URL) | Yes |
Header Configuration:
| Field | Description |
|---|---|
| Key | Header name |
| Value | Header value |
Query Parameters:
| Field | Description |
|---|---|
| Key | Parameter name |
| Value | Parameter value |
Body Parameters (for POST/PUT):
| Field | Description |
|---|---|
| Description | Optional description of the body |
| Properties | Array of property definitions |
Property Schema:
| Field | Description |
|---|---|
dataType | Data type (string, number, integer, boolean, object) |
key | Property key name |
valueType | Value type for the property |
value | Actual value (required for primitive types) |
isRequired | Whether the property is required |
properties | Nested properties (for object types) |
API Knowledge Data Structure:
type ApiKnowledge = {
type: 'api';
data: {
api_url: string;
request_method: string;
request_headers: Record<string, string>;
query_params: Record<string, string>;
request_body: Record<string, any>;
};
};
4.4 Adding Document Knowledge
Navigation: Add Knowledge -> Document
Upload reference documents for the AI to use:
File Requirements:
| Setting | Value |
|---|---|
| Maximum File Size | 1000 MB (1 GB) |
| Minimum Files | 1 file required |
| Maximum Files | 10 files per knowledge entry |
Supported Formats:
- PDF documents
- Word documents (.doc, .docx)
- Text files (.txt)
- Image files (for OCR processing)
Document Knowledge Data Structure:
type DocumentKnowledge = {
type: 'document';
data: {
file_details: {
file_id: string;
file_name?: string;
size?: number;
}[];
};
};
4.5 Adding Website Knowledge
Navigation: Add Knowledge -> Website
Add website URLs as reference sources:
URL Requirements:
| Setting | Validation |
|---|---|
| Protocol | HTTP or HTTPS only |
| Maximum Length | 500 characters |
| Format | Valid URL format required |
Website Knowledge Data Structure:
type WebsiteKnowledge = {
type: 'website';
data: {
web_url: string; // Field name: 'web_url'
};
};
4.6 Adding SharePoint Knowledge
Navigation: Add Knowledge -> SharePoint
Connect to SharePoint document libraries:
Configuration:
| Field | Description |
|---|---|
| Account | SharePoint account selection |
| Files | Selected files from the library |
SharePoint Knowledge Data Structure:
type SharepointKnowledge = {
type: 'sharepoint';
data: {
siteUrl: string;
listId: string;
};
};
4.7 Knowledge Item Structure
All knowledge sources share a common base structure:
type KnowledgeItem = {
_id: string; // Unique identifier
name: string; // Display name
description: string; // Description of the knowledge
} & KnowledgeData; // Type-specific data
Section 5: Form Configuration
5.1 Step 4: Form
Navigation: Process Creation -> Step 4: Form
In this step, configure how the form appears to users:
Form Settings
| Setting | Description |
|---|---|
| Form Name | Display name for the form |
| Description | Form description/instructions |
| Button Controls | Configure navigation buttons |
| Advanced Settings | Additional form configuration |
Adding Fields to Form
Navigation: Form Builder -> Add Fields
- Click Add Fields button
- Select fields from the available entity fields
- Configure field settings (label, placeholder, description)
- Drag and drop to reorder fields
Field Configuration Options
For each field in the form:
| Setting | Description |
|---|---|
| Label | Display label for the field |
| Placeholder | Placeholder text |
| Description | Help text for the field |
| Required | Whether field is mandatory |
| Validation | Validation rules |
Section 6: Intake Configuration
6.1 Step 5: Intake
Navigation: Process Creation -> Step 5: Intake
Configure how submissions are received and processed.
6.2 Intake Types
| Intake Type | ID | Description |
|---|---|---|
| SharePoint | df0bacc6-65ad-411e-a6c4-fbab14e9963f | Documents from SharePoint folder |
| Form Submission | c3105855-e8ce-4f41-909c-421c8b0f4e9b | Direct form submissions |
| Update Record | a99c4a7d-2663-4a92-8e7f-bc8aeb2b4d8b | Updates to existing records |
6.3 Intake Configuration Fields
| Field | Field Name | Description |
|---|---|---|
| Intake Process Type | intakeProcessType | Type of intake |
| Select Account | select_account | Account/tenant selection |
| Select Folder | select_folder | Folder for document intake |
| Folder Name | folder_name | Name of intake folder |
| Intake URL | intakeUrl | URL for intake endpoint |
| API Key | intakeApiKey | API key for secure access |
6.4 Instructions Configuration
Additional instructions for the process:
| Field | Field Name | Description |
|---|---|---|
| Description | description | Instructions description |
| Attachment | instructionsAttachment | Attached instruction documents |
Section 7: Permitting Solution Patterns
7.1 Permit Application Process Pattern
Process Name: Permit Application Evaluation
Configuration:
| Step | Configuration |
|---|---|
| Basic Info | Type: Application/Form, Description: "Evaluate building permit applications" |
| Template | Upload permit application PDF or select existing permit form |
| Entity | Configure fields with AI autofill for document extraction |
| Form | Create citizen-facing application form |
| Intake | Form Submission for portal, SharePoint for email submissions |
AI Autofill Examples:
| Field | AI Instruction |
|---|---|
| Project Address | "Extract the complete property address including street, city, state, and ZIP" |
| Permit Type | "Identify the type of permit being requested (Building, Electrical, Plumbing, etc.)" |
| Estimated Cost | "Extract the estimated project cost, format as USD" |
| Contractor Name | "Find the licensed contractor's name and license number if provided" |
7.2 Document Evaluation Process Pattern
Process Name: Contract Document Review
Configuration:
| Step | Configuration |
|---|---|
| Basic Info | Type: Document/Contract, Description: "Review and evaluate contract documents" |
| Template | Upload contract template for field detection |
| Entity | AI fields for contract terms, dates, amounts |
| Form | Internal review form for staff |
| Intake | SharePoint for document library, Email for submissions |
7.3 Zoning Compliance Check Pattern
AI Autofill for Zoning:
| Field | AI Instruction |
|---|---|
| Zoning District | "Identify the zoning district from the parcel information (R-1, C-2, etc.)" |
| Lot Coverage | "Calculate or extract lot coverage percentage from plans" |
| Setbacks | "Extract front, side, and rear setback dimensions from the site plan" |
| Building Height | "Find the proposed building height from elevation drawings" |
Section 8: Evaluation Results & Metrics
8.1 Evaluation Result Structure
When documents/forms are processed, the system generates evaluation results:
| Field | Type | Description |
|---|---|---|
id | string | Unique evaluation result ID |
blob_url | string | URL to the processed document |
file_name | string | Name of the evaluated file |
file_type | string | Type of file (PDF, etc.) |
status | string | Evaluation status |
reason | string | Reason for the evaluation decision |
contact | string | Contact information |
timestamp | string | When evaluation occurred |
process_type | string | Type of process used |
form_id | string | Associated form ID |
entity_id | string | Associated entity ID |
record_id | string | Created/updated record ID |
8.2 Process History Fields
Track the history of evaluations with these fields:
| Field Name | Description |
|---|---|
record_id | Associated record identifier |
evaluation_completed_at | Timestamp of completion |
process | Process used for evaluation |
reason | Evaluation decision reason |
status | Current evaluation status |
entity_id | Entity identifier |
file_id | Source file identifier |
evaluations | Array of evaluation details |
field_id | Field being evaluated |
reason_field_id | Field containing the reason |
8.3 Dashboard Metrics
The system tracks the following metrics:
| Metric | Description |
|---|---|
total | Total evaluations processed |
approved | Number of approved submissions |
denied | Number of denied submissions |
in_review | Number pending manual review |
8.4 Final Evaluation Output
Each evaluation produces a final output:
type FinalOutput = {
value: string[]; // Array of extracted/determined values
reasoning: string; // AI's reasoning for the decision
};
Section 9: Testing and Publishing
9.1 Testing AI Instructions
Before publishing, test all AI instructions:
- Navigate to AI Sidebar
- Click Test AI Instruction
- Upload sample document
- Verify extracted values
- Adjust instructions if needed
9.2 Publishing the Process
After completing all steps:
- Review all configurations
- Click Submit to save to Process Library
- Process status changes to "Published"
- Process becomes available for use
Section 10: Field Configuration in Process
10.1 Entity Field Configuration
Fields in a process can be configured with various settings:
Field Properties:
| Property | Type | Description |
|---|---|---|
name | string | Field name |
label | string | Display label |
type | FieldType | Field type (text, dropdown, etc.) |
default_value | string | Default value |
placeholder | string | Placeholder text |
validations | FieldValidation | Validation rules |
options | FieldOption[] | Options for dropdown fields |
multi_select | boolean | Allow multiple selections |
is_protected | boolean | Protected field flag |
description | string | Field description |
ai_field_id | string | Associated AI field ID |
10.2 Field Validation Schema
| Validation | Type | Description |
|---|---|---|
required | boolean | Field is required |
min_length | number | Minimum character length |
max_length | number | Maximum character length |
min_value | number | Minimum numeric value |
max_value | number | Maximum numeric value |
pattern | string | Regex pattern for validation |
unique | boolean | Value must be unique |
index | boolean | Create index for field |
10.3 Field Configuration UI Constants
| Constant | Value | Description |
|---|---|---|
| Configure Field | Configure Field | Field config panel title |
| Field Label | Field Label | Label input title |
| Allow Multiple Select | Allow multiple select | Multi-select toggle |
| Show as Badge | Show options as badges | Badge display option |
| Color-code Options | Color-code options | Colored badges option |
Troubleshooting
Common Issues
AI Autofill Not Extracting Data
Check:
- Verify the source field contains readable text
- Ensure AI instructions are clear and specific
- Check that document quality is sufficient for OCR
- Test with sample documents
Field Detection Not Working
Check:
- Ensure template PDF has proper form fields
- Try different template formats
- Manually add missing fields
Intake Not Receiving Documents
Check:
- Verify SharePoint connection credentials
- Check folder permissions
- Confirm API key is valid
- Review intake URL configuration
Knowledge Source Not Updating
Check:
- Verify API endpoint is accessible
- Check authentication headers
- Ensure website URL is valid HTTP/HTTPS
- Confirm SharePoint permissions
Code Reference
Source Files - Process Library
| File | Location | Purpose |
|---|---|---|
| Process Library Constants | document-processing-app/src/pages/ProcessLibrary/consts.ts | Process types, statuses, tour guide steps |
| Create Process Constants | document-processing-app/src/pages/ProcessLibrary/CreateProcessTourGuide/CreateProcessTourGuide/consts.ts | Field names for process creation |
| Process Types | document-processing-app/src/pages/ProcessLibrary/types.ts | Application data types |
Source Files - AI Autofill
| File | Location | Purpose |
|---|---|---|
| AI Autofill Constants | .../Entity/AiAutoFillSidebar/const.ts | AI field configuration (watch_field_id, instructions, output_value) |
| AI Autofill Types | .../Entity/AiAutoFillSidebar/types.ts | Evaluation data structures, instruction types |
| Right Sidebar Types | .../AiAutoFillSidebar/RightSidebarSection/types.ts | Final output and sidebar configuration |
Source Files - Knowledge Base
| File | Location | Purpose |
|---|---|---|
| Knowledge Popups Index | .../AiAutoFillSidebar/KnowledgePopups/index.ts | Knowledge source exports |
| Add API Knowledge Schema | .../KnowledgePopups/AddAPIKnowledge/validationSchema.ts | API configuration validation |
| Add Website Schema | .../KnowledgePopups/AddWebsiteDialog/validationSchema.ts | Website URL validation |
| Add File Schema | .../KnowledgePopups/AddFileDialog/validationSchema.ts | Document upload validation |
| Add SharePoint Schema | .../KnowledgePopups/AddSharepointDialog/validationSchema.ts | SharePoint configuration |
| Service Types | .../Entity/serviceType.ts | Knowledge type definitions (api, document, website, sharepoint, text, entity) |
Source Files - Evaluation & Dashboard
| File | Location | Purpose |
|---|---|---|
| Dashboard Types | document-processing-app/src/services/dashboard/types.ts | Evaluation result types, metrics |
| Process History Fields | document-processing-app/src/types/processHistoryFieldNames.ts | History field names |
| Intake Constants | .../CreateProcess/Intake/const.ts | Intake type IDs |
| Template Constants | .../CreateProcess/Template/const.ts | Template field names |
Source Files - Entity Configuration
| File | Location | Purpose |
|---|---|---|
| Configure Entity Types | .../Entity/ConfigureEntity/types.ts | Field types, validation, options |
| Entity Builder Constants | .../ConfigureEntity/EntityBuilderSidebar/CustomFieldConfig/consts.ts | Field configuration UI constants |
| Entity Constants | .../Entity/consts.ts | Default colors for kanban badges |
This guide is aligned with the document-processing-app codebase as of January 2026.