What this category’s data looks like
This category’s data covers multi-source structured and unstructured content, sourced from registered process documents, raw material batch ledgers, DCS control systems, weighing record systems, LIMS laboratory information management systems, chromatography data systems, and quality management systems. Data is generated once per production batch and each process step. Daily documents include batch production records, reaction and purification logs, cleaning validation records, impurity profile reports, deviation and change application documents. Data fields include batch number, reaction temperature, impurity concentration, solvent residue, and material balance data, with corresponding units of none, ℃, ppm, mg/L, and kilogram respectively.
Constraints imposed on model access and configuration by these characteristics
The data characteristics of this category impose multiple constraints on model access and configuration. Multi-source heterogeneous data sources require access configurations to support both structured and unstructured formats, to prevent records from different systems from failing to be parsed uniformly. The update frequency per batch and process step requires the context window to cover complete batch-related data, otherwise cross-step quality traceability cannot be completed. Specialized document structures and pharmaceutical industry-specific fields require configurations to adapt to industry terminology, while supporting precise reference of long text segments. The need to associate multi-dimensional quantitative data requires configurations to support integrating records from different systems by batch number, to ensure the integrity of traceability logic.
How to set configurations
The following configurations apply to FastGPT v4.17.0:
| Configuration Item | Recommended Setting | Rationale |
|---|---|---|
maxContext | 8000–12000 token | Covers complete production records and associated documents for a single batch, to avoid truncation of critical traceability data |
maxTokens | 2000–3000 token | Supports detailed conclusion generation for defect analysis, ensuring complete coverage of traceability steps and impurity assessment content |
quoteMaxToken | 1500 token | Retains complete references for long text segments such as impurity profiles and chromatography data, to meet professional analysis requirements |
temperature | 0.1–0.3 | Reduces randomness in analysis results, to ensure the rigor of quality traceability conclusions |
AIPROXY_API_ENDPOINT | Fill in the FastGPT proxy address deployed by the enterprise | Implements local routing for model calls, to adapt to the enterprise’s internal network environment |
AIPROXY_API_TOKEN | Fill in the access key assigned by the enterprise | Ensures permission security for model calls, to prevent unauthorized access |
Three common configuration mistakes
- Phenomenon: An error message stating "This token does not have permission to use the model" is returned when calling the model. Cause: The access key for the corresponding model is not correctly bound in the FastGPT configuration, or the key’s permissions do not cover the professional model scope required for active pharmaceutical ingredient production.
- Phenomenon: The system prompts that no available channels are available after configuring the embedding model channel. Cause: Batch fields from sources such as LIMS and chromatography data systems are not mapped to the association parameters required by the model, causing the model to fail to identify valid data sources.
- Phenomenon: Traceability results returned by the model miss critical steps or impurity data. Cause: The
maxContextsetting is too small, failing to cover complete batch production records and impurity profile reports, which cannot support comprehensive defect analysis.
How to confirm the configuration is complete
- Import batch production records and impurity profile reports for a single batch, trigger model analysis, and check whether the returned results include all critical step data associated with the batch.
- View the FastGPT model call logs to confirm that the
AIPROXY_API_ENDPOINTandAIPROXY_API_TOKENconfigurations do not trigger permission errors. - Adjust the value range of the
temperatureparameter, and verify whether the rigor of the analysis results meets the requirements of quality analysis. - Test association analysis integrating DCS data and LIMS data, to confirm that the model can correctly integrate records from different systems by batch number.
The values provided are common starting points and should be measured against the reader's own samples.