AI for Science: A Practical Path from Document Parsing to Closed-Loop Discovery

    This article breaks down why most AI for Science deployments in research settings still stop at "reading and understanding" rather than discovery. It introduces a four-level capability model, from document and layout understanding to domain semantics, hypothesis reasoning, and closed-loop experimentation, and explains why chemical reaction parsing is technically difficult. It also covers building research knowledge bases with retrieval-augmented generation, designing auditable agent workflows, and setting up three-tier evaluation. Readers will find engineering recommendations, sample Python code, and guidance on common pitfalls when moving AI from literature review toward materials and drug discovery.

    1. The Current State: LLMs in Research Still Stop at “Reading and Understanding”

    Across the past two years, a number of vendors serving research and industrial R&D have begun integrating general-purpose large language models into internal workflows. The publicly visible deployments mostly fall into two categories: understanding and structured extraction from literature in fields such as chemistry and materials, and parsing and summarizing figures, formulas, and reaction schemes in papers. These applications do improve how efficiently researchers obtain information. From a capability standpoint, however, they address problems on the input side rather than the discovery side.

    One notable signal is that public benchmarks now exist specifically to measure how well multimodal models recognize and parse chemical reaction equations. These benchmarks focus on identifying the boundaries between reactants and products, attributing conditions such as temperature, solvent, catalyst, and time, preserving stereochemistry and charge annotations, and reconstructing images or layouts into computable representations such as SMILES strings with a given accuracy. The gap between open-source and closed-source models on these leaderboards is discussed repeatedly, but the more important conclusion is that leading on a relatively narrow task does not mean a model can propose hypotheses, design experiments, and run closed-loop validation.

    Discussing the practical path for AI for Science therefore requires a clear separation of capability levels.

    2. Capability Levels: A Four-Step Ladder from Document Parsing to Scientific Discovery

    Model applications in research can be abstracted into four layers. The higher you go, the more the system depends on engineering and the less it depends on model metrics alone.

    1. Document and layout understanding: PDF and scanned document parsing, section segmentation, formula and table reconstruction, and semantic recognition of figures. The output is a structured intermediate representation.
    2. Domain semantics: aligning natural language and structured representations to a domain ontology, for example mapping “reaction conditions” to a controlled vocabulary and compounds to canonical identifiers, while performing entity disambiguation and normalization.
    3. Reasoning and hypothesis: retrieval-augmented reasoning over knowledge graphs and literature evidence to generate testable hypotheses, priority rankings, and draft experiment designs.
    4. Closed-loop execution: integration with electronic lab records, instrument data, and automated experiment platforms to form a loop of hypothesis, experiment, data return, and model update.

    Most public cases remain at layers one and two. That is the current engineering reality, not a capability ceiling. Treating layer-one metrics as evidence for layer four is the most common misjudgment in evaluation.

    3. Why Chemical Reaction Parsing Is Hard: A Reusable Technical Breakdown

    Take reaction parsing as an example. The difficulty is not “describing an image,” but the strictness of the symbolic system.

    • Layout coupling: reaction schemes often span lines and carry annotations above and below arrows and parentheses, so plain text extraction loses condition attribution.
    • Semantic ambiguity: when several conditions sit under the same arrow, determining which is the solvent and which is the catalyst requires domain priors.
    • Representation conversion: recognition results must land on canonical strings, and any deviation in an atom or bond can make downstream computation completely invalid.
    • Evaluation criteria: character-level accuracy and chemical-equivalence accuracy can differ enormously, and the latter requires equivalence judgment on canonical representations.

    A simplified skeleton for evaluation and post-processing is shown below. The emphasis is on normalizing before comparing, rather than doing direct string matching:

    1. import re
    2. def normalize_reaction(text: str) -> str:
    3. # 1) Normalize whitespace and common full-width symbols
    4. text = re.sub(r"\s+", " ", text).strip()
    5. trans = {"+": "+", "-": "-", "→": ">>", "=": "="}
    6. for k, v in trans.items():
    7. text = text.replace(k, v)
    8. # 2) Extract conditions (illustrative: annotations above/below the arrow)
    9. cond = re.findall(r"\(([^)]*)\)", text)
    10. # 3) Main reaction body
    11. body = re.sub(r"\([^)]*\)", "", text)
    12. return {"reaction": body.strip(), "conditions": cond}
    13. def chemical_equivalent(pred: str, gold: str) -> bool:
    14. # In production, call domain normalization before equivalence judgment; this only illustrates the flow
    15. return normalize_reaction(pred)["reaction"] == normalize_reaction(gold)["reaction"]

    Engineering recommendation: decouple parsing from judgment. The parsing service should output structured results with confidence scores only, while the judgment service handles normalization and equivalence comparison. Each should have its own unit tests and regression sets.

    4. From Reading to Doing: Building Research Knowledge Bases and Retrieval Augmentation

    To move models from “reading papers” to “supporting discovery,” the key is turning unstructured literature into knowledge assets that are searchable, reason-ready, and traceable.

    • Collection and parsing: unify document ingestion while preserving layout coordinates and figure regions so evidence locations can be traced back.
    • Structuring and alignment: perform normalization after entity recognition and map to controlled vocabularies and canonical identifiers. Keep candidate sets and confidence scores for uncertain items instead of forcing a fixed answer.
    • Evidence graph: nodes are entities and experimental facts, edges are relations such as condition, product, and yield, and every edge carries its source snippet and version.
    • Retrieval-augmented generation: answers must carry cited snippets. Explicitly refusing to answer when no evidence exists is more valuable than fluent but unverifiable generation.
    • Quality regression: build a gold-standard set annotated by domain experts, with separate thresholds for entity recognition, relation extraction, and citation accuracy.

    On the infrastructure side, a combination of general-purpose capabilities is usually enough: object storage for raw documents and parsing artifacts, a message queue for smoothing and retrying parsing tasks, a container platform for parsing and inference services, and logging plus monitoring and alerting for tracing and quality dashboards. Baidu AI Cloud offers this same category of general-purpose capabilities for building such research data platforms; specific choices should be evaluated against data scale and compliance requirements.

    5. Agent Workflows: Making Hypothesis Generation an Auditable Pipeline

    The core of layer-four capability is not “better conversation” but controllable process orchestration. A minimal auditable loop typically includes:

    1. Problem definition: specify the target property (solubility, stability, selectivity, and so on) and constraints.
    2. Evidence retrieval: recall relevant experimental facts from the knowledge base and report evidence coverage.
    3. Hypothesis generation: produce candidate options with testable criteria and annotate sources of uncertainty.
    4. Experiment design: specify variables, controls, and a sampling plan, and connect to the electronic lab record system.
    5. Data return: structure experimental results into the knowledge base and trigger model or rule updates.
    6. Audit trail: make the input, output, version, and human intervention of every step fully replayable.

    Illustrative orchestration pseudocode:

    1. def discovery_loop(target, constraints, kb, max_rounds=5):
    2. history = []
    3. for r in range(max_rounds):
    4. evidence = kb.retrieve(target, top_k=20)
    5. if evidence.coverage < 0.6:
    6. return {"status": "insufficient_evidence", "round": r}
    7. hyps = generate_hypotheses(target, constraints, evidence)
    8. plan = design_experiments(hyps, constraints)
    9. result = run_or_dispatch(plan) # human or automated experiment
    10. kb.ingest(result) # structured data return
    11. history.append({"round": r, "hyps": hyps, "plan": plan})
    12. if result.hit:
    13. return {"status": "success", "history": history}
    14. return {"status": "exhausted", "history": history}

    The key point is to terminate proactively when evidence coverage is insufficient rather than forcing generation, and to keep replayable records for every round so research teams can review them.

    6. Evaluation: Do Not Replace Scenario Validation with a Single Leaderboard

    A three-tier evaluation is recommended:

    • Component tier: parsing accuracy (distinguishing character-level from chemical equivalence), entity normalization accuracy, and citation accuracy.
    • Process tier: proportion of testable hypotheses, proportion of executable experiment designs, evidence coverage, and average rounds to convergence.
    • Business tier: number of valid candidates per R&D cycle, expert adoption rate, and reduction in repeated experiments.

    A single public leaderboard reflects only part of the component tier, and using it to infer business returns causes systematic overestimation. A more reliable approach is to run parallel comparisons on a small set of real research topics first, then decide whether to expand investment.

    7. Common Pitfalls and Practical Recommendations

    • Pitfall one: equating document parsing capability with discovery capability. Recommendation: define clear phase goals for the project, start with efficiency tools, and only then discuss closed loops.
    • Pitfall two: ignoring representation standardization. Recommendation: fix canonical representations and versioning at the data entry point, which lowers later cleanup costs by an order of magnitude.
    • Pitfall three: pursuing full automation. Recommendation: keep human review checkpoints, especially for experiment design and safety assessment.
    • Pitfall four: underestimating data governance. Recommendation: build the gold-standard set and evidence traceability mechanism first, then scale up model size.

    Overall assessment: in research settings today, the value of large language models lies mainly in shortening the path of literature review and information integration. To genuinely participate in materials and drug discovery, four engineering pieces must be completed: domain semantics, evidence graphs, experimental closed loops, and evaluation systems. Breaking the roadmap into verifiable small steps delivers more certain R&D efficiency gains than chasing a single-point metric.