PCB Manufacturing Production Ledger Summary and Report Generation: Knowledge Base Retrieval and Recall

Data for this category primarily comes from Gerber files, drill files, and BOMs provided by customers, as well as data from internal factory CAM

What Data for This Category Looks Like

Data for this category primarily comes from Gerber files, drill files, and BOMs provided by customers, as well as data from internal factory CAM systems, production equipment parameters, bath test results, AOI inspection reports, electrical test reports, and laboratory slice reports. Data is collected continuously in line with production batches and shifts. Document structures vary significantly across roles: engineering teams produce engineering production instructions and Gerber parsing records; production teams record drilling and lamination parameters; quality teams output AOI, electrical test, and slice reports. Fields include process parameters, test values, batch numbers, and customer identifiers. No unified universal field format exists.

Constraints for Knowledge Base Retrieval and Recall

The multi-source heterogeneous data structure and high-frequency update characteristics of PCB manufacturing require retrieval to adapt to field differences across documents, avoiding confusion between different document types during retrieval. Continuously collected real-time data needs to support incremental recall, to prevent performance loss caused by full-scale retrieval. Exclusive documents for different roles require retrieval scope limited by role permissions, ensuring production, quality, and other teams can only access ledger data from their respective roles. Fields associated with production batches require binding batch numbers during retrieval, preventing accidental matching of cross-batch documents and ensuring the accuracy of ledger summary.

Configuration Settings

This configuration is based on the knowledge base retrieval logic of FastGPT v4.17.0.

Configuration ItemRecommended SettingRationale
similarity0.72–0.85Matches the field precision requirements for PCB manufacturing process parameters and test reports, prevents low-similarity irrelevant documents from appearing in retrieval results
limitTop 8 entriesCovers the number of document types for a single production batch, while keeping context length within the processing requirements for ledger summary
searchModeembeddingAdapts to multi-source heterogeneous process and test documents, enabling semantic association-based parameter recall
usingReRankEnabledPerforms secondary sorting of initial retrieval results based on the relevance of documents to production batches, correcting biases from semantic retrieval
datasetSearchUsingExtensionQueryEnabledAutomatically supplements fields such as production batch numbers and customer identifiers as extended query conditions, improving retrieval accuracy
collectionIdsBind corresponding knowledge base collections by roleRestricts engineering, production, and quality teams to only access their respective ledger documents, complying with permission control requirements

Three Common Configuration Mistakes

  • Phenomenon: Team members with write permissions cannot create ledger-related knowledge base documents. Cause: Knowledge base collections are not bound to the corresponding role permission groups, only basic browse permissions are enabled.
  • Phenomenon: Retrieval returns mixed AOI reports and drilling parameters, with more results than expected. Cause: No similarity threshold is set, or the threshold is set too low, and datasetSearchUsingExtensionQuery for supplementary batch field filtering is not enabled.
  • Phenomenon: The global variable "Select Knowledge Base" cannot dynamically match the current production batch. Cause: Production batch numbers are not bound to the retrieval logic as extended query parameters, making it impossible to automatically switch knowledge base collections for the corresponding batch.

How to Confirm Proper Configuration

  • Submit a query that includes a production batch number, check whether retrieval results only return drilling, lamination parameters, and test reports for that batch.
  • Switch accounts for different roles, verify that only knowledge base collections configured for the corresponding role are accessible.
  • Adjust the similarity threshold, observe whether the matching precision of retrieval results meets the identification requirements for process documents.
  • After enabling usingReRank, compare the order of results before and after secondary sorting, confirm that the re-ranking logic is active.

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