[Paper Review] BiomechAgent: AI-Assisted Biomechanical Analysis Through Code-Generating Agents
BiomechAgent is a code-generating AI agent that enables natural-language–driven biomechanical data querying, visualization, and interpretation, benchmarked across data retrieval, visualization, activity classification, segmentation, and clinical reasoning with domain-specific prompts and gait-event tools.
Markerless motion capture is making quantitative movement analysis increasingly accessible, yet analyzing the resulting data remains a barrier for clinicians without programming expertise. We present BiomechAgent, a code-generating AI agent that enables biomechanical analysis through natural language and allows users to querying databases, generating visualizations, and even interpret data without requiring users to write code. To evaluate BiomechAgent's capabilities, we developed a systematic benchmark spanning data retrieval, visualization, activity classification, temporal segmentation, and clinical reasoning. BiomechAgent achieved robust accuracy on data retrieval and visualization tasks and demonstrated emerging clinical reasoning capabilities. We used our dataset to systematically evaluate several of our design decisions. Biomechanically-informed, domain-specific instructions significantly improved performance over generic prompts, and integrating validated specialized tools for gait event detection substantially boosted accuracy on challenging spatiotemporal analysis where the base agent struggled. We also tested BiomechAgent using a local open-weight model instead of a frontier cloud based LLM and found that perform was substantially diminished in most domains other than database retrieval. In short, BiomechAgent makes the data from accessible motion capture and much more useful and accessible to end users.
Motivation & Objective
- Lower the barrier for clinicians to analyze markerless motion capture data by enabling natural-language interaction and automatic code generation.
- Benchmark BiomechAgent across data retrieval, visualization, activity classification, temporal segmentation, and clinical reasoning.
- Evaluate the impact of domain-specific prompts and specialized tools on performance.
- Assess the trade-offs between cloud-based frontier models and local open-weight models for biomechanical analysis.
Proposed method
- BiomechAgent uses the smolagents framework to generate and execute Python code in a sandboxed environment from natural-language queries.
- It exposes tools for database querying, gait analysis via GaitTransformer, and visualization, with tool documentation embedded in function definitions.
- Custom biomechanical instructions guide the agent on formulas, units, and analysis strategies.
- Evaluations compare cloud (Gemini 2.5 Flash Lite) and local (MedGemma 27B) LLM backends, including ablations with and without the GaitTransformer and visuals.
- A dataset and an evaluation protocol (including LLM-as-judge for visualization and clinical reasoning tasks) were developed to quantify performance.
- Security considerations and privacy controls accompany cloud deployment versus local models.
Experimental results
Research questions
- RQ1Can a code-generating AI agent reliably retrieve, visualize, and reason about biomechanical data from markerless motion capture using natural language?
- RQ2How do domain-specific prompts and specialized tools affect performance across data retrieval, visualization, and spatiotemporal analysis?
- RQ3What is the impact of cloud-based frontier LLMs versus local open-weight models on end-to-end biomechanical analysis tasks?
- RQ4To what extent can such an agent demonstrate clinical reasoning capabilities in gait analysis and related tasks?
Key findings
- BiomechAgent achieves robust accuracy in data retrieval and visualization tasks.
- Domain-specific biomechanical instructions substantially outperform generic prompts.
- Integrating validated gait-event tools (GaitTransformer) improves spatiotemporal analysis where base models struggle.
- Frontier cloud models (Gemini 2.5) outperform local open-weight models (MedGemma) in most domains, with local models excelling primarily in database retrieval.
- Visualization and perception tasks benefit from vision-enabled LLMs, though some tasks remain challenging without specialized tools.
- The system demonstrates emerging clinical reasoning capabilities and can be guided to produce reusable analysis functions.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.