[BUG] LexC Document Parsing Failures: Document Type, Entity Extraction, and Party Identification
Resolved 💬 2 comments Opened Sep 21, 2025 by JLiotta-25 Closed Sep 21, 2025
Bug Description
Multiple critical parsing failures identified in LexC document processing that affect core entity extraction, document classification, and metadata generation.
Test Document Analysis
Using a standard consulting agreement document ("SchromM_Services Agreement_20190829.docx"), LexC demonstrates systematic parsing failures across multiple categories:
1. Document Type Misidentification
- Expected: "contract" or "consulting_agreement"
- Actual:
Type: unknown - Evidence: Document header clearly states "CONSULTING AGREEMENT"
- Impact: Fundamental document classification failure
2. Party Identification Failures
- Jennifer Liotta: Incorrectly labeled as
[ORGANIZATION:0.90:Client]instead of PERSON/PARTY - Micha Schrom: Correctly identified as
[PERSON:0.50:Micha Schrom]but with suspicious low confidence (0.50) - Metadata shows:
parties: [](empty array) despite two clearly named parties
3. Missing Critical Entity Extractions
- $250 payment amount: Not extracted as FINANCIAL entity
- Upwork.com: Not identified as ORGANIZATION
- State of Georgia/Fulton County: Missing jurisdiction entities
- "Work for Hire": Critical legal concept not identified as LEGAL_CLAUSE
4. Semantic Analysis Contradictions
- Flagged "Ambiguous intellectual property ownership" as critical risk
- Document contains extensive, clear IP clauses including work for hire, assignment, power of attorney
- Suggests semantic analysis isn't properly reading the extracted entities
5. Metadata Quality Issues
Impact Assessment
These parsing failures undermine:
- Document classification reliability
- Entity extraction accuracy
- Legal analysis quality
- User trust in AI-powered document review
Expected Behavior
LexC should correctly identify:
- Document type as "contract" or "consulting_agreement"
- Both parties (Jennifer Liotta and Micha Schrom) as PERSON/PARTY entities
- Financial terms ($250), organizations (Upwork.com), jurisdictions
- Legal concepts ("Work for Hire", IP assignment clauses)
- Populate metadata fields with extracted information
Reproduction
- Process any standard consulting/service agreement
- Examine LexC output for document_type, parties array, and entity extractions
- Compare against document content for obvious misses
Environment
- Document format: .docx
- Content: Standard legal consulting agreement
- LexC version: Current production version
- Processing: Standard document intelligence pipeline
Related Issues
This may be related to the broader parsing issues mentioned in:
- #4735 (Data Parsing Failure Due to Incorrect Assumptions)
- #5428 (Terminal parsing failures due to ANSI contamination)
Suggested Investigation
- Review document type classification logic
- Audit party/person entity extraction rules
- Examine confidence scoring algorithms
- Test against broader corpus of standard legal documents
- Validate semantic analysis integration with entity extraction
Priority: High - Core document processing functionality affected
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗