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. Operational classification requires structured rules that retain the supporting text, hierarchy position, and review state.

Context
AI Agent Development Internship
Role
Independently designed and implemented under mentor guidance

Prototype completed · rules remain review-required

LLM evaluation · Information extraction · Data classification

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 LLM semantic extraction to produce classification records with evidence references. Validation checks whether each record remains grounded in the source. Validated records are then projected into the hierarchy deterministically; substantive rule review remains separate.

A separate metadata classifier retrieves candidate paths from a rule catalog and applies deterministic context and domain hints. Where those branches leave a decision unresolved, constrained LLM selection chooses among the visible candidates. The selected rule supplies the security level.

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. LLM semantic extraction
  3. Evidence validation
  4. 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
  2. Candidate retrieval
  3. Deterministic context / hints
  4. Constrained LLM selection where needed
  5. Rule-level security lookup
  6. Review when uncertain or invalid
Deterministic branches can resolve a path before LLM selection is needed. LLM selection is limited to retrieved catalog paths; the selected rule supplies the security level. The file interface preserves source references and review state.
Structural and provenance gateExtracted rows
495Source rows
189Mapped safely into the classifier artifact
306Kept in review
Transferred rules still require substantive human review.
Candidate coverage219 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. These rates measure candidate coverage within the configured lists.

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.

Here, the deterministic hint drove the error. Evaluating the LLM component alone would miss this branch-selection failure.

CS_RQHint: patient_basic_fields
System selected

Patient information

Level 3

Repository-provided expected path

Application system

Level 2

Here, the deterministic hint drove the error.

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

  • The evaluation uses repository-provided, source-derived labels. Independent adjudication and end-to-end decision quality remain unestablished.
  • The file interface is a prototype; production service operation has not been demonstrated.
  • Traceability supports inspection. Rule accuracy, substantive human approval, medical correctness, and performance outside the tested taxonomy remain unestablished.

Other featured research

When Carbon Limits Bind