Technical Documentation and API Q&A for IT Procurement and Supplier Management: Document Parsing and Chunking

Data for this category typically originates from procurement systems, supplier quotation documents, budget spreadsheets, and contract systems.

What data in this category looks like

Data for this category typically originates from procurement systems, supplier quotation documents, budget spreadsheets, and contract systems. Commonly processed documents include procurement requisitions, price comparison records, formal contracts, and acceptance documents. Individual documents often include fields such as procurement order numbers, supplier qualification information, budget amounts, and clause details. Data updates are tied to individual procurement workflows, with updates occurring per order or monthly. Document structure changes based on the procurement stage; document formats and field priorities vary between the requisition and acceptance phases.

Constraints imposed on document parsing and chunking

Decentralized data sources lead to diverse document formats. These include structured tables exported from procurement systems, as well as unstructured PDF contracts and Word price comparison records. This requires the parsing module to support multiple formats. Field priorities shift across stages: procurement requisitions focus on amounts and requirements, while contracts focus on clauses. Chunking must preserve contextual connections. Update frequency is tied to individual procurement workflows, and document size fluctuates with procurement complexity. This requires adaptation to parsing and chunking for files of different sizes. Additionally, the data is used for procurement verification and compliance checks, so chunked content must retain field associations to avoid losing critical information when split.

Configuration settings

This configuration applies to FastGPT v4.17.0. Specific parameter configurations are listed below:

Configuration ItemRecommended SettingRationale
chunkSize800–1200 charactersAdapts to the field density and clause length of procurement documents, avoiding including too many unrelated items in a single chunk
chunkSplitterSplit by paragraphs and headingsPreserves the structural hierarchy of procurement documents, facilitating subsequent verification of clause and field associations
customPdfParseEnabledAdapts to PDF-format contracts and acceptance documents, preserving fields and layout information from the original layout
UPLOAD_FILE_MAX_SIZE1000 MBMeets the upload requirements for large individual procurement contracts or batch supplier quotation documents
PARSE_FILE_TIMEOUT_SECONDS600 secondsAddresses parsing time for complex documents, preventing parsing failures due to timeouts
chunkSettingModeManual configurationAdjust chunking parameters for documents from different procurement stages, adapting to differences between requisitions and contracts

Three common configuration errors

  • Phenomenon: An error is returned during the PDF parsing step, with logs showing a doc2x call exception. Cause: The customPdfParse configuration is not enabled, or an exception occurs in the parsing engine's runtime environment.
  • Phenomenon: Uploaded files are passed directly to the large model context in their original format without parsing and chunking. Cause: chunkSettingMode is not configured to enable parsing, or a node workflow skips the file parsing step.
  • Phenomenon: When calling the API to create a knowledge base file collection, it is not possible to specify PDF parsing-related configuration parameters. Cause: The official specified customPdfParse field is not used in the request body, or the parameter format does not meet interface requirements.

How to confirm configurations are active

  • A test procurement contract PDF may be uploaded, and the parsed chunked content can be checked to confirm retention of associations between clauses and fields.
  • The file parsing interface may be called, and the returned results can be checked for the customPdfParse configuration identifier to confirm the parameter is active.
  • A single procurement document under 800 MB may be uploaded, and parsing time can be verified to ensure it does not exceed the preset threshold.
  • The knowledge base file collection configuration page may be viewed, and the chunkSize and chunkSplitter parameters can be checked to confirm they match the preset configuration.

The values provided are common starting points and should be evaluated against samples from actual deployments.

Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-10-19.