Abstract
Cell type annotation is a critical yet labor-intensive step in single-cell RNA sequencing (scRNA-seq) analysis. While Large Language Models (LLMs) offer a promising path toward automation, they are prone to biological hallucinations and lack quantitative grounding. We present CellTypeAgent, an LLM-agent framework that combines the reasoning power of models like GPT-4o and o1-preview with empirical verification against the CZ CellxGene Discover database. Our results across nine diverse datasets show that CellTypeAgent significantly outperforms existing LLM-only and database-only methods, providing a more accurate and robust solution for biological discovery.
Introduction
In single-cell biology, identifying cell types from clusters of gene expression data is a fundamental task. Researchers typically identify "marker genes"—genes uniquely active in specific clusters—and then manually search literature to assign a cell type name. This process is time-consuming and subjective. While LLMs have been applied to this task, their tendency to "hallucinate" plausible but incorrect biological facts limits their reliability in high-stakes research. CellTypeAgent addresses these limitations by implementing a "fact-checking" mechanism that grounds LLM predictions in massive, real-world expression databases.
Methodology
CellTypeAgent operates as a two-stage agentic workflow:
- Candidate Prediction: The system prompts an LLM with marker genes and tissue context. The LLM identifies the top three most likely cell type candidates, leveraging its internal knowledge of biological literature.
- Empirical Verification: The agent queries the CZ CellxGene Discover database, which contains over 41 million cells. It retrieves quantitative expression data for the marker genes across the suggested candidates.
- Integrated Scoring: A final selection score is calculated by combining the LLM’s initial ranking with metrics from the database, such as scaled expression levels and the percentage of cells expressing each gene.
This hybrid approach uses the LLM as an intelligent "prior" to narrow the search space, while the database provides the final quantitative "truth."
Experimental Evaluation
The framework was benchmarked against nine real-world datasets, including Tabula Sapiens (TS), Azimuth, and the Human Cell Landscape (HCL), covering 303 distinct cell types across 36 tissues. We compared CellTypeAgent against GPTCelltype (LLM-only), direct CellxGene queries, and PanglaoDB.
Results and Discussion
Superior Accuracy and Model Scaling
CellTypeAgent consistently achieved higher agreement scores than all baseline methods across all tested datasets. Performance scaled with the power of the underlying LLM; the o1-preview model yielded the highest accuracy, followed by GPT-4o.
The "Distraction" Effect of Extra Context
An unexpected finding was that providing the LLM with additional domain knowledge—such as NCBI gene summaries or literature snippets—actually decreased performance. The models appeared to be "distracted" by the provided text, leading them to ignore their own robust internal knowledge. This suggests that for high-performing LLMs, the primary bottleneck is not a lack of knowledge but rather the need for empirical grounding.
Open-Source Viability
The framework also significantly boosted the performance of open-source models. For instance, integrating database verification improved DeepSeek-R1's performance by 5.1%, making it a competitive, privacy-preserving alternative to closed-source models for sensitive biological data.
Conclusion and Future Work
CellTypeAgent demonstrates that the key to trustworthy automated annotation lies in combining LLM reasoning with large-scale empirical data. While the system is currently dependent on the coverage of the CellxGene database and the cost of advanced LLM APIs, it represents a significant step toward reliable, automated biological analysis. Future work will focus on refining Retrieval-Augmented Generation (RAG) strategies to better incorporate literature without causing model distraction and expanding database integration to cover rarer cell types.
Summary updated