What the Data for This Category Looks Like
Coke industry data mainly comes from the China Coal Industry Association, coastal port spot price systems, Dalian Commodity Exchange, and steel mill procurement ledgers. Spot prices are updated daily after market close. Futures trading data is synced in real time during trading hours. Industry supply and demand reports are updated every 10 days. Structured data entries include fields such as sampling date, origin, delivery grade, tax-included ex-factory price, port warehouse-out price, and total inventory. Price units are yuan per ton, and inventory units are ten thousand tons. Unstructured research reports contain supply and demand analysis and policy interpretation, with most pieces ranging from 3000 to 8000 words in length.
What Constraints Do These Characteristics Impose on Database and Operations Workflows
High-frequency real-time futures and spot data creates high concurrent write pressure. Configure data sharding and read-write separation mechanisms to address this. Coexisting structured and unstructured data from multiple sources requires databases to support hybrid storage and unified field mapping rules. Storage of long-text research reports needs adapted vector index configurations for large document chunks, to avoid context loss from segment-based recall. Data with different update frequencies must be isolated via database sharding or scheduled tasks, to prevent low-frequency tasks from occupying high-write resources. Fields such as coke delivery grade and price unit must be strictly verified, to avoid knowledge base retrieval deviations caused by non-standard data writes.
How to Set Configurations
| Config Item | Suggested Value | Rationale |
|---|---|---|
PARSE_FILE_TIMEOUT_SECONDS | 900 seconds | Coke research reports are mostly 3000 to 8000 words per piece. Default parsing timeout is insufficient, so extend to 900 seconds to ensure complete parsing. |
UPLOAD_FILE_MAX_SIZE | 2000 MB | A single coke research report plus associated spot data tables can reach a total file size of around 1.5 GB. Relax the upload limit to avoid import failures. |
Vector Database Shard Count | 8–12 shards | High-frequency write spot/futures data and low-frequency research report data are stored together. The number of shards adapts to load balancing for concurrent writes and retrieval. |
Recall count | Top 8 results | Coke investment research needs to cover multi-dimensional data including macro policies, spot prices, and futures trends. 8 recall results cover core information while avoiding redundancy. |
Similarity threshold | 0.75–0.85 | Industry terminology related to coke has high semantic similarity. A threshold that is too low introduces irrelevant retrieval results, while a threshold that is too high misses relevant information. |
MONGO_REPLICA_SET_ENABLED | Enabled | Investment research data requires write consistency and high availability. Replica sets prevent data loss caused by single-point failures. |
The parameter values provided on this page are conventional recommendations used to establish a 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 your own samples before finalizing settings.
Three Common Configuration Mistakes
- Phenomenon: When importing an Excel file containing coke spot data, the interface displays "File parsing failed", and the log shows
UPLOAD_FILE_MAX_SIZE_EXCEEDED. Cause: TheUPLOAD_FILE_MAX_SIZEparameter was not adjusted. The default upload limit is smaller than the size of a single Excel file containing multiple days of data. - Phenomenon: When starting the FastGPT service, a MongoDB error "Replica set not initialized" appears, and the service cannot start normally. Cause: The
MONGO_REPLICA_SET_ENABLEDconfiguration was not enabled, and the replica set was not manually initialized. - Phenomenon: When retrieving coke supply and demand analysis, a large number of irrelevant coal category data are mixed into the recall results, and the number of results exceeds expectations. Cause: The number of recall results was set too high, and the similarity threshold was not adjusted for coke-specific terminology.
How to Verify Configuration Correctness
- Execute a parsing task for a single coke research report. Check whether the parsing completion time meets expectations, and confirm that the
PARSE_FILE_TIMEOUT_SECONDSconfiguration takes effect. - Upload an Excel file containing multiple days of spot data. Confirm that the upload progress bar completes without format errors, and verify that the
UPLOAD_FILE_MAX_SIZEconfiguration is reasonable. - Initiate a retrieval request for "coke port inventory". Check the relevance of the recall results, and adjust the similarity threshold and number of recall results to a range that meets business requirements.
- Check the MongoDB cluster status. Confirm that the replica set nodes are running normally, and verify that the
MONGO_REPLICA_SET_ENABLEDconfiguration has taken effect.
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.