Multi-turn Dialogue and Prompt Engineering for Coke Intelligent Due Diligence Reports

Coke-related due diligence data primarily comes from public reports released by the China Coking Industry Association, coastal port spot trading

What Data for This Category Looks Like

Coke-related due diligence data primarily comes from public reports released by the China Coking Industry Association, coastal port spot trading platforms, futures delivery warehouse inventory announcements, and internal procurement settlement records of iron and steel enterprises. Update frequencies vary across data sources: spot price data is updated daily, monthly industry operation data from industry associations is released monthly, and delivery warehouse inventory data is updated every ten days. Most public documents are structured reports, with fields including dry basis ash content, total sulfur content, crush strength, transaction price, and their respective units: mass fraction, mass fraction, megapascals, yuan per ton. Some industry analysis documents also include written explanations of regional production capacity and monthly supply and demand.

Constraints on Multi-turn Dialogue and Prompt Engineering

These data characteristics create clear constraints on multi-turn dialogue and prompt engineering. First, large differences in update frequencies across data sources require explicit specification of data time ranges and source types in prompts. This prevents the model from mixing real-time spot data and historical industry data. Second, public documents contain both structured reports and written analysis content. Multi-turn dialogue must first guide users to clarify their query type. Without this, the model may confuse the scope of retrieval fields. Third, coke-specific indicators use exclusive units. Prompts must enforce that returned results match the specified units, to avoid incorrect unit labeling. Fourth, multi-source data requires association with multiple knowledge bases. Multi-turn dialogue must support dynamic switching of knowledge base context, to ensure the retrieval scope matches the query.

Configuration Settings

Configuration ItemRecommended ValueRationale
maxContext8000–12000 charactersCoke due diligence data includes multiple structured reports and written analyses. A longer context retains indicator comparison information across multi-turn dialogue, preventing critical data loss from context overflow.
Retrieval CountTop 8–12 resultsCore coke query dimensions include multiple indicators such as ash content, sulfur content, and transaction price. An appropriate number of retrieval results covers core needs while avoiding redundant information interfering with model judgment.
Similarity Threshold0.75–0.85Structured fields in coke data have high matching accuracy requirements. A threshold that is too low introduces irrelevant industry analysis content, while a threshold that is too high may miss accurately matched indicator data.
PARSE_FILE_TIMEOUT_SECONDS300 secondsParsing a single monthly coke industry report takes significant time. Allocating 300 seconds ensures complete parsing of large reports, preventing data loss from parsing timeouts.
Segment Length1000–1500 charactersCoke indicator fields have strong correlations. A segment length matched to report structure avoids breaking complete indicator logic after splitting, while also fitting model context window limits.

The parameter values provided on this page are common starting points for configuration setup. Actual values are affected by material format, data volume, and business rules. Specific issues require case-by-case analysis. It is recommended to test on your own samples before finalizing settings.

Three Common Mistakes

  • Phenomenon: When using open source version v4.9.14, request timeouts occur after a certain number of concurrent multi-turn dialogue requests. Cause: The default value of the maxConcurrent parameter was not adjusted. The default concurrency limit for this version is low, and cannot support simultaneous multi-user query demands in the coke due diligence scenario.
  • Phenomenon: After migrating a knowledge base, full content can be viewed on the knowledge base page, but the model prompts that the knowledge base is empty during dialogue. Cause: The vector database rebuild operation was not performed. Dialogue retrieval still uses the old vector index, which cannot match newly migrated document content.
  • Phenomenon: After configuring AI reply content annotations in the workflow, annotations do not trigger at the expected time. Cause: The streaming reply trigger logic was not clarified. When stream=true, annotations must wait until the streaming reply is fully completed before triggering. Early triggering will fail to obtain complete reply content.

How to Confirm Configuration Is Complete

  • Initiate a single-turn query for coke indicators, verify that the field units of returned results match expectations, and adjust the Similarity Threshold until result matching meets requirements.
  • Initiate a multi-turn dialogue, consecutively query coke data across different time ranges, verify that historical information retained in the context is complete, and adjust the maxContext parameter to adapt to dialogue turns.
  • Upload a complete monthly coke report, perform a parsing operation, verify that parsing time does not exceed the set PARSE_FILE_TIMEOUT_SECONDS value, and adjust the timeout time to adapt to document size.
  • Initiate the same query via both API interface and online dialogue, compare the consistency of returned results, and adjust API request parameters to match online dialogue configuration.

Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-09-14.