AI for Science with LLMs: Engineering Challenges and Deployment Practices

    AI for Science (AI4S) requires more than strong model capability. It depends on reproducible scientific workflows that combine general-purpose LLMs, domain models, scientific tools, data governance, expert review, and observability. This article presents a five-layer system architecture and examines seven engineering challenges, including scientific data silos, domain evaluation, tool orchestration, agent reliability, long-context knowledge injection, cost and latency pressure, and ecosystem governance. It also recommends starting with verifiable use cases and monitoring reproducibility, tool success rates, manual rework, and cost.

    AI for Science (AI4S) is becoming an important direction for LLM deployment. Unlike general question answering and content generation, AI4S involves long-chain workflows built from scientific data, scientific tools, scientific hypotheses, and experimental validation. In a publicly disclosed case from an LLM open platform, a biomedical agent integrated with a general-purpose LLM analyzed gene expression across thousands of single-cell samples, built a cell developmental atlas within hours, and screened hundreds of candidate genes. In drug and materials R&D, some teams have collaborated from the early stages of model iteration to explore literature mining, property prediction, and experimental design. These cases show that LLMs can already enter scientific research processes, but moving from “demonstration-ready” to “trustworthy at scale” still involves a series of engineering challenges.

    1. The Core of AI4S Is a Closed-Loop Scientific Workflow, Not Model Parameters

    A typical scientific research process includes problem definition, literature review, data acquisition and cleaning, computational or experimental design, result analysis, hypothesis revision, reporting, and reproducibility. In this process, LLMs are better suited to roles such as natural language interfaces, knowledge retrieval, tool orchestration, code generation, result interpretation, and report generation. They should not replace numerical simulation, domain models, or experimental equipment. A real AI4S system needs to organize general LLMs, domain-specific models, scientific computing tools, data permission systems, and expert review mechanisms into a closed loop.

    Take single-cell analysis as an example. A complete pipeline usually includes data quality control, dimensionality reduction and clustering, cell type annotation, trajectory inference, differential expression analysis, and candidate gene ranking. An LLM can generate analysis plans, call tools, and explain intermediate results, but key computations should still be performed by verifiable domain tools. Drug and materials R&D similarly require literature evidence, molecular representation, property prediction, experimental constraints, and result write-back. If an LLM is treated only as a chat entry point without a toolchain and data governance, the system will struggle to produce reproducible scientific conclusions.

    2. Typical System Layers: Putting Agents Back into the Engineering Architecture

    An AI4S-oriented engineering architecture can be divided into five layers:

    1. Infrastructure layer: Provides general capabilities such as GPU/CPU compute, container platforms, object storage, message queues, logging, monitoring, and alerting. Baidu AI Cloud’s general compute, object storage, container platform, logging, and monitoring capabilities can serve as underlying infrastructure, but the scientific workflows above still require dedicated design.
    2. Model service layer: General-purpose LLMs handle understanding and orchestration; domain models handle specialized tasks such as molecular properties, sequence analysis, and image recognition; multimodal models process charts, microscopy images, and experimental records.
    3. Agent orchestration layer: Handles task planning, tool registration, state management, retries, and human confirmation.
    4. Domain application layer: Encapsulates workflows for scenarios such as biomedicine, drug discovery, and materials computation.
    5. Governance layer: Covers data classification and tiering, permissions, auditing, evaluation, cost, and compliance.

    This layered approach avoids compressing the entire research process into a single prompt and makes it easier to replace models, tools, and compute resources.

    3. Key Challenges for LLM Providers Building AI4S Capabilities

    1. Scientific Data Barriers and High Compliance Costs

    Scientific data is scattered across laboratories, instruments, paper supplements, and internal databases. Formats include tables, sequences, images, spectra, and experimental records, and metadata is often missing. Biomedical data also involves privacy, ethics review, and cross-border compliance. For LLMs to use this data reliably, systems must establish data catalogs, version management, de-identification, least-privilege access, and auditing mechanisms. Otherwise, even if an agent can call tools, it will be difficult to reproduce results because the data cannot be traced.

    2. Insufficient Domain Knowledge and Evaluation Systems

    General evaluations cannot determine whether scientific conclusions are correct. LLMs may generate plausible hypotheses without evidence or hallucinate in tasks such as gene annotation and molecular property prediction. Deployment requires domain evaluation sets, expert blind review, citation traceability, structured outputs, and regression testing. High-risk conclusions should have confidence grading and human confirmation; model outputs should not be used directly as experimental evidence.

    3. Complex Toolchains and Compute Orchestration

    AI4S tasks often run for long periods, have highly variable resource requirements, and involve containerized tools, job queues, checkpoints, and resumable runs. Agents need to know when to call which tool, how to pass intermediate results, and how to retry after failures. The pseudocode below illustrates an auditable scientific agent orchestration flow:

    1. function run_science_agent(task, data_uri, budget):
    2. plan = model.plan(task, tools=registry.list())
    3. for step in plan.steps:
    4. check_permission(step, data_uri)
    5. result = execute_tool(step, data_uri)
    6. write_trace(step, result, cost=result.cost)
    7. if step.needs_expert_review:
    8. wait_for_review(result)
    9. if cost_exceeded(budget):
    10. raise BudgetExceeded
    11. return aggregate_report(plan, trace)

    The point of this pseudocode is not a specific interface. It is that permission checks, tool execution, trace logging, expert review, and budget control must be first-class citizens.

    4. Insufficient Agent Reliability and Observability

    Multi-step tool calls amplify errors: an upstream annotation error can propagate to downstream gene ranking, and a single tool timeout can cause inconsistent state. Systems need state machines, idempotent retries, sandboxed execution, least privilege, call trace replay, and human interrupt points. Without observability, researchers cannot determine whether a result came from model reasoning or tool computation.

    5. Difficulties in Long Context and Knowledge Injection

    Scientific literature is long, formula-heavy, and table-dense. Stuffing it directly into context is both expensive and prone to omissions. A more practical approach is layered retrieval: first locate sections and figures, then extract structured evidence, and finally have the model generate conclusions based on the evidence. Key conclusions should retain citation sources and computation logs.

    6. Cost, Latency, and Scaling Pressure

    Scientific tasks may include large amounts of repeated computation and long-tail queries. Costs can be reduced through model routing, caching, batch processing, asynchronous tasks, and small-model distillation. Strong models can be reserved for high-value tasks, while lightweight models can handle format conversion, summarization, and similar tasks. Cost dashboards and SLAs should also be established.

    7. Complex Ecosystem Collaboration and Attribution

    AI4S deployment involves research institutions, laboratories, platform providers, and domain tool providers. Data ownership, authorship, private deployment, joint experiments, and security responsibilities need to be agreed upon in advance. Platforms should provide standard tool registration, data permissions, and portable interfaces to avoid creating new lock-in.

    4. Deployment Recommendations: Start with Verifiable Scenarios

    It is advisable to prioritize scenarios where data is available, validation cycles are short, and experts can evaluate results, such as literature evidence extraction, single-cell analysis assistance, molecular property screening, and experimental report generation. Before launch, establish offline evaluation sets and expert review processes. After launch, monitor tool success rates, manual rework rates, per-task cost, and reproducibility rate. Organizationally, domain scientists, algorithm engineers, platform engineers, and compliance staff should participate together.

    Overall, the difficulty of building AI4S with LLMs lies not in single-point model capability, but in the engineering closed loop formed by data governance, domain evaluation, tool orchestration, agent reliability, and ecosystem governance. Only by placing LLMs into reproducible, auditable, and scalable scientific workflows can AI4S move from individual cases to scaled productivity.