Class ParseConfig.Builder

  • Enclosing class:
    ParseConfig

    public static final class ParseConfig.Builder
    extends java.lang.Object
    • Method Detail

      • target

        public ParseConfig.Builder target​(java.util.Optional<ParseConfigTarget> target)

        The target format for the parsed content.

        Supported values:

        • markdown: True markdown with logical reading order (headings, lists, tables, checkboxes). Best default for LLMs/RAG and enables section-based chunking.
        • spatial: Layout/position-preserving text that uses markdown elements for block types but is not strictly markdown due to whitespace/tabs used to maintain placement. Only page-based chunking is supported.

        Guidance:

        • Prefer markdown for most documents, multi-column reading order, and retrieval use cases
        • Prefer spatial for messy/scanned/handwritten or skewed documents, when you need near 1:1 layout fidelity, or for BOL-like logistics docs

        See “Markdown vs Spatial” in the Parse guide for details.

      • engine

        public ParseConfig.Builder engine​(java.util.Optional<ParseConfigEngine> engine)

        The parsing engine to use. Supported values:

        • parse_performance: Full-featured parsing engine with highest accuracy (default)
        • parse_light: Lightweight parsing engine optimized for speed. This does not have robust layout support and does not support markdown layout target.
      • engineVersion

        public ParseConfig.Builder engineVersion​(java.util.Optional<java.lang.String> engineVersion)

        Pin a specific parser engine version for reproducibility. When set to latest, the most recent stable version of the selected engine is used.