Colab 01: Literature Research#
This OpenRath v2.0.0 example turns a fixed paper ledger into a sourced Chinese literature review. It demonstrates checkpoint recovery, constrained LLM synthesis, an evaluation gate, and artifact registration in one runnable Notebook.
Open in Google Colab · View the workflow source · Read the reference report
Input and Output#
Input |
Purpose |
|---|---|
|
Defines the Chinese research question and evidence scope. |
|
Provides a fixed ledger of six papers, URLs, evidence summaries, and tags. |
|
Receives the final sourced Markdown report. |
The bundled request studies planning, tool use, and reliability in LLM agents. The evidence boundary is explicit: this tutorial synthesizes the supplied metadata and abstract-level evidence, while claims that need full-text review remain identified as such.
Workflow#
Step |
Effect class |
What happens |
|---|---|---|
|
|
Loads the paper ledger from JSON. |
|
|
Selects papers whose tags match the research scope. |
|
|
Requests validated JSON from the configured DeepSeek client and rejects unknown paper IDs. |
|
|
Produces a Markdown report with linked source IDs. |
|
|
Runs the source-grounding evaluation gate, publishes the file, and registers its artifact digest. |
The model may organize and phrase the synthesis, but it cannot add sources outside the supplied paper ledger. Research-gap text is also kept within the evidence scope defined by the example.
Durable Recovery#
The Notebook deliberately stops after two steps, closes its SQLite run store, and resumes from persisted checkpoints through a new runtime:
partial = runtime.work_once(
worker_id="literature-worker-before-restart",
max_steps=2,
lease_seconds=0.25,
)
store.close()
resumed_store = SQLiteRunStore(store_path)
requeued = resumed_store.requeue_expired_leases(now=future)
resumed_runtime = LocalRuntime(resumed_store)
resumed_runtime.register(workflow, revision_id=revision_id)
completed = resumed_runtime.work_once(
worker_id="literature-worker-after-restart",
now=future,
)
The second runtime recovers the state and next nodes from SQLite rather than reconstructing progress from Notebook variables.
Run and Verify#
Open the Notebook in Google Colab.
Choose Runtime → Run all.
Enter the DeepSeek API key in the masked prompt.
Wait for the report preview and download link.
The run succeeds only after all of these source checks pass:
final status is
SUCCEEDED;exactly five checkpoints are present;
the source-grounding regression gate returns
PASS;the report is registered under an
artifact://local/URI;the API key is absent from durable state and the report.
The Notebook writes each run into a new ignored .workspace/ directory, while
the final report is copied to output/literature-review.md.
Adapt It#
Replace request.json and papers.json, then keep the same workflow boundaries
for loading, screening, synthesis, evaluation, and publication. If your new
inputs use different fields, update both the selection rules and the
synthesis validator before running the workflow.