What the data for this category looks like
Typical entities in this category include apparel OEM/ODM factories, brand supply chain departments, and cutting and sewing workshops. Daily generated documents include process sheets, pattern files, layout plans, cutting orders, first sample approval records, process quality sheets, and packaging size allocation sheets. Data sources cover order and size charts, CAD pattern files, fabric and accessory inspection records, hanging system data, needle detector records, and customer sample materials. Data is updated once per order, per style, per batch. Single-style documents include clear fields such as size, piece count, and fabric direction. Some documents contain unstructured image content.
What constraints these characteristics impose on knowledge base retrieval and recall
The high-frequency update feature requires the knowledge base to support incremental synchronization by order style number, to avoid time spent rebuilding full indexes. The coexistence of multiple document types requires retrieval to adapt to both text keywords and semantic vectors, covering text requirements from process sheets and image details from patterns. Specific fields in single-style documents (such as size, cutting direction) require retrieval keywords to accurately match business fields, to avoid recalling documents from irrelevant styles. The high-stakes error consequence feature requires retrieved results to have high confidence, to avoid batch production deviations caused by incorrect reference documents. The dense process workflow feature requires retrieved results to be kept within a reasonable number, to avoid losing critical information due to exceeding the context window.
How to set the configurations
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
similarity | 0.75–0.85 | Garment process sheets require high confidence in keyword and semantic matching, to avoid recalling irrelevant documents from other style numbers |
limit | Top 6 | Single styles have a large number of process-related documents. Too many recalls will exceed the conversation context window, while too few will miss critical process requirements |
searchMode | mixedRecall | This category has both text-based process requirements (such as "double-needle stitch seam allowance 1cm") and semantic needs (such as "color difference standards for first sample approval"), adapting to multi-type document retrieval |
usingReRank | Enabled | Documents in this category have closely linked fields. Reranking filters results that are semantically similar but do not match the process, improving retrieval accuracy |
datasetSearchUsingExtensionQuery | Enabled | Fields from order size charts and layout plans require extended retrieval. For example, expand "cut piece matching" to "cut piece quantity matching, consistent fabric direction" |
collectionIds | Bound knowledge base collection ID for the current order style number | This category updates data independently per order style. Limiting collection IDs avoids recalling irrelevant documents from other styles |
Three common errors
- The symptom is that AI chat responses do not reference knowledge base content. Retrieval works normally in the debug interface, but no results are recalled during chat. The cause is failing to set
collectionIdsto the bound collection for the current order style number, leading the retrieval scope to cover the full knowledge base and recall documents from irrelevant styles. - The symptom is that the number of retrieved results does not meet expectations, cannot be limited to a fixed number, and can only be controlled by a score threshold. The cause is mistakenly using the score threshold as the basis for limiting the number of results, without correctly configuring the
limitparameter to specify the number of recalled items. - The symptom is that images embedded in text files cannot be recognized by the knowledge base for indexing, and retrieval cannot be performed using image content. The cause is failing to enable multi-modal retrieval configuration, or failing to convert images into indexable format using FastGPT's image preprocessing tool.
How to confirm proper configuration
Use the knowledge base retrieval function of FastGPT v4.17.0 to complete the following checks:
- Enter the knowledge base retrieval debug interface, enter process keywords for the current order (such as "160/84A left front panel"), confirm that all recalled documents belong to the bound collection of the current style number.
- Adjust the
similarityparameter value, verify that the matching degree of returned results meets the requirements of the process sheet, with no obvious irrelevant cross-style documents. - After enabling the
usingReRankfunction, compare the result order before and after reranking, confirm that highly relevant process documents are ranked first. - Upload a process sheet text that includes cutting pattern images, confirm that the index generated by the knowledge base includes semantic descriptions of the images and can be recalled normally.
The values provided are common starting points and should be measured against the reader's own samples.