Large Language Models for AI-Driven Science: Three Research Workflows and Their Risks
This article examines how large language models (LLMs) are applied to AI for science (AI4S) across three concrete research scenarios: agent-orchestrated single-cell analysis pipelines, multimodal model–based parsing of scientific figures, and evaluating mathematical reasoning benchmarks. It details the technical steps, engineering constraints, and risk points for each use case, and concludes with a pre-production checklist covering data security, toolchain stability, and hallucination control. The article also compares agent-based workflows with traditional scripted pipelines to help researchers choose the right approach for reproducible and sensitive analysis tasks.
Orchestrating Single-Cell Analysis Pipelines with an Agent
Single-cell transcriptome analysis typically involves data quality control, preprocessing, dimensionality reduction and clustering, cell type annotation, and candidate gene screening. Each step requires researchers to inspect parameters and intermediate results. The overall time depends on data scale and team experience, commonly ranging from several days to weeks.
In one public case reported by a computational biology team, their agent completed the developmental atlas of thousands of mouse embryonic pancreatic cells in about 90 minutes and screened out more than one hundred candidate genes. This figure comes from the case provider’s report and has not been independently reproduced by this article. To determine whether it applies to your own project, you first need to confirm the data scale, hardware configuration, gene set, and evaluation criteria.
In such agents, the LLM typically handles task orchestration, while matrix operations are still executed by mature scientific computing libraries. The typical workflow consists of three steps:
- Intent understanding and task decomposition: The model reads the research requirement and breaks it into subtasks such as data loading, environment checks, quality control, dimensionality reduction and clustering, and annotation.
- Tool invocation: The agent calls a Python sandbox or gene database query service through controlled interfaces. Libraries like Scanpy and anndata perform the actual computation.
- Result checking and reporting: The model reads intermediate results, generates a structured report, and records the parameters and library versions used in each step.
Four constraints should be enforced in production deployment.
First, sandbox permission isolation. The container that executes code should only read the specified data directory. It must not access files of other projects, nor upload raw data to external networks.
Second, lock dependency versions. Version changes in libraries such as Scanpy can alter clustering results. Manage dependencies through a requirements file or a fixed-version container image.
Third, set a timeout and a limited number of retries for every tool call. On timeout, record the error and stop the run. The model should not modify parameters and retry on its own, as that makes results irreproducible.
Fourth, require human review of critical conclusions. Cell type annotations and candidate gene rankings should be confirmed by domain researchers before proceeding to experimental design.
Safely Calling Multimodal Models to Parse Figures in Research Papers
Drug and materials researchers need to read a large number of papers, but axis labels, data points, and chemical structures in scientific literature often appear as images. Pure text models cannot read these contents. Multimodal large language models can directly process PDF pages or images, converting figure information into structured text for downstream analysis.
The example below demonstrates the calling workflow, including environment variable configuration, timeout control, and retry logic. It is suitable as a prototype, not for direct production use.
import osimport requestsAPI_URL = os.environ["VLM_API_URL"]API_KEY = os.environ["VLM_API_KEY"]MODEL_NAME = os.environ.get("VLM_MODEL_NAME", "") # Use the model name listed in the platform documentationdef parse_figure(image_url: str, timeout_s: int = 60, max_retries: int = 2) -> str:if not MODEL_NAME:raise ValueError("Model name is not set. Configure the VLM_MODEL_NAME environment variable.")headers = {"Authorization": f"Bearer {API_KEY}","Content-Type": "application/json",}payload = {"model": MODEL_NAME,"messages": [{"role": "user","content": [{"type": "text", "text": "Extract the axis meanings and data point values from the figure. Explain the error ranges and summarize the conclusion. Mark any value you cannot confirm as uncertain."},{"type": "image_url", "image_url": {"url": image_url}},],}],}last_error = Nonefor _ in range(max_retries + 1):resp = Nonetry:resp = requests.post(API_URL, headers=headers, json=payload, timeout=timeout_s)resp.raise_for_status()data = resp.json()return data["choices"][0]["message"]["content"]except (requests.Timeout, requests.ConnectionError) as exc:last_error = excexcept requests.HTTPError as exc:if resp is not None and resp.status_code < 500:raise # 4xx errors are usually request or permission problems; retrying is meaninglesslast_error = excexcept (KeyError, IndexError, ValueError) as exc:raise RuntimeError(f"Unexpected response structure: {exc}") from excraise RuntimeError(f"Failed after multiple retries: {last_error}")
Before using this code, note three points.
First, the API endpoint, request fields, and response structure vary by platform. Always follow the service provider’s documentation. The choices field in the example only represents a common format.
Second, the input image URL must be an authorized address. Unpublished manuscripts and images containing identifiable subject data should be de-identified first. Also confirm that the API’s data retention and training policies align with your project requirements.
Third, every numeric value read by the model must be manually verified against the original figure. Errors in figure parsing often appear as miscalibrated axis ticks or incorrect legend mappings. These errors do not trigger any exception; they can only be caught by manual comparison.
Interpreting Evaluation Results for Mathematical Reasoning in LLMs
Scientific research relies on rigorous derivation, so mathematical reasoning is an important dimension for evaluating AI4S models. Several academic teams have recently released benchmarks for theoretical computer science and complex mathematical reasoning to probe the capability boundaries of current models.
According to public information, even frontier models still score limited results on some high-difficulty benchmarks. On tasks requiring multi-step rigorous proof, model accuracy remains far from being a reliable research assistant. Some open-source models perform better on tasks that combine mathematics and code, but their gap from leading international models varies by benchmark and setting. Generic claims such as “at the passing line” or “leading level” in case materials do not provide specific data and should not be taken at face value.
When comparing scores, first confirm whether the evaluation conditions are consistent. The table below lists fields you should record when reading an evaluation report. Empty cells require verification from the original paper or the evaluation page; this article does not provide specific values:
| Field | What to confirm |
|---|---|
| Benchmark name | Full name, version, and release date of the benchmark |
| Task type | Proof, computation, code verification, or other types |
| Evaluation metric | Accuracy, pass@k, majority voting, or other metrics |
| Evaluation conditions | Whether tool use is allowed, context length, decoding parameters |
| Sample size | Number of problems, and whether problems from public training sets are included |
If the fields for two models are not identical, direct score comparison is meaningless. When selecting a model, it is best to run a small-scale test with real problems from your own field and record the types of errors.
What to Check Before Deploying LLMs in AI4S Production Environments
When moving from early experiments to formal commercial use, LLMs encounter three types of engineering issues in scientific research. The following checklist can serve as a baseline before production launch.
Data Security and Private Deployment
- Does the research data involve intellectual property, clinical information, or unpublished results? If so, prioritize private networks and access control to ensure data stays within your domain.
- Is object storage configured with least-privilege policies? Are logs masking sensitive fields?
- If using a third-party model service, have you confirmed its data retention period and training usage terms?
- For highly sensitive data, consider deploying open-weight models locally. The cost is that you must maintain your own compute resources and model versions.
Long-Context and Toolchain Stability
- Research tasks often require long text inputs and multiple API calls. Are timeout, retry, and failure rollback defined for each step?
- Is there a message queue to smooth high concurrency, along with rate limiting and alerting?
- Is the model’s output format validated? When a format error occurs, can the workflow stop automatically instead of continuing with an erroneous result?
Hallucination Suppression and Conclusion Traceability
- Can each scientific conclusion generated by the model be traced to a specific source? Use retrieval-augmented generation (RAG) to link questions to external knowledge bases or literature, and require the model to provide citation numbers.
- Do the cited numbers actually exist in your knowledge base? This step can be programmatically verified.
- For conclusions that affect experimental decisions, require an independent verification method or review by a domain expert.
Conclusion and Alternative Approaches
Large language models can reduce time spent on data handling, literature reading, and report writing, and this has been validated under controlled conditions in some scenarios. However, their outputs still require confirmation by experiments or domain experts. Efficiency numbers from case studies must also be interpreted in light of specific data and hardware conditions.
For analysis tasks with fixed workflows and strict reproducibility requirements, traditional scripted pipelines such as Snakemake or Nextflow may be more reliable than agent-based approaches. An LLM can be limited to interpreting results and generating reports, leaving core computation to deterministic scripts. The choice between the two approaches depends on task repeatability, data sensitivity, and the team’s maintenance capacity.
