Quality Rules & Validation
Graphora’s quality validation system provides comprehensive data quality enforcement through format rules, business rules, and automated scoring. This ensures that extracted data meets your standards before being merged into your knowledge graph.Quality System Overview
The quality validation system operates on multiple levels:Format Rules
Pattern matching, length constraints, and case formatting validation
Business Rules
Domain-specific validation including allowed/forbidden values and ranges
Automated Scoring
0-100 scale scoring with letter grades (A-F) and auto-approval logic
Violation Reporting
Detailed reports with context, suggestions, and confidence scores
Adding Quality Rules to Properties
Quality rules are defined within property definitions using thequality section:
Format Rules
Format rules validate the structure and formatting of text data.Pattern Validation
Use regular expressions to enforce specific formats:Length Constraints
Enforce minimum and maximum character limits:Case Format Validation
Enforce consistent text casing:titleCase
titleCase
First Letter Of Each Word Capitalized
upperCase
upperCase
ALL LETTERS UPPERCASE
lowerCase
lowerCase
all letters lowercase
sentenceCase
sentenceCase
First letter capitalized, rest lowercase
Business Rules
Business rules enforce domain-specific constraints and data validity.Forbidden Values
Prevent specific values that indicate poor data quality:Allowed Values (Whitelist)
Restrict values to a predefined set:Numeric Range Validation
For integer and float properties, enforce value ranges:Range Inclusivity
Control whether boundary values are included:Global Quality Configuration
Define global quality settings that apply to the entire ontology:Quality Thresholds
Configure when data requires manual review:Complete Quality-Aware Example
Here’s a comprehensive example showing all quality rule types:Quality Scoring System
The quality system automatically scores extracted data:Scoring Algorithm
- Base Score: Starts at 100 points
- Format Violations: -5 to -15 points each (based on severity)
- Business Rule Violations: -10 to -25 points each
- Missing Required Properties: -20 points each
- Low Confidence Extractions: -5 to -10 points each
Letter Grades
Grade A (90-100)
Grade A (90-100)
Excellent Quality
- Minimal or no violations
- High extraction confidence
- Auto-approval eligible
Grade B (80-89)
Grade B (80-89)
Good Quality
- Minor violations only
- Generally acceptable for production
- May require brief review
Grade C (70-79)
Grade C (70-79)
Acceptable Quality
- Some quality issues present
- Manual review recommended
- Fixable violations
Grade D (60-69)
Grade D (60-69)
Poor Quality
- Significant quality issues
- Manual review required
- Consider re-extraction
Grade F (0-59)
Grade F (0-59)
Failed Quality
- Critical quality failures
- Not suitable for production
- Re-extraction strongly recommended
Violation Reporting
Quality violations include detailed context and suggestions:Best Practices
API Integration
Quality-validated ontologies work seamlessly with the extraction pipeline:Next Steps
See Examples
Browse complete quality-aware ontology examples
Validation Testing
Learn how to test and validate your quality rules
