{"version":1,"type":"story","url":"https://digestai.news/story/researchers-propose-medcode-to-boost-llms-medical-calculation-accuracy","json":"https://digestai.news/story/researchers-propose-medcode-to-boost-llms-medical-calculation-accuracy.json","markdown":"https://digestai.news/story/researchers-propose-medcode-to-boost-llms-medical-calculation-accuracy.md","slug":"researchers-propose-medcode-to-boost-llms-medical-calculation-accuracy","headline":"Researchers propose MedCode to boost LLMs’ medical calculation accuracy by 20–30%","summary":"A new framework called MedCode aims to improve large language models’ ability to perform precise medical calculations. Current LLMs struggle with tasks requiring exact numerical outputs, such as medication dosing or organ-function assessments, where errors can have severe consequences. MedCode trains models to generate embedded, executable code for calculations, delegating arithmetic to a deterministic interpreter for accurate results with explanations and units.\n\nThe approach uses supervised fine-tuning and preference datasets from the MedCalc benchmark and ICU scenarios. Researchers also introduce weighted Direct Preference Optimization (wDPO) to prioritize harder-to-distinguish preference pairs. Testing on LLaMA3-8B, Qwen2.5-7B, and Mistral-7B shows absolute accuracy gains of 20–30 percentage points, suggesting embedded code generation significantly improves reliability in medical calculations.","keyPoints":["MedCode framework embeds executable code in LLMs for medical calculations, improving accuracy by 20–30% on benchmarks","Tests on LLaMA3-8B, Qwen2.5-7B, and Mistral-7B show gains in MedCalc and ICU scenario datasets","Weighted Direct Preference Optimization (wDPO) adapts to emphasize difficult-to-distinguish medical calculation tasks"],"whyItMatters":"More accurate medical calculations from LLMs could reduce errors in high-stakes clinical decisions like dosing and organ-function scoring, potentially saving lives and improving patient outcomes.","category":{"slug":"research","name":"Research","url":"https://digestai.news/category/research"},"entities":{"companies":[],"models":["LLaMA3-8B","Qwen2.5-7B","Mistral-7B"],"people":[]},"firstPublishedAt":"2026-09-29T04:00:00Z","updatedAt":"2026-09-29T04:00:00Z","sourceCount":1,"hasPrimarySource":true,"sources":[{"outlet":"arXiv cs.AI","title":"Improving Medical Calculation of LLMs with Embedded Coding","url":"https://arxiv.org/abs/2609.31908","publishedAt":"2026-09-29T04:00:00Z","type":"primary","primary":true,"lead":true}],"sourceNotes":null,"discussions":[],"thread":null,"cite":{"text":"Digest AI, \"Researchers propose MedCode to boost LLMs’ medical calculation accuracy by 20–30%\", 29 September 2026, https://digestai.news/story/researchers-propose-medcode-to-boost-llms-medical-calculation-accuracy","publisher":"Digest AI","title":"Researchers propose MedCode to boost LLMs’ medical calculation accuracy by 20–30%","datePublished":"2026-09-29T04:00:00Z","url":"https://digestai.news/story/researchers-propose-medcode-to-boost-llms-medical-calculation-accuracy"},"generatedBy":"Written by Digest AI's editorial model from the linked sources; the sources are the record.","license":"Headlines, digests and key points are written by Digest AI and may be quoted with a link to the story page. Linked articles belong to their publishers. Terms: https://digestai.news/terms#reuse"}