Can Ethos Verify Other Document Parsers?
Developer Guides

Can Ethos Verify Citations from Other Document Parsers?

DocuShell TeamJuly 6, 202614 min read

Direct answer

Yes. Ethos can verify citations from other document parsers when their output is mapped into the parser-neutral GroundingSource contract. The original parser keeps responsibility for extraction; an adapter exposes its pages, elements, text, tables, regions, fingerprints, and capabilities in a form that ethos-verify can evaluate.

Ethos does not require every parser to produce identical evidence. It requires adapters to state exactly what the source can prove. When a foreign source lacks tables, spans, fingerprints, known coordinates, or crop support, verification reports the limitation rather than upgrading weak evidence into a confident pass.

The Ethos citation-verification walkthrough explains the verifier. The source-aware parser guide explains the evidence fields worth preserving during extraction.

Why parser-neutral verification matters

Organizations rarely have one parser. They may use different systems for born-digital PDFs, scans, office documents, web pages, invoices, or domain-specific forms. Replacing every extractor to add citation verification is expensive and risky.

A shared trust boundary lets teams keep specialized extraction while standardizing evidence checks:

parser A output -> adapter A --+
parser B output -> adapter B --+-> GroundingSource -> ethos-verify -> report
parser C output -> adapter C --+

The verifier then applies one citation contract across heterogeneous sources. Differences remain visible through parser identity and capability declarations.

What GroundingSource represents

GroundingSource is the document-evidence interface consumed by Ethos verification. A source can expose:

  • parser name and version;
  • adapter name and version;
  • deterministic capability declarations;
  • source fingerprint;
  • page IDs, indices, sizes, and rotation;
  • element IDs, page relationships, geometry, kind, and text;
  • spans and character offsets where available;
  • tables, rows, columns, and cells where available;
  • coordinate origin;
  • crop support.

The source does not have to implement every feature. It must avoid claiming capabilities it cannot reliably provide.

The adapter’s responsibility

An adapter translates parser-native structures into Ethos evidence concepts. That includes decisions with verification consequences.

Mapping concern Adapter responsibility Failure if mishandled
Page identity Preserve stable page IDs and 1-based parser-neutral index Citations resolve to wrong page
Element identity Assign stable, unique, non-empty IDs Ambiguous or drifting evidence
Text Preserve meaningful content and normalization boundaries Quote mismatches or false matches
Geometry Convert units deterministically and declare origin Wrong region or crop
Tables Keep cells distinct from rendered Markdown Values lose row and column context
Fingerprint Bind evidence to exact source content Stale citations cannot be detected
Capabilities Declare missing evidence honestly Unsupported checks appear verified

Adapters are part of the trusted computing boundary. A verifier cannot correct a mapping that assigns the wrong text to the wrong page.

Minimal integration shape

A minimal Rust integration depends on the grounding types and verifier:

[dependencies]
ethos-doc-core = { version = "0.3", features = ["grounding"] }
ethos-verify = "0.3"

The parser implements GroundingSource directly or builds a wrapper around its output. A compact source can expose one page, one element, and a fingerprint:

use ethos_core::grounding::{
    Capabilities, CoordinateOrigin, GroundingElement, GroundingSource,
    PageGeometry, ParserIdentity,
};

struct ParserSource {
    fingerprint: String,
}

impl GroundingSource for ParserSource {
    fn parser(&self) -> ParserIdentity {
        ParserIdentity {
            name: "example-parser".to_string(),
            version: "1.0.0".to_string(),
            adapter: Some("example-ethos-adapter".to_string()),
            adapter_version: Some("1.0.0".to_string()),
        }
    }

    fn capabilities(&self) -> Capabilities {
        Capabilities {
            spans: false,
            char_offsets: false,
            tables: false,
            fingerprint: true,
            coordinate_origin: CoordinateOrigin::TopLeft,
            crop_support: false,
        }
    }

    fn fingerprint(&self) -> Option<String> {
        Some(self.fingerprint.clone())
    }

    fn pages(&self) -> Vec<PageGeometry> {
        vec![PageGeometry {
            id: "page-1".to_string(),
            index: 1,
            width: 61200,
            height: 79200,
            rotation: 0,
        }]
    }

    fn elements(&self) -> Vec<GroundingElement> {
        vec![GroundingElement {
            id: "element-1".to_string(),
            page: "page-1".to_string(),
            bbox: [7200, 10100, 54000, 11500],
            kind: "text_block".to_string(),
            text: Some("Revenue grew to $12.4M in Q3 2025.".to_string()),
        }]
    }
}

The capabilities correctly state that this source can support element text and a fingerprint but not spans, character offsets, tables, or cropping.

Stable identity rules

Evidence identifiers should be deterministic for the same source and parser profile. They should not depend on memory addresses, random UUIDs generated at parse time, or unordered map iteration.

Adapters should:

  • reject duplicate page, element, table, cell, and evidence IDs;
  • return pages, elements, spans, and tables in stable order;
  • document whether IDs survive parser upgrades;
  • version the adapter when mapping behavior changes;
  • invalidate old citations when stable identity cannot be preserved.

First-match behavior is unsafe. Duplicate IDs make the same citation capable of resolving to different evidence depending on ordering.

Geometry conversion

Parsers use points, pixels, normalized coordinates, or device-specific units. The adapter must convert geometry to the Ethos contract deterministically.

The documented foreign-parser guidance uses integer centipoints with half-away-from-zero rounding:

centipoints = round_half_away_from_zero(points * 100)

Boundary tests should include 0.005 -> 1 and -0.005 -> -1. The adapter must also declare top-left or bottom-left coordinate origin and reject negative or out-of-page boxes.

Without these rules, a region citation can highlight a different location across systems.

Table evidence requires structure

Markdown tables are presentation strings, not canonical cell evidence. Preserve:

  • table ID;
  • row and column identity;
  • header relationships;
  • cell coordinates;
  • raw cell text;
  • units and footnotes;
  • continuation-page relationships when supported.

If the parser emits only flattened text, declare tables: false. Ethos can still verify supported quote or presence claims, but a table-cell request should be capability blocked.

Fingerprints and source freshness

A foreign parser should expose a fingerprint when it can bind evidence to exact source bytes or a documented canonical representation.

Fingerprint design must specify:

  • input bytes or canonical payload being hashed;
  • hash algorithm and encoding;
  • whether parser diagnostics are excluded;
  • whether document metadata affects identity;
  • when derived artifacts must be invalidated.

Ethos can compare a citation envelope fingerprint with the GroundingSource fingerprint. The application still decides which source version is approved and eligible.

Capability-aware verification

Source capability Supported check examples If absent
Fingerprint Stale-source detection Cannot prove exact source version
Elements and text Element quote and presence Basic evidence unavailable
Spans Span-level quote targeting Span claim capability blocked
Character offsets Exact offset references Offset claim capability blocked
Tables Row/column/cell claims Table claim capability blocked
Known coordinate origin Bounded region checks Geometry claim capability blocked
Crop support Source crop rendering Logical evidence only or unavailable

This allows one parser to participate safely without imitating the richest native source.

Current foreign-parser reference path

The repository includes an OpenDataLoader-style JSON grounding adapter path and pinned real fixtures. It demonstrates quote, value, and presence checks while surfacing capability limitations where the foreign representation lacks native evidence metadata.

Treat the adapter as a mapping reference, not proof that every output from every parser version is automatically compatible. Pin formats and build conformance fixtures for the exact producer version you deploy.

Adapter conformance test suite

Test at least:

  1. deterministic page and element order;
  2. unique IDs and duplicate rejection;
  3. page-index convention;
  4. positive and negative half-step geometry rounding;
  5. top-left and bottom-left coordinate conversion;
  6. negative and out-of-page box rejection;
  7. quote match and mismatch;
  8. missing element and page;
  9. fingerprint match and stale fingerprint;
  10. table-cell match, mismatch, and missing cell;
  11. capability blocking for unavailable spans and tables;
  12. stable reports across repeated runs;
  13. malformed foreign input rejection;
  14. parser and adapter identity in reports.

Use fixed, license-safe fixtures and assert exact structured outcomes.

Integration architecture for an existing RAG system

existing parser
  -> existing index and retrieval
  -> generated answer + parser-native evidence IDs
  -> adapter resolves parser-native artifacts as GroundingSource
  -> Ethos verifies submitted citations
  -> application checks relevance and synthesis
  -> release, partial answer, review, or block

The application should not assume retrieval IDs and grounding IDs are identical. Maintain an explicit mapping if indexing transforms or groups parser elements.

What Ethos does not take over

Ethos does not become responsible for:

  • file-format extraction;
  • OCR quality;
  • parser security isolation;
  • source authority and access control;
  • retrieval ranking;
  • claim extraction completeness;
  • semantic answer correctness;
  • infrastructure availability.

The adapter creates a verification boundary, not a transfer of all parser responsibilities.

Choosing between native and foreign sources

Requirement Native Ethos path Foreign parser adapter
Existing parser investment Requires adopting native parsing for that source Preserves current extraction
Evidence richness Fullest current Ethos evidence path Limited by foreign output
Format breadth Narrow public-beta born-digital PDF scope Can reflect parser’s broader formats
Mapping effort Lower within native model Adapter and conformance work required
Capability transparency Defined by native source Must be declared accurately by adapter
Migration risk Parser change Trust-boundary mapping change

Choose based on the source and workflow. A mixed architecture can use native Ethos evidence for supported PDFs and adapters for other sources.

Definitive verdict

Ethos can verify other parsers without replacing them. The key is a trustworthy GroundingSource adapter that preserves stable evidence identity, maps geometry and tables deterministically, exposes source fingerprints, and declares limitations honestly.

Use DocuShell Parse PDF for source-aware document workflows, Ethos for parser-neutral verification, the Ethos problem-and-control guide for integration boundaries, and the DocuShell hallucination index for broader workflow-risk context.

Primary keyword: Ethos document parser integration
Optimized meta title: Can Ethos Verify Other Document Parsers?
Optimized meta description: Integrate foreign document parsers with Ethos through GroundingSource adapters for deterministic citation verification.
Proposed URL slug: can-ethos-verify-citations-from-other-document-parsers

Frequently Asked Questions

Yes. A parser can expose its pages, elements, tables, regions, fingerprints, and capabilities through a GroundingSource implementation or adapter.
No. Your parser retains responsibility for extraction. Ethos consumes its structured evidence and verifies whether submitted citations bind to that evidence.
It maps parser-native output into Ethos evidence concepts, including stable IDs, pages, elements, tables, geometry, fingerprints, and capability declarations.
The adapter declares the missing capability, and Ethos reports a capability-limited or capability-blocked result instead of pretending the evidence is available.

Free Tool

PDF to JSON

Turn PDFs into structured, source-aware data for RAG, review, and automation.

Try PDF to JSON
Ethos GroundingSourcedocument parser adapterparser-agnostic verificationcitation verificationOpenDataLoaderdocument AI
D

DocuShell Team

The DocuShell editorial group writes and maintains guides for everyday PDF workflows, with updates made when tool behavior or documented limits change. See our editorial standards for the process behind each article.

Focus: Parser integrations, GroundingSource adapters, document evidence, and citation verification

Questions or feedback? Get in touch.

Related Articles