Cross-review of technical documentation for SMT mounting and electronic assembly: Document parsing and chunking

Business data for SMT mounting and electronic assembly comes from BOMs, Gerber files, and coordinate data provided by customers, as well as record

This configuration applies to FastGPT v4.17.0.

What the data for this category looks like

Business data for SMT mounting and electronic assembly comes from BOMs, Gerber files, and coordinate data provided by customers, as well as record documents generated by the factory’s internal MES system, mounting machines, SPI/AOI testing equipment, and reflow oven temperature recorders. Updates occur per production work order, each production line changeover, and in real time.

Document types include work order changeover sheets and first-piece confirmation reports in Word format, BOMs, coordinate files, and maintenance records in Excel format, and SPI/AOI test reports and stencil usage records in PDF format. Fields include part number, reference designator, component specification, reflow oven temperature curve parameters, test defect locations, and more. Some documents include units such as millimeters and degrees Celsius.

Documents for SMT mounting are updated in real time at the work order level. Individual documents can exceed 10 MB in size. Different document formats correspond to distinct business logic:

  • Excel-format BOMs and coordinate files require splitting by row to match individual components or work order entries
  • Word-format changeover sheets need chunking by process paragraphs
  • PDF-format test reports must be split by test chapters

If chunking logic does not match the document structure, issues will arise such as cross-work order content confusion and key parameters in test reports being split across multiple chunks. Real-time updated documents require fast parsing to align with production line changeover rhythms. Chunks that are too long will reduce retrieval accuracy. Chunks that are too short will increase retrieval overhead. In addition, format differences across multiple heterogeneous document sources require flexible parsing configurations to avoid field loss or format confusion.

How to set the configuration

Configuration ItemRecommended SettingRationale
chunkSize800–1200 charactersMatches the length of single component information and single segment of oven temperature parameter data in SMT documents, to avoid splitting critical business information
chunkSplitterLine break + custom delimiterAdapts to Excel row format and Word paragraph structure, ensuring BOM files are split by row and changeover sheets are chunked by process
PARSE_FILE_TIMEOUT_SECONDS600 secondsMatches the parsing duration of 10–20 MB large documents, to avoid interrupting the parsing process due to timeout
UPLOAD_FILE_MAX_SIZE20 MBCovers the maximum size requirement for individual work order documents, aligning with the typical size of production line documents
chunkSettingModeCustom modeAllows separate chunking rules to be configured for different document types (Excel/Word/PDF), adapting to heterogeneous multi-source data

Three common mistakes

  • After uploading a 15 MB Word-format first-piece confirmation report, the parsing process lasts more than 10 minutes and ultimately fails. The cause is that PARSE_FILE_TIMEOUT_SECONDS is set to 300 seconds, which does not cover the parsing time required for large documents.
  • After importing an Excel-format BOM file, the automatic splitting result merges three consecutive rows of component information into one chunk. The cause is that chunkSplitter is not configured to split by line break, and the default chunking logic does not match Excel row format.
  • Two identical SPI test reports are uploaded, and the chunk from one of the reports cannot be accurately recalled. The cause is that chunkSize is set too large, causing defect location information and other content in the report to be merged, and no independently retrievable chunk is formed.

How to confirm the configuration is properly set

  • Upload a 10–20 MB test document, verify that parsing time does not exceed the value set for PARSE_FILE_TIMEOUT_SECONDS.
  • Import an Excel-format BOM test file, check that each chunk corresponds to a single row of component information, with no cross-row merging.
  • Upload a single SPI test report, after splitting, check whether content related to defect locations forms an independent chunk.
  • Copy the text of a known chunk, initiate a retrieval to confirm accurate recall.

The values provided are common starting points and should be measured against the reader's own samples.