From Coding to Science: How Foundation Models Are Entering AI for Science Through Engineering

    Foundation models have proven their value in coding—code generation, bug localization, test completion, and tool calling all benefit from clear feedback loops. The next frontier is scientific research. This article examines why AI for Science is a natural extension, how foundation models can enter research workflows as an "assistance layer" rather than a closed-loop system, what a controllable engineering architecture looks like, and the risks and governance requirements that must be addressed before AI can become part of everyday scientific work.

    Foundation models have repeatedly demonstrated their value in programming: code generation, bug localization, test completion, and tool calling all form clear feedback loops while directly improving developer productivity. As coding agents become a key showcase for model capabilities and commercial adoption, attention is shifting toward a more ambitious direction—scientific research. Public reporting indicates that the head of a foundation model team recently noted at an industry summit that, beyond coding, research domains such as biology and chemistry place higher demands on model capabilities and could open new application spaces for pharmaceuticals and materials science. This is not an isolated observation; it signals foundation models moving from “general-purpose conversation” toward “professional workflows.”

    However, research and coding differ significantly. Coding tasks typically have well-defined inputs and outputs, executable test cases, and short verification cycles. Research tasks, by contrast, span literature review, hypothesis generation, experiment design, data analysis, tool calling, and result interpretation. The chain is longer, uncertainty is higher, data is more sensitive, and requirements for reproducibility and compliance are stricter. For this reason, foundation models are unlikely to replace scientists or participate in drug development decisions from day one. The more realistic entry point is the highly repetitive, low-risk, strongly assistive parts of the research process.

    Why the Trend from Coding Gains to Research Gains Holds

    The success of coding agents shows that once a general-purpose model is connected to a professional toolchain, it upgrades from a “text generator” to a “task execution assistant.” Research shares characteristics that can be enhanced by toolchains: researchers need to read large volumes of literature, write analysis scripts, invoke specialized software, organize experimental results, and screen candidate genes or material parameters. A substantial portion of these tasks can be handled by models following an assistive pipeline of “understand the problem—generate code—call tools—extract evidence—summarize results.”

    More importantly, research tasks have high value density. A single effective literature extraction, code generation, or data analysis step can significantly cut the time researchers spend on mechanical work, while fields like drug discovery, materials design, and bioinformatics contain many long-tail tasks requiring interdisciplinary knowledge and tool coordination. For foundation model vendors, science is both a proving ground for technical capability and a springboard from general-purpose APIs to industry-specific workflows.

    But a valid trend does not mean easy adoption. Research tasks demand that models not merely “answer questions” but “complete verifiable steps under constraints.” Models must understand research questions, generate runnable analysis code, call specialized tools correctly, detect anomalies in data, and organize results into traceable chains of evidence. A single hallucination or permission violation at any step can render the output scientifically worthless.

    Current Entry Approach: Integrating with Existing Research Platforms as an “Assistance Layer”

    Based on public information, the primary way foundation models are entering research is by partnering with platform companies that already possess professional tools and industry customers—plugging general models into existing workflows rather than building a complete research loop from scratch. The advantage of this path is that research platforms have already integrated domain tools, computing environments, and data interfaces; the model only needs to handle understanding, orchestration, generation, and interpretation to quickly engage with real tasks.

    This “assistance layer” positioning has three defining traits. First, the model does not directly own research data; it runs within platform-authorized computing environments, reducing data compliance risk. Second, the model does not replace specialized tools; it invokes them through a tool gateway, mitigating the problem of models fabricating tool capabilities. Third, model outputs must be reviewed by researchers, creating a human-in-the-loop acceptance mechanism. Compared with directly participating in scientific discovery or drug development decisions, these tasks are closer to everyday assistive work—but they are precisely where the main friction in research productivity lies.

    Breaking down the capabilities involved, current collaborations concentrate on four task types:

    Task Type Model Responsibility Human-Machine Boundary Risk Control
    Research question understanding Decompose natural-language questions into analysis steps Researchers confirm goals and constraints Retain question clarification records
    Analysis code writing Generate data cleaning, statistical analysis, and visualization code Code must run in a sandbox Restrict data access and external network
    Specialized tool invocation Call domain tools step by step and read results Tool permissions controlled by the platform Log call parameters and returned results
    Literature information extraction Extract methods, parameters, and conclusions from papers Researchers spot-check Retain source locations and citations

    These tasks may look “assistive,” but they cover a large share of repetitive labor in research workflows. The model’s value lies not in replacing scientific judgment, but in freeing researchers from format conversion, script debugging, tool switching, and literature organization so they can focus on hypotheses, experiment design, and result interpretation.

    Case Study: Generalizing Efficiency Gains Requires Caution

    In one publicly disclosed case, a team used gene expression data collected at a single developmental time point to infer possible cell development paths and screen candidate genes. The system took roughly 90 minutes to produce a speculative cell development map and shortlist 100 candidate genes; a similar task done manually typically takes 4 to 8 hours. This shows that combining models with research platforms can indeed compress execution time for specific analysis tasks.

    However, this time comparison comes from a single disclosed case and does not prove that similar efficiency gains will hold across different research tasks. Task complexity, data quality, toolchain maturity, and researcher experience all affect the outcome. Therefore, when evaluating AI for Science capabilities, one should not rely on single-point demos. Instead, evaluation suites spanning multiple tasks and datasets should be established, with metrics that distinguish “generation speed,” “result reproducibility,” “evidence traceability,” and “researcher adoption rate.”

    Engineering Architecture: Placing Models Inside Controllable Research Workflows

    For general models to reliably serve research scenarios, engineering design should encapsulate model capabilities in a layered architecture rather than exposing the model directly to all data and tools. A reference design includes: interaction layer, orchestration layer, model layer, tool layer, data layer, and observability and security layer.

    The interaction layer receives research questions, displays steps, and collects human feedback. The orchestration layer decomposes questions into executable plans, deciding when to generate code, when to call tools, and when to request human confirmation. The model layer handles understanding, generation, extraction, and summarization. The tool layer exposes domain tools through a unified gateway and enforces permission checks. The data layer manages data citation, versioning, and access control. The observability and security layer logs every call, code execution result, and model output to support auditing and reproducibility.

    Illustrative pseudocode follows—expressing the flow only, not specific interfaces:

    1. function run_research_task(question, data_ref, constraints):
    2. plan = model.plan(question, constraints)
    3. evidence = []
    4. for step in plan.steps:
    5. if step.type == "code":
    6. code = model.generate_code(step, schema=data_ref.schema)
    7. result = sandbox.execute(code, data_ref, limits=constraints)
    8. else if step.type == "tool":
    9. result = tool_gateway.call(step.tool, step.args, permissions=constraints)
    10. evidence.append(model.extract_evidence(result))
    11. if step.requires_human_check:
    12. evidence.append(human_review(result))
    13. return model.synthesize(evidence, cite_sources=true)

    On the deployment and operations side, general-purpose offerings such as Baidu AI Cloud’s object storage, container platform, logging service, and monitoring and alerting can respectively handle research data storage, task runtime environments, audit records, and observability. Such general infrastructure does not replace the specialized tools of research platforms; it provides the hosting environment for model invocations, sandbox execution, and result tracking. For research teams, the key is not stacking capabilities but making every execution step recordable, replayable, and auditable.

    Path Selection: New Entrants Should Start with Assistance Before Attempting Closed Loops

    Some overseas teams have already launched life-science workbenches and vertical models, attempting to participate in closed-loop drug development projects; others are strengthening domain-specific capabilities across new model generations. By comparison, foundation model teams newly entering research are better suited to build an “assistance layer” rather than a “closed-loop layer.” The reason: a closed loop means the model participates in experiment design, result judgment, and even development decisions, which demands far more from data, tools, evaluation, and compliance. An assistance layer can start with low-risk tasks like literature extraction, code generation, and tool calling, gradually accumulating domain evaluation and workflow experience.

    For domestic Chinese foundation models, systematic positioning in research scenarios came relatively late—but this also means they can absorb engineering lessons from coding agents: first improve task completion rates through tool calling, then constrain hallucinations with evaluation suites, then ensure traceability with audit logs, and only then consider deeper research loops. Partnerships with research platform companies are just the opening chapter; the real competitive question is whether general model capabilities can be converted into stable, reproducible research assistance that researchers actually trust.

    Risks and Governance: The Baseline Requirements for Research Scenarios

    AI for Science faces at least five categories of risk. First, hallucination: models may generate plausible but incorrect analysis steps or literature conclusions, which must be mitigated through source location, tool return values, and human spot-checking. Second, data privacy and compliance: research data may involve patient information, unpublished experimental results, or trade secrets; models should not directly hold data but should access it with least privilege in controlled environments. Third, tool permission violations: when models call specialized tools, permission gateways and sandbox restrictions are essential to prevent dangerous commands or unauthorized resource access. Fourth, insufficient reproducibility: research results require recorded data versions, code, parameters, and tool versions, or they cannot be reproduced. Fifth, cost and lack of evaluation: long task chains amplify model invocation costs, and without task-level evaluation it is hard to judge the return on investment.

    For governance, it is advisable to start with high-repetition, low-risk tasks such as literature extraction, analysis script drafts, tool call orchestration, and result formatting; build domain evaluation suites covering correctness, reproducibility, citation completeness, and human adoption rates; adopt human-in-the-loop acceptance with mandatory researcher confirmation on critical steps; retain complete audit logs of model inputs, tool calls, code execution, and human edits; and enforce least-privilege and data masking policies for data access. Only once these engineering constraints are in place can AI for Science move from demos into everyday research workflows.

    Conclusion

    Foundation models pushing into AI for Science is, at its core, a shift from “demonstrating general capabilities” to “enhancing professional workflows.” Coding has already proven that connecting models to toolchains can fundamentally change how tasks get done. Research goes further, requiring models to understand long task chains, respect data boundaries, accept human review, and support result traceability. For foundation model teams newly entering this field, integrating with existing research platforms and taking on assistive tasks is the more prudent path. Whether they can eventually move toward deeper research loops depends on the maturity of evaluation systems, tool governance, reproducibility engineering, and human-machine collaboration mechanisms. Science is not a series of one-off Q&A exchanges but a verifiable workflow—and the competition in AI for Science will ultimately come down to engineering rigor and trustworthiness.