Health Management Product HTTP API and External Systems

Health management product data primarily consists of personal health records, exercise logs, diet diaries, and biological indicators (e.g., blood

Data Characteristics in this Category

Health management product data primarily consists of personal health records, exercise logs, diet diaries, and biological indicators (e.g., blood glucose, blood pressure, heart rate). Data sources are diverse, including user manual input, wearable device synchronization, and imported medical testing reports. Update frequencies vary by data type; exercise and diet data might update multiple times daily, while physical examination reports or long-term monitoring data might update weekly, monthly, or quarterly. Document structures typically include fields like timestamp, event type, specific value, unit, and user ID. For example, blood glucose data includes timestamp, glucose_value (in mmol/L or mg/dL), and meal_relation (pre-meal/post-meal). Blood pressure data involves systolic, diastolic, and heart_rate.

Constraints Imposed by these Characteristics on the HTTP API and External Systems

The high-frequency updates and diverse sources of health management data require the HTTP API to have high concurrency processing capabilities and flexible data format parsing. For instance, heart rate data streamed from a wearable device every minute requires the API to quickly receive and store it, preventing data accumulation or loss. The specificity of data fields and the variety of units necessitate that FastGPT, when receiving data from external systems, standardizes data from different sources and units through preprocessing or mapping mechanisms. For example, blood glucose values might be uploaded in mmol/L or mg/dL, requiring conversion rules to be configured. The sensitive nature of the data demands higher security for the API, ensuring data transmission encryption and access control. Importing large volumes of historical data, such as annual user physical examination reports, challenges the API's timeout settings and file size limits, requiring appropriate adjustments.

Configuration Settings

Configuration ItemRecommended ValueRationale for this Value
UPLOAD_FILE_MAX_SIZE200 MBAllows sufficient upload space for potentially large health report PDFs or image files.
PARSE_FILE_TIMEOUT_SECONDS600 secondsOCR and structured parsing of large health reports (e.g., those containing multiple scanned pages) can be time-consuming.
maxContext3000 TokensPersonal health consultations often require a longer context to understand the user's comprehensive health status and historical data.
Chunk size800 charactersEnsures the semantic integrity of health data (e.g., symptom descriptions, diagnostic results), preventing critical information from being truncated.
Recall countTop 8 entriesConsiders the user's health history, recent activities, and current consultation to provide more comprehensive information retrieval.
Similarity threshold0.75Ensures retrieved health data is highly relevant to the user's query, filtering out inaccurate or unimportant information.

Three Common Mistakes

  • The HTTP API returns a 413 Payload Too Large error because the health report file uploaded by the external system exceeds the UPLOAD_FILE_MAX_SIZE limit.
  • After importing knowledge base documents, some critical health indicator fields are empty because the external system's data units do not match the configured parsing rules, leading to incorrect extraction.
  • In RAG queries, health consultation results fail to reflect the user's latest exercise data because external system exercise record synchronization is frequent, but PARSE_FILE_TIMEOUT_SECONDS is set too short, causing some data to not be processed and stored in time.

How to Verify Correct Configuration

  • Upload a simulated report file containing various health indicators (e.g., blood glucose, blood pressure) via the FastGPT management interface. Check if all key fields are correctly identified and stored.
  • Use the curl command to simulate an external system sending high-frequency, small-batch data (e.g., heart rate data stream) to the FastGPT HTTP API. Observe if the API response time is within an acceptable range and if there is no data loss.
  • In FastGPT, ask a question to a user with historical health data. Verify that the RAG results accurately cite the latest relevant health records and check if the units of the cited data are consistent.
  • Check FastGPT's backend logs for any errors or warnings caused by data format mismatches or exceeding file size or processing time limits.

Note: The values provided are common starting points. Measure against specific 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.