Process Specification and Technical Standard Q&A for Non-Ferrous Metal Smelting and Electrolysis: Multi-turn Dialogue and Prompt Engineering

Non-ferrous metal smelting and electrolysis daily documents include batching lists, smelting records, electrolytic cell condition records, laboratory

What this category of data looks like

Non-ferrous metal smelting and electrolysis daily documents include batching lists, smelting records, electrolytic cell condition records, laboratory reports, anode and cathode quality records, and environmental protection ledgers. Data sources include concentrate and auxiliary material analysis reports, DCS system data, cell voltage and current monitoring data, laboratory test results, energy and environmental protection monitoring records. Data update frequency varies with production cycles; new data is generated for each batch of raw materials, each smelting furnace, or each electrolytic cell. Some monitoring items are updated in real time. Document fields include raw material impurity proportion, cell operating voltage, current intensity, metal recovery rate, pollutant emission values, and other metrics. Corresponding units include tons, grams per liter, millivolts, amperes, and others.

What constraints do these characteristics impose on multi-turn dialogue and prompt engineering

Data sources for this category are scattered and updated frequently. Multi-turn dialogue must limit the length of historical context to avoid redundant data interfering with model judgment. Documents contain a large number of professional process fields, so prompts must explicitly require the model to only reference content from documents of this category, and not fabricate unmentioned parameters. Real-time updated cell condition and smelting data require the dialogue chain to quickly recall the latest documents. The number of historical turns in multi-turn dialogue must match production rhythms, to avoid excessive old data affecting answers to current questions. At the same time, core business points such as impurity control and metal balance must be clearly prioritized in prompts to ensure the model focuses on key indicators.

How to set configurations

Configuration ItemRecommended RangeRationale
Chunk Length800–1200 charactersMatches the average length of single documents for this category, avoids including unrelated business fields in a single chunk
Overlap Length150–200 charactersEnsures process details of adjacent document chunks are not truncated, maintaining coherence of processes such as batching and cell conditions
Maximum Context3000–5000 tokensLimits the volume of historical data for multi-turn dialogue, adapting to the high-frequency real-time updated data characteristics of this category
Single Recap LimitTop 6 entriesMatches the number of core production-related documents per round for this category, avoids excessive redundant data interfering with the model
Historical Dialogue Retention TurnsTop 3 turnsRestricts historical content in the messages array, matching the dialogue logic for a single batch of raw materials or single electrolytic cell in production processes
Dialogue Session IdentifierchatId bound to current sessionUsed to distinguish dialogue contexts for different production batches, ensuring context consistency for multi-turn dialogue

This configuration is based on FastGPT v4.17.0.

Three common configuration mistakes

  • Dialogue request interface returns results without citation IDs. The cause is failure to associate the process document library for this category, and failure to enable document metadata citation identifier generation.
  • Multi-turn dialogue cannot use historical questions as keywords to expand replies. The cause is failure to limit the number of historical turns in the messages array, or failure to explicitly require binding context keywords in prompts.
  • The agent outputs thinking process during runtime, but the thinking process does not appear in dialogue records. The cause is failure to configure the parameter to hide thinking processes in variables, or failure to synchronize agent configuration to the dialogue chain.

How to confirm configurations are correct

  • Initiate a query about electrolytic cell voltage and raw material impurity proportion, check if the returned results include source identifiers for corresponding documents.
  • Initiate consecutive multi-turn queries, verify that the next round of replies links to process details or question keywords mentioned in the previous round.
  • View agent runtime logs, confirm that the thinking process is hidden as configured, and does not appear in public dialogue records.
  • Import a batch of smelting records of the same category, test whether the dialogue can recall batching data and test results for the corresponding batch.

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