Tool Calling and Plugins for Culture Media and Consumables Pharmacovigilance

Pharmacovigilance data for culture media and consumables originates from production batch reports, quality inspection reports, user complaints, recall

Data Characteristics

Pharmacovigilance data for culture media and consumables originates from production batch reports, quality inspection reports, user complaints, recall notices, and regulatory agency defect reports. Data update frequencies vary. Batch and quality inspection reports generate at product release. Complaint data is real-time. Regulatory announcements are periodic. Document structures also vary. Batch reports may be structured database records or PDFs, containing fields like batch number, production date, expiration date, and composition analysis. User complaints are often unstructured text, including symptoms, product name, and batch number. Recall notices and defect reports are typically structured announcement files. Specific fields and units are notable: composition analysis often involves trace elements and culture performance indicators with diverse units such as ug/mL, cells/mL, and growth cycle. Indicators also vary significantly between different products.

Constraints Imposed by These Characteristics on Tool Calling and Plugins

The diverse data sources for culture media and consumables require FastGPT's tool calling to flexibly adapt to various interface types. For example, a database connector handles structured batch data, and an HTTP request plugin retrieves regulatory announcements. Unstructured complaint text demands high performance from text extraction and entity recognition plugins, requiring accurate identification of key information like product batch numbers and adverse reaction descriptions. Inconsistent update frequencies necessitate tool calling trigger mechanisms that support scheduled tasks (e.g., daily regulatory announcement fetching) and event-driven triggers (e.g., real-time processing of new complaints). Complex fields and units, especially for composition analysis indicators, require plugins with robust data transformation capabilities. This includes standardizing different units or converting qualitative descriptions into quantifiable metrics for subsequent analysis. When processing this data, documents may contain extensive specialized terminology and abbreviations, requiring enhanced knowledge base retrieval accuracy.

Configuration Guidelines

Configuration ItemRecommended ValueRationale
HTTP_REQUEST_TIMEOUT_SECONDS60 secondsAccommodates most external API response times, preventing timeouts due to network fluctuations or slow interface processing.
DATABASE_QUERY_MAX_ROWS5000 rowsEnsures a single query covers sufficient batch data, preventing data omission.
TEXT_EXTRACT_MODEL_PARAMS{"model": "qwen2.5", "temperature": 0.3}Balances accuracy and generative diversity for unstructured complaint text.
FUNCTION_CALL_RETRY_COUNT3 timesHandles transient external service failures, improving tool call success rates.
MAX_RESPONSE_TOKENS1024 tokensEnsures complete plugin return results, especially for recall notices containing detailed descriptions.
SQL_ENCODINGutf8mb4Ensures correct display of Chinese characters and special symbols in database query results.

Common Pitfalls

  • External API calls return 5xx errors or connection timeouts, even when Postman calls succeed. This often occurs due to network isolation or differing proxy settings between the FastGPT environment and Postman, preventing requests from reaching the target service or being blocked by a firewall.
  • Key fields (e.g., product name, batch number) in batch report data retrieved from the database are empty or garbled. This typically results from incorrect database connection encoding settings or SQL_ENCODING not being set to utf8mb4.
  • The entity recognition plugin fails to accurately extract the severity or specific description of adverse reactions from unstructured complaint text. This often indicates that the text extraction model's Prompt design is not precise enough to guide the model to focus on specific information.

Verification Steps

  • Check FastGPT's debug logs for tool call plugin request and response details. Confirm an HTTP status code of 200 and that the returned data structure matches expectations.
  • In the FastGPT test interface, input a simulated complaint containing a batch number and adverse reaction description. Observe whether the entity recognition plugin accurately extracts the product batch number and adverse reaction fields, then compare with expected results.
  • Execute a complete batch data query. Check that key fields like product batch number, production date, and expiration date are complete and not garbled. Verify that the data transformation plugin correctly processed units.

Note: The values provided are common starting points. Measure against your own samples to determine optimal settings.

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-21.