What the data for this category looks like
Daily documents for this category include batching lists, smelting logs, electrolyzer condition logs, laboratory test reports, anode and cathode quality records, and environmental protection ledgers. Data sources cover concentrate and auxiliary material analysis, DCS systems, cell voltage and current monitoring, laboratory data, and energy and environmental monitoring systems. Data update frequency follows production workflows. Each batch of raw materials, each smelting furnace, and each electrolyzer generates new data. Some monitoring metrics update in real time. Documents mostly include process parameters, quality indicators, and environmental data. Fields and units must align with standard specifications for smelting production.
What constraints these characteristics impose during deployment and upgrade
Deployments must support multi-system data access to accommodate multi-source heterogeneous production data sources, avoiding additional data synchronization development costs. High-frequency real-time business data requires database connection pools and cache services capable of handling high concurrency, preventing production data delays or loss. Knowledge base parsing rules must adapt to category-specific document structures and fields, such as batching lists and electrolyzer condition logs. General parsing templates cannot cover all business scenarios. Upgrades must maintain compatibility with historical production data storage formats, preventing historical bid quotation data from becoming unusable due to version changes.
How to set configurations
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
DB_MAX_LINK | 10–15 | This category has frequent data updates and diverse data sources. A stable database connection pool avoids connection exhaustion issues in production environments |
STORAGE_S3_ENDPOINT | Enterprise internal object storage domain name or IP:port | Daily production documents must be stored in internal compliant storage services to ensure data security and access stability |
REDIS_URL | Enterprise internal Redis cluster address, configured with 600-second expiration time | Real-time updated electrolyzer condition and laboratory test data must be cached to reduce repeated queries and lower production system pressure |
MONGODB_URI | Bound to production environment MongoDB replica set address | Multiple batches of smelting and electrolysis records require a highly available document database for storage, to ensure data persistence |
PG_URL | Configured as the read-only instance address of the enterprise production database | Bid quotation generation requires access to historical concentrate and energy data. Read-only instances avoid impacting core production operations |
FE_DOMAIN | Enterprise internal FastGPT access domain name | Internal deployment scenarios require limiting access scope to prevent unauthorized access to production data |
Three common mistakes
- Phenomenon: Calling an external model to generate quotations returns
400 Bad Request, with a prompt about incorrect business field format. Cause: The prompt template was not adjusted for the exclusive fields of the non-ferrous metal smelting category, such as cell voltage and concentrate grade. This causes incoming business data to not match the format expected by the model. - Phenomenon: After upgrading to FastGPT v4.17.0, historical electrolyzer condition logs cannot be loaded normally. Cause: Database table structures associated with the legacy production database were not backed up in advance. Updated version-adapted field mapping rules changed, leading to failed data reading.
- Phenomenon: Knowledge base recall results are empty, and smelting logs cannot be retrieved. Cause:
FILE_TOKEN_KEYwas not configured correctly. This causes uploaded structured production documents to not be parsed properly, and corresponding vector indexes cannot be generated.
How to verify successful configuration
The frontend page corresponding to FE_DOMAIN is accessed, an electrolyzer condition log document is uploaded, and successful upload with no parsing errors is confirmed. The database connection test interface is called, and the connection pool usage corresponding to DB_MAX_LINK is checked to be within the normal range, with no connection timeout or disconnection errors. A bid quotation generation request containing concentrate composition and smelting parameters is submitted, and the returned result is confirmed to include business fields corresponding to this category, with no missing or incorrectly formatted data. The storage bucket corresponding to STORAGE_S3_ENDPOINT is checked, and uploaded production documents are confirmed to be stored in preset categories, with paths complying with business rules.
The values provided are common starting points and should be evaluated against applicable deployment samples.