This document is written based on FastGPT v4.17.0.
What This Category of Data Looks Like
The data for this category comes from steel coil labels and quality certificates, press and feeder operation data, mold management systems, MES systems, coordinate measuring machine or fixture inspection data. Daily documents include stamping operation instructions, material utilization rate sheets, mold inspection sheets, first and last piece records, dimensional inspection reports, and mold change records. Data updates occur per coil of material, per batch of materials, or each time a mold is changed. Document fields include material batch number, mold number, blank holder force parameters, dimensional deviation values for inspection, and more. Common units are millimeters, newtons, and square meters.
What Constraints Do These Characteristics Impose on the "Multi-turn Dialogue and Prompting" Link
Since data is updated per coil, batch, or mold change, multi-turn dialogue must associate the current batch's mold and material parameters. Prompts must limit the context scope to documents within a single mold change cycle. Equipment inspection and maintenance in stamping workshops involve professional fields such as blank holder force and drawbead parameters. Prompts must explicitly require returning professional terminology corresponding to the stamping category, to avoid generalized responses. Because mold changes and material batches have a significant impact on production stability, multi-turn dialogue must retain chatId to associate conversation history for the same mold change, ensuring that the context of questions matches the current production link. At the same time, the scope of documents called in a single conversation must be limited to avoid mixing data from other batches, preventing off-topic responses.
How to Configure Settings
| Configuration Item | Recommended Setting | Rationale |
|---|---|---|
chatId | Bind the unique identifier of the current mold change batch | Associate conversation history for the same mold change, ensuring context matches the current production link |
messages | Retain the first 10 rounds of conversation content | Control context length to avoid exceeding the model's token limit, while retaining key maintenance conversation history |
variables | Inject current mold number, material batch number, and blank holder force parameters | Enable prompts to call on-site real-time data, accurately matching inspection and maintenance needs |
| Context recall scope | Limit to documents within the current mold change cycle | Exclude irrelevant data from other batches, preventing off-topic responses |
| Number of documents called per single request | Top 3 | Focus on the most relevant mold inspection and mold change records, reducing interference from redundant information |
| Prompt template | Fixed opening: "Please combine the mold number [{variables.moldId}] and material batch [{variables.batchId}] for this mold change, refer to the stamping operation instructions and mold inspection sheet, and answer the following question:" | Clearly define the response scope and professional terminology requirements, avoiding generalized responses |
Three Common Misconfigurations
- Phenomenon: Content returned after calling the knowledge base does not match the current question. For example, asking about the inspection requirements for a specific mold and receiving parameters for materials from other batches. Cause: The scope of recalled documents is not limited to content within the current mold change cycle, mixing historical data from other batches or mold changes.
- Phenomenon: Occasional
chat:LLM_model_response_emptyerror occurs, with the large language model returning no content. Cause: The number of documents called per single request is not limited, resulting in the passed context being too long and exceeding the model's token limit, or the prompt does not explicitly specify the available document scope, making the model unable to locate valid information. - Phenomenon: When configuring prompts in a workflow, global variables cannot be used correctly to pass current production parameters. Cause: The
variablesparameter is not correctly bound in the prompt template, or the scope of the global variable does not cover the conversation node for the current stamping workshop.
How to Confirm the Configuration Is Correct
- Check if the
chatIdin the conversation history matches the unique identifier of the current mold change batch, ensuring correct context association. - Trigger an equipment inspection question, and verify that the returned content only includes document information within the current mold change cycle, with no redundant data from other batches.
- Check if the prompt template has correctly injected parameters such as mold number and material batch number from
variables, confirming that on-site data is being called correctly. - Simulate multiple consecutive questions, verifying that
messagesretains key historical conversations and does not exceed a reasonable context length range.
The values provided here are common starting points and should be measured against the reader's own samples.