Service Consultation and Reply for Medical Insurance Expense Settlement Review: Vector Models and Indexes

Service Consultation and Reply for Medical Insurance Expense Settlement Review: Vector Models and Indexes

What this category of data looks like

Data sources include the national medical security information platform, hospital HIS and medical insurance interfaces, medical insurance catalog and coding library, and cross-provincial medical treatment settlement platform. The update frequency is daily. Daily documents include medical insurance settlement lists, expense details, medical record homepages, prescriptions, rejection payment lists, and settlement reconciliation statements. Data fields include diagnosis and treatment item codes, pharmaceutical and consumable codes, expense amounts, settlement status, and other fields, with units such as amount and service count.

What constraints these characteristics impose on vector models and indexes

Daily updated data requires indexes to support incremental construction, avoiding full reconstruction that consumes excessive resources. Multi-source interface data may have inconsistent field formats, so standardized processing must be completed before indexing. Documents contain structured codes and unstructured text, so vector models need to meet both code matching and semantic understanding requirements. For single or batch review business scenarios, index recall speed must meet low-latency response requirements, while ensuring the accuracy of recall results to avoid fund payment risks.

How to set the configuration

Reference only; verify against the target FastGPT release and deployment documentation.

Configuration ItemSuggested ValueRationale
Chunk length800–1200 charactersAdapts to the field association density of medical insurance settlement documents, avoiding splitting that breaks the binding relationship between codes and expenses
Overlap length100–200 charactersRetains context of diagnosis and treatment item codes across chunks, improving matching accuracy
maxToken8192 tokenCovers the complete semantics of a single medical insurance settlement list, avoiding truncation of critical review information
defaultToken2048 tokenAdapts to the context length of a single review request, balancing recall efficiency and information completeness
Similarity threshold0.75–0.85, calibrated via actual testingMatches the strong semantic association characteristics of medical insurance codes, filtering low-correlation historical settlement data
Single search limitTop 10 entriesAdapts to the fast response requirements of single-item reviews, avoiding excessive recall results that increase processing time

Three common errors

  • Issue: When deploying a PG database via Docker, knowledge base index construction always fails, and the interface shows build timeout or no results. Cause: Chunking parameters are not adjusted for the field association characteristics of medical insurance settlement documents, leading to memory usage exceeding the host configuration limit during chunking, triggering container resource restrictions.
  • Issue: When accessing OneAPI to call embedding models, errors persist, and it is not possible to separately configure an embedding model dedicated to indexing. Cause: An independent embedding model interface is not specified for the indexing link in system settings, and the default OneAPI channel does not have embedding model call permissions enabled.
  • Issue: After starting docker-compose, calling the text-embedding-v3 model returns a 503 error, prompting that there are no available channels under the default group; or the CHATAPIKEY environment variable is configured but does not take effect. Cause: The CHATAPIKEY environment variable is not correctly declared in docker-compose.yml, or the container is not restarted to load the new configuration, causing the indexing link to fail to obtain valid model call credentials.

How to confirm the configuration is correct

  • Manually upload a medical insurance settlement list document to trigger index construction, and check whether the index status changes to completed.
  • Enter a medical insurance expense review consultation question, and check whether the recalled relevant documents contain matching diagnosis and treatment item or pharmaceutical and consumable code information.
  • Check the system operation logs to confirm that the embedding model call does not return a 503 error, and that the index chunking parameters match the preset configuration.
  • Batch import the daily updated medical insurance settlement detail data, and verify whether the index can normally load new data.

The values provided here are common starting points, and should be evaluated against the operator’s own samples.

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