Quality Problem Traceability and Defect Analysis for PCB Manufacturing: Vector Models and Indexes

This data comes from engineering, production, quality control, and laboratory teams at printed circuit board factories. Daily documents include

What this category of data looks like

This data comes from engineering, production, quality control, and laboratory teams at printed circuit board factories. Daily documents include engineering production instructions, Gerber parsing records, drilling and lamination parameters, chemical solution analysis reports, AOI inspection reports, electrical test reports, and slice analysis reports. Data sources cover Gerber files, drill tapes, BOMs provided by customers, as well as CAM files, equipment operating parameters, bath solution test results, online inspection data, and laboratory inspection data. Data updates are performed per production batch and shift. Some equipment data is collected continuously.

What constraints these characteristics impose on the vector model and index

Data sources are scattered and have diverse formats. The vector model must support semantic parsing of multiple types of text. The volume of data updated per production batch and shift fluctuates greatly. An elastically adjustable index structure must be configured to avoid retrieval delays caused by single-batch data overload. Defect analysis for PCB manufacturing requires associating multi-link data. The index must support cross-document associated retrieval, while retaining the original units and field information of parameters to ensure accuracy during traceability. Equipment data collected continuously has a high update frequency. A reasonable index refresh cycle must be set to balance retrieval real-time performance and system load.

How to set the configurations

The following configurations are based on the interface settings of FastGPT v4.17.0.

Configuration ItemRecommended Setting RangeRationale
Chunk Length800–1200 charactersAdapts to the text length of Gerber parsing records and AOI reports, avoiding loss of associated information in single-block data
Overlap Length100–150 charactersRetains contextual association between adjacent blocks, ensuring coherence of defect phenomena during cross-block retrieval
Similarity Threshold0.75–0.85Distinguishes similar defect features such as hole copper abnormalities and misalignment, reducing false recall rates
Single Search LimitTop 10 resultsMatches the associated dimensions of single-batch production data, avoiding excessive retrieval results that interfere with analysis
Maximum Context4000 charactersAdapts to the retrieval and splicing requirements of long documents such as engineering production instructions and lamination parameters
Vector Model SelectionSupports domestic open-source and commercial modelsAdapts to the semantic recognition needs of the business scenario, without being limited to models from specific vendors
defaultTokenCalibrated based on actual measurementsAdapts to the vector encoding accuracy of different types of inspection reports, matching the semantic recognition needs of the business scenario
maxTokenAdjusted based on the average length of documentsAdapts to the encoding limits of long text chunks, preventing long parameter records from failing to complete vectorization

Three common configuration mistakes

  • Retrieval results only return a single type of document, and cannot associate drilling parameters with AOI reports. This occurs because the index is not configured with cross-document association fields. Indexes are only created separately by document type, without uniformly integrating multi-link data.
  • A vector encoding error prompts that maxToken is exceeded. This occurs because the maxToken setting is not adjusted based on the actual length of the document, causing long chunked parameter records to fail to complete encoding.
  • Create, read, update, and delete operations for the vector database cannot be executed via an external management system, or unauthorized users cannot access index data. This occurs because external system call interfaces are not configured, and fine-grained index access permissions are not set according to team division of work.

How to confirm configurations are correctly set

  • Upload a single AOI report and the corresponding drilling parameter document. Verify whether both types of associated data can be recalled during retrieval, and adjust the cross-document association configuration until it meets requirements.
  • Submit a query for hole copper abnormalities. Check the similarity distribution of returned results, and adjust the value range of the similarity threshold until it matches the business recognition accuracy.
  • Import all documents for a single production batch. Verify that the index writing time meets expectations, and adjust the index refresh cycle and chunking strategy to adapt to the data update rhythm.
  • View the vector encoding logs. Confirm that the configurations of defaultToken and maxToken do not trigger encoding errors, and adjust the parameters until all documents can complete vectorization.
  • Execute create, read, update, and delete operations for the vector database via the external management system. Verify that the index synchronization status meets expectations, and adjust the configurations to adapt to the calling rules of the external system.

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