Mustafa Safdari
· 6 previous affiliations
- Google (United States)Since 2018
- Senior Research Engineer · Since 2018
- Amazon (United States)2013–2018
- Software Development Engineer · 2013–2018
- Stanford University2010–2013
- Research Assistant · 2011–2013
- Master's student · 2010–2012
- Summer Intern · 2012
- BMW of North America (United States)2012
- Student Developer · 2012
- B.E (Hons.), Computer Science Engineering · 2005–2009
Research Overview
Mustafa Safdari focuses on the development of autonomous web agents, the psychometric evaluation of large language models, and the creation of synthetic personas for human-AI interaction. His early work spanned genetic algorithms and medical image analysis before shifting toward natural language processing. Currently, he investigates how to rigorously measure and shape the behavioral traits of language models to improve AI safety and realistic simulation.
Research Trajectory
Mustafa Safdari’s early research explored algorithmic optimization and computer vision before transitioning into natural language processing and agentic systems. His initial work investigated metaheuristic approaches to algorithmic efficiency; in Evolving universal hash functions using genetic algorithms, he utilized genetic algorithms to construct universal hash functions capable of adapting to frequently changing input distributions to minimize collisions. He subsequently applied machine learning techniques to medical imaging, developing an Image patch-based method for automated classification and detection of focal liver lesions on CT. This work adapted bag-of-visual-words methodologies—traditionally used for scenery analysis in computer vision—to automate the detection and characterization of anomalies in medical scans.
In recent years, Safdari’s focus has shifted toward the capabilities of large language models (LLMs), particularly their application in autonomous web navigation and complex reasoning. With collaborators, he participated in the development of systems capable of processing raw web markup in Understanding HTML with Large Language Models. By fine-tuning models like T5 and PaLM, this research demonstrated that LLMs could achieve strong performance on web-based tasks with significantly less training data than prior specialized models, contributing to the research direction of Domain Specialization for Expert Performance in Small Models.
Building on this foundation, he contributed to A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesis. This project introduced a modular, LLM-driven system that combined specialized HTML-understanding models with massive code-generation models to navigate complex websites. By decomposing tasks into sub-steps and executing them via synthesized Python programs, the system improved success rates on real-world web tasks. This work advanced several key areas, including the research direction of Hierarchical and Modular Reasoning for Long Document Understanding, the broader area of Hierarchical Task Decomposition for Long Horizon Agents, and work in the area of Advancing Action Spaces for Multimodal GUI Agents.
Most recently, Safdari has focused on the behavioral and psychological evaluation of artificial systems. In A psychometric framework for evaluating and shaping personality traits in large language models, he and his co-authors introduced a rigorous methodology to measure "synthetic personality" using established human psychological standards. The study demonstrated that larger, instruction-tuned models exhibit reliable personality traits that can be precisely shaped. This foundational work supports the research direction of Engineering Personality in Large Language Models and the broader area of Psychometric Evaluation and Validation of Synthetic Personas. Safdari immediately applied these insights to healthcare simulations in Sleepless Nights, Sugary Days: Creating Synthetic Users with Health Conditions for Realistic Coaching Agent Interactions. To address the logistical challenges of evaluating AI health coaching agents, this research generated nuanced synthetic patients with specific medical histories and behavioral barriers, such as chronic insomnia or Type 2 diabetes, enabling more realistic and scalable testing environments.
Current Directions
The most recent papers in the evidence indicate a strong focus on the behavioral evaluation and simulation capabilities of large language models. A primary ongoing direction involves applying clinical and psychometric standards to artificial systems to ensure they exhibit reliable, measurable, and steerable traits. Rather than treating language models solely as reasoning engines, this work approaches them as entities whose behavioral tendencies must be rigorously quantified for safety and alignment.
A major application of this psychometric foundation is the generation of high-fidelity synthetic personas. Recent work investigates how to construct simulated users—such as patients with chronic health conditions—who possess realistic medical histories, nuanced behavioral barriers, and consistent personalities. By formalizing how these traits are embedded and maintained in language models, this research aims to solve the logistical bottlenecks of evaluating complex, multi-turn AI systems, allowing researchers to safely and efficiently test interactive agents before deploying them in sensitive real-world domains like healthcare and coaching.
Profile updated
Loading new papers…
Other researchers whose papers cluster into the same research directions — a proxy for overlapping technical interests and shared intellectual neighborhoods.
See something wrong? Report a mistake