Multi-turn Dialogue and Prompt Engineering for Energy Metals Financing Daily Reports

Data sources include public daily reports from domestic nonferrous metal industry associations, daily settlement quotes from the Shanghai Futures

What the Data for This Category Looks Like

Data sources include public daily reports from domestic nonferrous metal industry associations, daily settlement quotes from the Shanghai Futures Exchange, and aggregated daily quotes from spot traders. Full data for the previous trading day is updated before 7:00 AM daily. Each knowledge base file uses a standardized structured format, covering 12 to 18 mainstream energy metal categories with standardized fields. Fields include product name, same-day spot price, same-day futures settlement price, major port inventory, weekly cumulative inventory, and customs declaration volume reference values. Corresponding units are yuan/ton, yuan/ton, ton, ton, and ton respectively. Files are named by date. Each file has a data size of approximately 50-80 KB, with no complex nested hierarchies.

Constraints Imposed on Multi-turn Dialogue and Prompt Engineering

The daily updated single-file structure requires that dialogue flows accurately recall the latest daily file, to avoid mixing expired data and causing conclusion deviations. Standardized fields and fixed units require that prompts clearly specify output formats, requiring models to strictly match field names and units, and not fabricate parameters or units independently. The fixed number of categories and clear fields require that recall processes perform precise filtering based on energy metal categories mentioned by users, to avoid recalling redundant data from unrelated categories. The moderate single-file data size requires that context windows reserve sufficient space to accommodate complete recalled field content, preventing key information from being truncated.

Configuration Settings

Configuration ItemRecommended ValueRationale
recall countTop 3The number of categories in the energy metals financing daily report single file is limited. Precise recall can cover the categories queried by users, and excessive recall will introduce redundant data
similarity threshold0.75-0.85Category fields and units are standardized, so a high matching degree is needed to filter recall results of unrelated categories and prevent the model from confusing different metal parameters
maxContext8000-12000 charactersThe single file has a moderate data size. It is necessary to retain complete recalled field content and multi-turn dialogue history to prevent key information from being truncated
PARSE_FILE_TIMEOUT_SECONDS60 secondsThe single knowledge base file has a small data size, so no long parsing wait time is required, avoiding unnecessary timeout errors
reference content template{{content}}It is necessary to fully retain the original field and unit information to ensure that the model output is consistent with the knowledge base data format
reference template promptPlease answer user questions based on the following energy metal data: {{reference content}}Clearly inform the model to answer based on the recalled structured data, avoiding fabricating unspecified parameters

The parameter values provided on this page are all conventional recommendations used to determine the starting point for configuration. Actual values are affected by material form, data volume and business rules. Specific issues require specific analysis. It is recommended to test on self-hosted samples before finalizing the configuration.

Three Common Errors

  • Phenomenon: When calling the dialogue interface, returned results do not reference the target energy metals financing daily report knowledge base, and only output general answers. Cause: The kbId identifier of the created knowledge base is not passed in dialogue interface request parameters, so the system does not bind the specified knowledge base for content recall.
  • Phenomenon: Model output results include additional data not included in the knowledge base, which does not match actual daily report content. Cause: The configuration logic of reference content template and reference template prompt is confused, and prompts do not clearly limit answering only using recalled daily structured data.
  • Phenomenon: Online dialogue return results fully include specified fields, but when calling the API (with stream=false and detail=true), return results lack quotation fields for some energy metal categories. Cause: The include_details parameter is not enabled in API requests, or incorrect recall filtering rules are configured, causing some fields to be filtered out.

How to Confirm Configuration is Complete

  • Access the configuration backend, view recall parameter settings of the target knowledge base, check values of recall count and similarity threshold to confirm they match recommendations in the configuration table, and verify that the bound kbId matches the target knowledge base.
  • Initiate a single-round test dialogue, submit a query containing a specific energy metal category, and check model output to confirm it strictly uses fields and units in the knowledge base, with no unspecified parameters or units present.
  • Call the dialogue API interface with correct kbId and detail=true parameters, check the references field in returned results, and confirm recalled content matches original data of the knowledge base file.
  • Initiate a continuous multi-turn dialogue, check that the context window fully retains historical dialogue and recalled knowledge base content, with no key information truncated.

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.