Overview
Jinba Modules provide LLM-powered data processing capabilities including extraction, parsing, and rule-based checking. These tools analyze files with large language models to handle complex data transformation and validation tasks with high accuracy and flexibility.Key Features
JINBA_MODULES_EXTRACT
Uses an LLM to analyze a file and extract structured data according to a JSON Schema you define.
Output:
result — the extracted data, shaped by your dataSchema.
JINBA_MODULES_PARSE
A dynamic parser in which the LLM automatically adjusts the parsing approach based on the file type and outputs the extracted content.
Output:
result — the parsed content as a string.
JINBA_MODULES_CHECKER_V2
An enhanced LLM-based checker that validates a target file against JSON-defined rules. v2 supports flexible rule structures, higher-precision evaluation, and detailed reasoning for each judgment.
Output:
result — an array of check results, one per rule, each with uniqueId, rule, status (accepted / rejected / pending), range, reason, and optional additionalData.
Authentication
No authentication or tool configuration is required. The Jinba Modules API credentials are managed server-side.Example: Intelligent Document Extraction
Example: Batch Document Processing
Extraction Modes
TheextractionMode parameter is shared by JINBA_MODULES_EXTRACT and JINBA_MODULES_PARSE:
- FAST: Extracts data quickly. Best for high-volume processing of simple documents
- BALANCED (default): Extracts data with a balance of speed and accuracy. A good general-purpose choice
- QUALITY: Extracts data with the highest accuracy. Best for critical documents and complex layouts
Output Formats
TheoutputFormat parameter of JINBA_MODULES_PARSE controls the shape of the parsed result:
- MARKDOWN (default): Output in Markdown format, preserving headings, tables, and lists
- TEXT: Output as plain text
- STRUCTURED: Output in a structured format
Data Schema Design
ThedataSchema parameter of JINBA_MODULES_EXTRACT accepts any valid JSON Schema.
Basic Schema Structure
Advanced Schema Features
- Nested objects: Complex data structures
- Arrays: Multiple items of the same type
- Conditional fields: Fields dependent on other values
- Pattern matching: Regex validation
- Format validation: Date, email, URL formats
Rule Format
Therules parameter of JINBA_MODULES_CHECKER_V2 is a JSON array of rule objects. Each rule is evaluated against the target file by the LLM.
Check Results
Each entry in theresult output corresponds to one rule:
uniqueId: The rule’s identifierrule: The rule that was evaluatedstatus:accepted,rejected, orpendingrange: The location in the target the judgment refers toreason: Detailed reasoning behind the judgmentadditionalData: Extra fields matchingadditionalDataSchema, when provided
Use Cases
- Invoice Processing: Automated invoice data extraction and validation
- Document Digitization: Convert paper documents to structured data
- Data Migration: Extract data from legacy systems
- Compliance Checking: Validate documents against regulations
- Research Data: Extract structured data from research documents
- Form Processing: Automate form data extraction
- Contract Analysis: Extract key terms from contracts
- Financial Processing: Process financial statements and reports
Best Practices
Schema Design
- Keep schemas simple and focused
- Use clear, descriptive field names
- Include comprehensive descriptions
- Test schemas with sample data
- Version your schemas for consistency
Extraction Optimization
- Choose the appropriate extraction mode for your use case
- Provide high-quality input documents
- Use consistent document formats when possible
- Monitor extraction accuracy and adjust as needed
Checking Strategy
- Write rule descriptions in clear, unambiguous natural language
- Give each rule a stable
uniqueIdso results can be traced over time - Attach
references(regulations, legal documents, RAG search results) to suppress hallucinations - Review
pendingresults manually and refine rules based on thereasonoutput
Performance Considerations
- Batch similar documents together
- Use FAST mode for simple, high-volume processing
- Use QUALITY mode only where accuracy is critical
- Implement error handling for failed extractions