[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:

  1. Document type as "contract" or "consulting_agreement"
  2. Both parties (Jennifer Liotta and Micha Schrom) as PERSON/PARTY entities
  3. Financial terms ($250), organizations (Upwork.com), jurisdictions
  4. Legal concepts ("Work for Hire", IP assignment clauses)
  5. Populate metadata fields with extracted information

Reproduction

  1. Process any standard consulting/service agreement
  2. Examine LexC output for document_type, parties array, and entity extractions
  3. 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

  1. Review document type classification logic
  2. Audit party/person entity extraction rules
  3. Examine confidence scoring algorithms
  4. Test against broader corpus of standard legal documents
  5. Validate semantic analysis integration with entity extraction

Priority: High - Core document processing functionality affected

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗