QuarkMed: AI Medical Foundation Model
- QuarkMed is a domain-specific medical foundation model that combines curated medical corpora, retrieval-augmented generation, and reinforcement learning to ensure factual accuracy and clinical safety.
- It leverages authority-ranked data and expert-verified rewards to minimize hallucinations and optimize structured medical reasoning for diagnostic and consultation tasks.
- Its strong benchmark performance and real-world deployment serving millions of users underscore its practical utility in medical consultation, diagnostic support, and exam-style question answering.
Searching arXiv for QuarkMed and closely related technical context. QuarkMed is a domain-specific medical foundation model developed by the Quark Medical Team at Alibaba Group for healthcare-oriented applications including medical consultation, diagnostic assistance, exam-style medical question answering, and medical search. The system is presented as a 32B-parameter model whose architecture emphasizes three requirements that the report identifies as central to medical AI: deep domain knowledge, strong factual grounding in up-to-date sources, and alignment for safe and clinically useful behavior. Its technical design combines curated medical data processing, medical-content Retrieval-Augmented Generation (RAG), and a two-stage reinforcement learning pipeline centered on verifiable medical rewards; the report also states that it is already deployed at scale, serving “millions of users” through Quark’s medical product surface (Li et al., 16 Aug 2025).
1. System definition and design orientation
QuarkMed is positioned as a domain-specific alternative to general-purpose LLMs. Rather than relying only on broad web pretraining, it is built around curated medical corpora, retrieval over authoritative sources, and reinforcement learning with verifiable medical rewards. The report frames this architecture as a response to the failure modes of generic LLMs in medical settings, particularly insufficient domain depth, weak factual grounding, and unreliable alignment under high-stakes conditions. In practical terms, the system is designed for consultation, diagnostic support, medical search, symptom interpretation, differential diagnosis support, drug-use decisions, record summarization, and licensing-exam question answering (Li et al., 16 Aug 2025).
The report treats RAG as a primary reliability layer rather than an auxiliary module. Parametric memory alone is described as insufficient for high-stakes, fact-sensitive, or rapidly changing medical questions, while retrieval from authority-ranked sources is said to improve factual precision, reduce hallucinations, and improve calibration. This suggests a model architecture in which retrieval is not merely used for recall expansion, but for epistemic control over medical output generation.
2. Corpus construction and authority modeling
A major component of QuarkMed is its curated data pipeline. The training data are organized into three broad sources: medical materials, medical knowledge, and medical records. The “medical materials” component is especially large and includes textbooks, clinical guidelines, consensus statements, academic literature, drug inserts, medical encyclopedias, and clinical pathways, totaling approximately 1T tokens. Coverage is tracked with expert guidance, and the report states that, inspired by Bloom’s taxonomy, evaluation with test sets derived from internal query-to-CoT data and a medical knowledge graph yields over 90% coverage for factual knowledge, 84% for conceptual knowledge, and 75% for qcot coverage (Li et al., 16 Aug 2025).
The corpus is not treated as undifferentiated text. Source materials are labeled by authority level from A to E using evidence-based medicine criteria such as source type and impact factor. High-authority content makes up substantial portions of the library, and the same labeling is later reused for both training and RAG filtering. This authority modeling is one of the report’s central organizing principles: it supplies an explicit ranking over evidence sources and thereby constrains both pretraining mixtures and inference-time retrieval.
The report also emphasizes document-structure quality. For image-based materials, OCR and layout extraction are improved with a content structuring model based on Qwen2.5-VL, which reportedly improved corpus quality by more than 30% over conventional OCR and brought average usability above 90%. In addition, the pipeline performs knowledge synthesis to close conceptual gaps. One example is the merging of multiple drug inserts for the same generic drug into a synthesized comprehensive insert that combines regulatory information, encyclopedic knowledge, and textbook pharmacology. This operation is intended to repair fragmented or incomplete source knowledge before model ingestion.
3. Knowledge transformation and clinical-record integration
The “medical knowledge” pillar combines structured and unstructured sources, including web-based resources, professional materials, knowledge bases, online consultation dialogues, patient records, regulations, clinical trial databases, and doctor-patient communication data. A key technical step is knowledge transformation: structured information such as SPO triples from knowledge graphs is converted into natural language so that the LLM can learn from it directly. The report describes a translation model trained on parallel SPO-text pairs, together with triple extraction and back-translation for consistency checking, followed by semantic, grammatical, and relevance filtering (Li et al., 16 Aug 2025).
The purpose of this transformation is to render symbolic knowledge LLM-compatible while preserving factual content and supporting reasoning. The effectiveness of knowledge injection is evaluated with single-shot probes, and the report states that fact-based and concept-based probe accuracy rises from 39% to 60.57% after knowledge injection. It also notes that “leading text” prompt engineering can further improve retrieval from parametric memory by adding contextual cues such as “Based on the medical knowledge you have learned…”. A plausible implication is that the system treats internalized knowledge and retrieved knowledge as complementary rather than substitutable channels.
The third pillar consists of real-world medical records drawn from public online consultation dialogues and de-identified EHR repositories. These records span outpatient and inpatient encounters, including admission notes, progress notes, procedures, discharge summaries, labs, and imaging impressions. The report states that these data are privacy-filtered, normalized, and spot-audited by physicians, and that they are used for continued pretraining and supervised fine-tuning. Their stated role is to teach authentic clinical language, workflow structure, and diagnostic reasoning patterns that are difficult to recover from textbooks alone.
4. Supervised training and ability-driven alignment
On top of these corpora, QuarkMed is trained through a multi-stage alignment process. The first supervised stage is Instruction Fine-Tuning (IFT), which uses over 400,000 high-quality samples across hundreds of core tasks. The IFT curriculum is organized around four capability dimensions: comprehension, generation, knowledge application, and analysis/reasoning. The report describes this as an “ability-driven” design that decomposes medical assistant competence into atomic abilities and then builds toward more complex tasks. It also uses a “problem-driven” augmentation loop targeting weaknesses observed during evaluation, including counterfactual robustness, output stability under paraphrase, and RAG noise resistance (Li et al., 16 Aug 2025).
A distinctive element of IFT is automated sampling-ratio optimization. The authors construct automated evaluation suites for each ability and apply Bayesian optimization with a Gaussian Process Regression surrogate model to search over the task sampling distribution, reporting improvements in capability balance across 112 tasks. Curriculum learning is used so that simpler tasks precede harder composite ones. Data quality control includes multiple-model candidate generation, cross-validation, manual expert verification, self-instructed adversarial sample generation, and red-teaming for safety.
The later supervised stage, termed Supervised Fine-Tuning in the report, is built from synthetic and real-world online data and emphasizes reasoning, summarization, contradiction handling, and safety. Its curation pipeline has four steps: medical-knowledge-grounded generation, candidate answer sampling, human-expert verification, and rule-based annotation. The system first samples anonymized real-world queries and retrieves grounding evidence using Quark Medical Search, then generates multiple candidate answers and selects the best via a “Best-of-N” strategy using an internal quality model and reward models. Experts verify and refine the outputs, and a final automatic annotation stage checks formatting and correctness. The resulting SFT data are intended to teach synthesis of dispersed information, rejection of irrelevant references, resistance to factual inconsistencies, prioritization of authoritative sources, and production of current, logically structured answers.
| Stage | Main input | Stated purpose |
|---|---|---|
| IFT | Over 400,000 high-quality samples | Build comprehension, generation, knowledge application, and analysis/reasoning |
| SFT | Synthetic and real-world online data | Improve reasoning, summarization, contradiction handling, and safety |
| RL Stage 1 | Reasoning-heavy medical prompts | Optimize verifiable reasoning tasks |
| RL Stage 2 | Preference and compliance signals | Improve Honesty, Helpfulness, and Content Compliance |
5. Verifiable reinforcement learning pipeline
The most technically distinctive component of QuarkMed is its two-stage reinforcement learning pipeline. Stage 1 RL is reasoning-focused and verifiable, targeting disease diagnosis, rational drug use, test ordering, and medical exam questions. The phase is cold-started with a small SFT pass on about 700 high-quality annotated examples to teach format compliance and baseline reasoning, after which a high-quality RL dataset with roughly 60,000 reasoning-heavy prompts plus additional examples from exam and clinical sources is used. Label quality is maintained through a model-assisted, expert-verified workflow designed to select difficult samples and ensure correctness (Li et al., 16 Aug 2025).
Verification in Stage 1 follows a hybrid design. Rule-based checks are used wherever possible, supplemented by model-based scoring for synonyms, label hierarchies, and incomplete labels. The report characterizes this as a “rule-first” design intended to reduce reward hacking. Diagnosis may use ICD matching, drug use may use JSON extraction, and test ordering can be checked via keyword matching. Optimization is performed with Group Relative Policy Optimization (GRPO) implemented via the VeRL framework, with 8 candidate responses per prompt, a KL penalty coefficient of 0.01, dynamic resampling to remove mastered examples between epochs, and increased rollouts for stability.
The reported gains are substantial on the targeted reasoning tasks. On disease diagnosis, QuarkMed’s Top-1 accuracy rises to 0.86 and list score to 3.32, compared with DeepSeek-R1’s 0.75 and 1.46 on the same measure. On Chinese National Medical Licensing Examination subsets, Quark Stage1 reports junior/intermediate/associate senior/senior scores of 0.822/0.772/0.683/0.524. The report also compares DPO and GRPO, concluding that GRPO performs better across most metrics: its table gives an overall score of 3.84 for GRPO, compared with 3.49 for DPO and 3.60 for the DeepSeek-R1 baseline, with GRPO also leading in honesty and harmlessness.
Stage 2 RL broadens the objective from narrowly verifiable reasoning to human alignment. The reward model evaluates outputs along three primary dimensions: Honesty, Helpfulness, and Content Compliance. The report places particular emphasis on Honesty because hallucination or incorrect factual claims can be dangerous in the medical setting. It describes an iterative reward-model optimization loop in which a generative reward model is first trained on manually calibrated chain-of-thought-labeled samples, then used to score multiple candidate responses and generate preference pairs; a Bradley-Terry reward model is trained on those pairs, and the resulting reward model is used in a closed loop to identify ambiguous or erroneous samples for relabeling. Additional components include a separate consistency reward model for discrepancies between reasoning traces and final summaries, and a General Verifier for content compliance and formatting.
The report does not present a single unified formal RL objective equation. Instead, it refers to Bradley-Terry preference modeling, GRPO, DPO comparisons, and KL-regularized policy optimization, and describes the training structure algorithmically.
6. Evaluation, deployment, and limitations
Evaluation is broad and spans open benchmarks and private exam-style datasets. The open benchmark suite includes MedQA, MedMCQA, PubMedQA, CMExam, AfriMed-QA, MedXpertQA, DiagnosisArena, RareBench, MedBullets, CMB-clin, MediQ, RedisQA, MMLU medical subsets, and MedCalc. The internal benchmark is CPQExam, based on the Chinese Health Professional Qualification Examination. The evaluation protocol uses a single inference pass, temperature 0.6, and standardized prompts; for multiple-choice questions, outputs are forced into JSON, and for open-ended tasks, DeepSeek-V3 is used for standardized post-processing and scoring (Li et al., 16 Aug 2025).
The report gives strong numerical performance for a 32B model. On the open benchmarks table, QuarkMed’s average score is 71.36%, compared with Qwen3-32B’s 69.02% average. It performs especially well on PubMedQA at 79.00%, CMExam at 88.60%, MediQ at 85.06%, and MMLU medical subsets at 88.37%. The model is described as less dominant on more difficult reasoning-heavy tasks such as MedXpertQA and DiagnosisArena, but still favorable relative to many open models. On the internal CPQExam benchmark, with knowledge augmentation it reaches 83.3% on primary, 85.4% on intermediate professional, 75.3% on associate senior, and 67.7% on senior professional levels; for multiple-response questions it reaches 76.4% with augmentation, and for case analysis it reaches 58.5% with augmentation. The report also identifies 70% accuracy on the Chinese Medical Licensing Examination as a central summary result.
The deployment claim is equally prominent: QuarkMed is already serving “millions of users” at ai.quark.cn. This operational scale is used in the report to support the model’s practical viability beyond benchmark performance.
The report is explicit about limitations. It argues that RL is highly effective when reward endpoints are discrete and verifiable, such as ICD-coded diagnosis or structured test ordering, but remains limited for nuanced counseling, longitudinal care planning, empathy, and uncertainty handling. It also acknowledges limitations in temporal reasoning, schema brittleness, sparse delayed feedback, and the risk that optimizing verifiable tasks may reduce empathy or brevity unless explicitly multi-objective training is added. A common misconception would therefore be that QuarkMed’s verifiable-RL pipeline resolves medical alignment in general; the report instead presents it as a strong method for structured medical reasoning, not a complete solution to all forms of clinical communication.
In that sense, QuarkMed exemplifies a specific design thesis in medical foundation modeling: reliability emerges from the interaction of curated authority-ranked corpora, explicit retrieval over current medical sources, and reward mechanisms tied to verifiable medical structure. The report presents the system not as a generic conversational LLM adapted to medicine, but as a medical model whose data architecture, alignment procedures, and evaluation protocol are all organized around clinically sensitive factuality and utility.