All research

Medical-data classification · 2026

From Policy Text to Traceable Classification

How can medical-data policy be converted into usable rules while keeping the supporting evidence attached?

Medical-data policies are written for human interpretation, but operational classification requires structured rules. The difficult part is not simply extracting a category name: a usable rule needs to retain the text that supports it, its place in the hierarchy, and its review state.

Context
AI Agent Development Internship at Hangzhou Meichuang Technology Co., Ltd.
Role
Independently designed and implemented under mentor guidance

Prototype completed · substantive rule adjudication not performed

Policy text → structured rule → evidence linkedHover or focus to follow the trace

Medical personnel information: name, organization, and employee ID; original personal data; severe impact; General Data Level 3.

001医务人员信息 医务人员姓名,单位,工号 原始数据 个人 严重危害 一般数据3级

Level 3

医务人员信息

proposed · Review required

Source linked

  1. 服务范围与对象
  2. 医务人员
  3. 医务人员信息

Deterministic projection

A policy excerpt becomes an evidence-linked classification record and is placed into the hierarchy deterministically.
Provenance details

row_id: row_f62dbe167162

evidence_id: ev_226c9fd75fb7

chunk_id: doc_1_chunk_70

A plausible-looking hierarchy can still be unsupported. I therefore separated semantic extraction from structural construction.

The policy system uses a language model to extract classification records from source text and attach evidence references. Validation checks whether the extracted content remains grounded in the source. The hierarchy itself is then projected deterministically from accepted records rather than generated freely.

A separate metadata classifier starts from a rule catalog rather than allowing a model to invent labels. It retrieves candidate paths, applies deterministic context and domain hints, and uses constrained model selection only where needed. Once a path is selected, the classifier takes the security level stored in that rule instead of accepting a free-form level from the model.

The two systems were originally connected only through their shared taxonomy. I later added a file-based conversion layer that carries compatible extracted rules into the classifier while preserving source references and upstream review state.

Policy-to-rule system

  1. Policy text
  2. Parsing and chunking
  3. Model-assisted classification-record extraction
  4. Evidence grounding and validation
  5. Deterministic hierarchy projection

Provenance-preserving file interface

  1. Extracted rule table
  2. Structural and provenance checks
  3. Classifier-compatible rule artifact
  4. Source references and upstream review state retained

Metadata classification system

  1. Metadata fields
  2. Deterministic candidate retrieval
  3. Context and domain hints
  4. Deterministic branch or constrained model selection
  5. Rule-level security lookup
  6. Review when uncertain or invalid
The model does not freely invent classification labels. Hierarchy projection is deterministic after semantic extraction. Transferred rules remain proposed until substantive review.
Structural and provenance gateExtracted rows
495Source rows
189Mapped safely into the classifier artifact
306Kept in review
Transferred rules still require substantive human review.
Two-stage candidate audit219 metadata rows

Top-20 candidate retrieval

Expected path appears within the first 20 retrieved candidates.

179/21981.74%

70 rows lost at the configured cutoff7 expected paths ranked 8–10 · 63 ranked 11–20

Seven-candidate LLM window

Expected path appears in the seven-candidate window exposed to the constrained LLM branch.

109/21949.77%

Labels: repository-provided and source-derived. Visible lists are exact prefixes of the full retrieved lists.

Loss occurs at the seven-candidate cutoff; deterministic branches can use the broader candidate list, so the window rate is not a whole-classifier accuracy ceiling.

interface demonstrationproposed · Review required
  1. Metadata fieldZGJG_DM

    可建卡履历信息 转归机构代码

  2. Selected classification path

    主题资源 / 电子病历数据库 / 基础字典 / 医疗机构信息表

  3. Rule-level securityLevel 2
  4. Source rule → linked policy evidence

    row_fc8a2ce6031e

The selected path retains its source rule and policy evidence, including the review reason: continuation-table structure inherited an upper-level classification path.

For CS_RQ, a patient-field hint pushed the classifier toward a patient-information category and Level 3. The repository-provided expected path was an application-system category with Level 2.

The example matters because the error came from decision scaffolding rather than an unconstrained model output. Domain hints can improve automation while also creating systematic override errors.

CS_RQHint: patient_basic_fields
System selected

Patient information

Level 3

Repository-provided expected path

Application system

Level 2

A deterministic hint that improves automation overall can still override the appropriate semantic path.

Expected label: repository-provided and source-derived; not independently adjudicated ground truth.

  • Candidate-retrieval metrics are not final classification accuracy.
  • The file-based interface is a prototype, not a production service.
  • Traceability does not establish rule accuracy, human approval, medical correctness, or performance outside the tested taxonomy.

Other featured research

Above or Below the Line?