Context and Token for Coking Coal Investment Research Knowledge Base Construction

Coking coal investment research data sources include monthly supply and demand reports published by the China Coal Industry Association, coking coal

What the data for this category looks like

Coking coal investment research data sources include monthly supply and demand reports published by the China Coal Industry Association, coking coal futures market data from the Dalian Commodity Exchange, daily inventory weekly reports from ports, production and sales announcements from upstream and downstream enterprises, industry policy documents, and third-party coking coal quality inspection reports.

Data update rhythms vary significantly. Futures market data updates daily. Supply and demand reports update weekly or monthly. Policy documents release on an as-needed basis.

Document structures include structured fields such as dry basis ash content, sulfur content, caking index, output, sales volume, inventory, price, and others. Units include tons, ten thousand tons, yuan per ton, and others. The length of individual documents ranges from hundreds of words for quick market updates to tens of thousands of words for industry analysis reports.

Constraints on context and token processing

The multi-type, widely varying length, and highly specialized field characteristics of coking coal data first cause irrelevant data to be mixed during context recall, leading to context pollution.

Segmentation of long documents increases token consumption. The single-segment token proportion after parsing and recalling a long industry report is too high. Insufficient segmentation overlap causes context breakage.

High-frequency updates of real-time market data require high timeliness for context recall. Insufficient context count settings fail to associate with the latest market changes.

Ultra-long tasks such as cross-cycle coking coal supply and demand analysis require large amounts of context support. This easily triggers token limit exceedance or task timeout.

How to set the configurations

Configuration ItemRecommended ValueRationale
maxContextTop 15-20 entriesCoking coal data has multiple types. Too many recalled entries exceed the token limit, while too few fail to cover core information such as supply and demand, price, and inventory. 15-20 entries balance relevance and token consumption
chunkSize800-1200 charactersThe length of individual coking coal industry reports varies widely. Segmentation of 800-1200 characters keeps single-segment token usage reasonable while reducing context breakage
similarityThreshold0.75-0.85Coking coal has many specialized terms. A threshold that is too low recalls irrelevant coal category data. 0.75-0.85 filters highly relevant coking coal professional content
rerankTopNTop 5-8 entriesData related to coking coal supply and demand, price, and inventory has strong correlation. Reranking retains the top results with the highest core relevance, avoiding context mixing
maxTokenLimit12000-15000 tokenTotal token consumption for long coking coal analysis reports is high. 12000-15000 token covers the context needs of most investment research analyses
parseChunkOverlap100-150 charactersTime-series data such as daily market data for coking coal requires context coherence. 100-150 character overlap prevents information loss caused by segmentation breakage

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

Three common configuration errors

  • The phenomenon: When setting maxContext to 30 entries in FastGPT 4.10.0, only 2 entries appear in the conversation details. The cause is that the reranking step is enabled, retaining only contexts strongly relevant to the current query, or the similarity threshold is set too high, filtering most recalled results.
  • The phenomenon: The AI reply contains unexpected JSON format content. The cause is that the knowledge base includes documents with JSON format such as coking coal delivery standards and quality inspection reports. Structured data carried by the context interferes with the model's output format generation.
  • The phenomenon: Ultra-long tasks such as cross-cycle coking coal supply and demand analysis prompt task timeout, or the system alerts that the context token count exceeds the limit. The cause is that the total token count of recalled contexts exceeds the maxTokenLimit configuration value, or individual long coking coal industry analysis reports are too long, leading to excessive parsing and recall time.

How to verify correct configuration

  • View the segmented list parsed by the knowledge base. Confirm that segment lengths fall within the 800-1200 characters setting, with no excessively long or short segments.
  • Launch a test query covering coking coal supply and demand and price. Check the context count in the conversation details to match the maxContext setting, confirming the recalled count meets expectations.
  • Submit a query covering long time-series coking coal data. Review system logs to confirm no token limit exceedance prompts appear, and adjust the maxTokenLimit setting appropriately.
  • Launch a query covering coking coal specialized terms such as dry basis ash content and caking index. Confirm the AI reply has no abnormal format, and that the context is not interfered with by structured data.

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.