封面内容一 · 原理二 · 框架与智能体三 · 用智能体编程四 · 科研五 · 报告、教学与其他工作六 · 人与 AI 共同进化选做练习

与 AI 智能体 一起做科研

从工具使用到可复现的研究工作流

王一 · 香港科技大学

Doing Research with AI Agents

From tools to reproducible research workflows

Yi Wang · HKUST

内容

一 · 原理二 · 框架与智能体三 · 用智能体编程四 · 科研五 · 报告、教学与其他工作六 · 人与 AI 共同进化

结合各自的研究与教学,交流哪些做法值得尝试。

Contents

I · PrinciplesII · Harnesses and agentsIII · Coding with agentsIV · ResearchV · Reports, teaching and other workVI · Humans and AI evolving together

Discuss approaches worth trying in our own research and teaching.

一 · 原理

模型怎样工作,会影响我们怎样使用它。

1.大语言模型2.输入输出格式3.记忆4.推理与思考强度5.智能体与工具循环

I · Principles

How the model works
shapes how we use it.

1.Language models2.Input and output formats3.Memory4.Reasoning and thinking effort5.Agents and the tool loop

一 · 原理

1. 大语言模型

语言模型将文字分成 token,经神经网络计算,逐步生成后续内容。

神经网络

多层带参数的加权运算与非线性变换处理输入。

预训练:从数据学习

给出前文,预测后续 token。用大量文本、代码等反复训练,降低预测误差。

后训练:继续训练模型

在预训练模型上继续训练:用示范回答做监督微调,
或利用偏好与奖励优化指令遵循、推理和工具使用。

实际使用时,通常保持模型参数不变,根据当前输入生成输出。

I · Principles

1. Language models

A language model turns text into tokens and uses a neural network to generate continuations.

Neural network

Layers of weighted operations and nonlinear transformations process inputs.

Pretraining:
learn from data

Predict the next token from preceding text.
Train on large text and code datasets to reduce prediction error.

Post-training:
further learning

Continue training a pretrained model: supervised fine-tuning uses example answers; preference and reward methods improve behavior and skills.

During use, parameters usually stay fixed while the model generates from the current input.

Post-training · Hugging Face

一 · 原理 / 1. 大语言模型

注意力机制:怎样从上下文取信息

每个 token 的表示经过训练得到的变换,产生 QQQ(Query)、KKK(Key)、VVV(Value)向量。
用 QQQ 与各个 KKK 匹配,得到权重,再按权重混合 VVV 中的信息。

“望远镜对准木星,拍下了它……”

QQQ · 查询“它”指什么?
KKK · 可匹配的线索
匹配权重
VVV · 携带的信息
K1K_1K1​ · 望远镜
0.1
V1V_1V1​ · 望远镜
K2K_2K2​ · 木星
0.8
V2V_2V2​ · 木星
K3K_3K3​ · 它
0.1
V3V_3V3​ · 它
按权重混合 VVV0.1V1+0.8V2+0.1V30.1V_1+0.8V_2+0.1V_30.1V1​+0.8V2​+0.1V3​得到当前位置的新表示

一个注意力头的示意:仅画三个位置;权重为示意值。

为什么上下文昂贵?以标准全注意力为例

首次处理输入:大量位置之间要匹配

标准全注意力中,nnn 个 token 的匹配计算量约随 n2n^2n2 增长。
输入长度翻倍,这部分计算量约为四倍。

继续生成:保存并读取历史 KKK、VVV

KV 缓存复用已有计算;每个新 token 仍需访问历史。
保存的状态和每步注意力计算量约随 nnn 增长。

I · Principles / 1. Language models

Attention: retrieving information from context

Learned transformations turn each token representation into QQQ (Query), KKK (Key) and VVV (Value).
Match QQQ against the keys KKK, then use those weights to mix the information in VVV.

“The telescope pointed at Jupiter and photographed it…”

QQQ · QueryWhat does “it”
refer to?
KKK · Matching cues
Weights
VVV · Information
K1K_1K1​ · telescope
0.1
V1V_1V1​ · telescope
K2K_2K2​ · Jupiter
0.8
V2V_2V2​ · Jupiter
K3K_3K3​ · it
0.1
V3V_3V3​ · it
Mix VVV using the weights0.1V1+0.8V2+0.1V30.1V_1+0.8V_2+0.1V_30.1V1​+0.8V2​+0.1V3​A new representation
for this position

One attention head, showing three positions. Weights are illustrative.

Why is long context expensive?Standard full attention

First pass: match many pairs of positions

With full attention, matching nnn tokens scales roughly as n2n^2n2.
Twice the input means about four times this computation.

Generation: store and read earlier KKK and VVV

A KV cache reuses work; each new token still reads history.
Stored state and attention work per step grow roughly as nnn.

Attention Is All You Need · §3.2 / §4KV cache · Hugging Face

一 · 原理

2. 输入输出格式

输入框收集 user 消息,上方显示 assistant 回复。下一页展开送给模型的内容。

I · Principles

2. Input and output formats

The input box collects the user message; replies appear above. The next slide reveals what is sent to the model.

Talkie1930 · source

一 · 原理 / 2. 输入输出格式

按下发送后,模型收到什么?

<|user|>
Write a brief letter declining a dinner invitation.
<|end|>
<|assistant|>

user

标记用户刚刚写下的任务。

assistant

告诉模型:接下来从助手的位置继续写。

这些是 Talkie 的真实角色标记。原聊天脚本没有插入 system 消息。

I · Principles / 2. Input and output formats

What reaches the model when you press Send?

<|user|>
Write a brief letter declining a dinner invitation.
<|end|>
<|assistant|>

user

Marks the task the user just entered.

assistant

Tells the model where to continue as the assistant.

These are Talkie’s actual role markers. The original chat scripts add no system message.

Talkie1930 · source

一 · 原理 / 2. 输入输出格式

追问时,前面的对话也一起送进去

<|user|>Write a brief letter declining a dinner invitation.<|end|>
<|assistant|>[第一轮回复 / first reply]<|end|>
<|user|>Make it shorter.<|end|>
<|assistant|>

“it” 指什么?

因为输入里有第一轮问题和回复,模型可以接着修改。

历史保存在哪里?

聊天程序保留这串 token,下一轮在后面接上新问题。

New chat 清空这段历史,模型就收不到刚才那封信。

I · Principles / 2. Input and output formats

A follow-up includes the preceding conversation

<|user|>Write a brief letter declining a dinner invitation.<|end|>
<|assistant|>[first reply]<|end|>
<|user|>Make it shorter.<|end|>
<|assistant|>

What does “it”
refer to?

The first question and reply are in the input, so the model can revise the letter.

Where is the history?

The chat program retains these tokens and appends the next question.

New chat clears this history; the earlier letter is no longer in the input.

Talkie1930 · source

一 · 原理 / 2. 输入输出格式

缓存:复用重复输入的计算

历史对话会重复出现在后续输入中。前缀缓存复用相同部分的计算。

普通输入

新增加或没有命中缓存的内容,需要处理。

缓存输入

相同前缀命中缓存,复用已有计算,
通常按更低的输入价格计费。

模型输出

这一轮新生成的回复,按输出计费。

写信例子:使用支持缓存的服务

第2轮:user [写信] → assistant [信件]
       → user [简短些]

第3轮:[完整保留第2轮输入]
       → assistant [简短版] → user [亲切些]

相同前缀包括 assistant 之前写出的信件。

缓存减少重复计算;历史内容仍然占用上下文。

I · Principles / 2. Input and output formats

Caching: reuse computation for repeated input

Conversation history repeats across requests. Prefix caching reuses its computation.

Regular input

New input, or input without a cache hit,
needs processing.

Cached input

A matching prefix reuses earlier computation, usually at a lower input price.

Model output

The new reply is billed as output.

The letter example with a caching service

Turn 2: user [write] → assistant [letter]
        → user [shorten]

Turn 3: [entire turn-2 input]
        → assistant [shorter] → user [warmer]

The repeated prefix includes an assistant reply.

Caching saves computation. The history still occupies context.

Prompt cachingAPI pricing

一 · 原理 / 2. 输入输出格式

再加一层:system 提示词

<|system|>
You are a courteous letter-writing adviser. Keep replies brief.
<|end|>
<|user|>Write a brief letter declining a dinner invitation.<|end|>
<|assistant|>

产品预先设定

希望助手怎样工作,例如回答风格、工作规则和工具使用方法。

用户提出本次任务

仍然是“写一封婉拒晚宴的信”。

这是给原程序增加 system 的示意例子。有些接口还单列 developer,承载应用开发者的指令。

I · Principles / 2. Input and output formats

One more layer: a system prompt

<|system|>
You are a courteous letter-writing adviser. Keep replies brief.
<|end|>
<|user|>Write a brief letter declining a dinner invitation.<|end|>
<|assistant|>

Set by the application

How the assistant should work: style, rules and tool-use instructions.

Asked by the user

The immediate task is still to write a letter declining dinner.

An illustrative extension to the original program. Some APIs also use a developer role for application instructions.

Talkie1930 · sourceChat Completions

一 · 原理 / 2. 输入输出格式

System 提示词实例:产品怎样设定工作习惯

I · Principles / 2. Input and output formats

System prompt example: how a product sets working habits

Community prompt collectionCodex prompt source

一 · 原理 / 2. 输入输出格式

工具消息实例:计算结果怎样回到对话

工具调用让模型使用外部程序;工具消息把程序的实际输出带回上下文。

user

请用 Python 算 π2exp⁡ ⁣(−98)\sqrt{\frac{\pi}{2}}\exp\!\left(-\frac{9}{8}\right)2π​​exp(−89​)。

assistant → Python

from math import sqrt, pi, exp
print(sqrt(pi / 2) * exp(-9 / 8))

tool → 模型

0.40689152705457865

assistant → 用户

结果约为 0.4068915。

模型提出调用;程序运行 Python;结果作为下一步的输入。

示意,省略调用 ID 等接口字段。工具也可以返回错误,模型据此修改。

I · Principles / 2. Input and output formats

Tool-message example: return a calculation result

A tool call uses an external program. A tool message returns its actual output to the context.

user

Use Python to calculate π2exp⁡ ⁣(−98)\sqrt{\frac{\pi}{2}}\exp\!\left(-\frac{9}{8}\right)2π​​exp(−89​).

assistant → Python

from math import sqrt, pi, exp
print(sqrt(pi / 2) * exp(-9 / 8))

tool → model

0.40689152705457865

assistant → user

The result is approximately 0.4068915.

The model requests a call. The program runs Python and returns its output.

Illustrative example with call IDs omitted. A tool can also return an error for the model to act on.

Function calling

一 · 原理 / 2. 输入输出格式

工具调用与工具结果,逐渐有了专门格式

模型提出调用

调用仍由 assistant 产生,说明用哪个工具、传哪些参数。

OpenAI 接口的演变

早期 function_call / function,后来 tool_calls / tool;
Responses 使用独立调用项和结果项。

其他接口的做法

Claude 的 tool_use 在 assistant 中,tool_result 放在下一条 user 消息的内容块中。

共同点是保留来源:哪段是模型生成的,哪段是工具返回的。

I · Principles / 2. Input and output formats

Tool calls and results gain their own formats

The model
requests a call

The assistant specifies a tool and its arguments.

OpenAI formats evolved

function_call / function, then tool_calls / tool.
Responses uses separate call and result items.

Other APIs
use other forms

Claude places tool_use in assistant content
and tool_result in the next user message.

All distinguish what the model generated from what a tool returned.

Chat CompletionsClaude tool useFunction calling

一 · 原理

3. 记忆

把需要长期保存的信息写进文件,工作时再读进上下文。

短期记忆:上下文

这一次生成时
模型直接使用的材料

← 读取到上下文

把进度写回文件 →

长期记忆:使用文件

跨对话保存
资料、约定与工作进度

I · Principles

3. Memory

Save durable information in files and read it into context when needed.

Short-term memory:
context

Material the model uses
for this generation

← Read into context

Save progress to files →

Long-term memory:
using files

Material, conventions and progress
kept across conversations

一 · 原理 / 3. 记忆

短期记忆:上下文

上下文是模型这一次生成能使用的输入材料。运行框架把前面讲的指令、
保留的对话、工具说明与工具结果组织在一起,供模型继续生成。

任务要求
对话记录
论文片段
代码与工具结果

像工作桌一样,短期记忆只容纳当前要用的材料;其余材料需要时再读入。

实例:给引力波图增加叠加显示

H1、L1 是两台探测器。现在要把它们的曲线画在同一张图上。

这次放到桌上的材料

绘图文件、H1/L1 数据字段、时间与振幅约定。

怎样交给智能体

给出文件路径,让它先定位绘图逻辑,再读有关代码和数据样例。

何时补充材料

若进一步修改滤波,再读取处理脚本和滤波参数。

文件经工具读取,返回的内容才进入当前上下文。

I · Principles / 3. Memory

Short-term memory: context

Context is the input available for this generation. The harness brings together instructions,
retained conversation, tool definitions and tool results for the model to continue.

Task
Conversation
Paper excerpts
Code and tool results

Like a working desk,
context holds material for the current task.
Read more into it when needed.

Example: overlay two GW signals

H1 and L1 are two detectors. Put their curves in the same plot.

Material for this task

Plotting code, H1/L1 fields and time/amplitude conventions.

Give it to the agent

Give paths. Ask it to read the plotting code and a data sample.

When to add more

Read processing code and settings if the task expands to filtering.

Reading a file returns its content through a tool, making it available in context.

Codex context

一 · 原理 / 3. 记忆

短期记忆的选择

200K+ 还是 1M token?按任务与预算选择。

聚焦当前任务

修改一个绘图函数:读有关代码、数据字段与约定。
减少无关内容的干扰;实际输入更少,通常也更省。

需要大范围对照时,扩大上下文

同时核查多章书稿,或分析跨模块依赖,
让需要相互比较的材料一起出现。

费用取决于实际输入量、缓存与计费档位;窗口上限大,不等于每次用满。

上下文耗尽怎么办?

压缩已有历史

把目标、约定、已完成工作和下一步
整理成更短的状态,留出继续工作的空间。
压缩可能省略细节,原始文件仍要保留。

搜索后按需载入

把大量材料留在文件中,需要时搜索相关片段。
OpenAI 的工具搜索也采用按需载入:
先找工具,再把所需工具说明放进上下文。

OpenAI 当前同时提供上下文压缩和工具搜索,两者可以配合使用。

I · Principles / 3. Memory

Choosing short-term memory

200K+ or 1M tokens? Choose for the task and budget.

Focus on the current task

For a plotting change, select code, fields and conventions.
Less irrelevant material means less distraction.
Fewer input tokens usually cost less.

Expand for broad comparisons

For a book-wide check or dependencies across modules,
keep the material that must be compared together.

Cost follows actual input, caching and pricing tiers. A large window need not be filled.

What happens when context fills up?

Compact the existing history

Carry goals, constraints, completed work and next steps
forward in a shorter state to make room.
Keep original files for details that compaction may omit.

Search and load on demand

Keep large collections in files; retrieve relevant excerpts.
OpenAI tool search similarly loads definitions on demand:
find the tool, then add its definition to context.

OpenAI currently supports both compaction and tool search; they can work together.

OpenAI · CompactionOpenAI · Tool searchAstra · 按需加载 / Load on demandContext & pricing

一 · 原理 / 3. 记忆

长期记忆:使用文件

长期记忆可以保存在文件里。文件被读取后,其中的文字作为工具结果进入上下文,
成为下一次生成的输入;项目约定也可以由运行框架自动载入。

磁盘上的 progress.md

已完成:H1 / L1 单独显示
数据:resources/data/gw150914.json
绘图:resources/gw_explorer.html
约定:保留原时间,不平移波形
下一步:增加叠加显示
检查:切换探测器后横轴范围一致

结束前,把已经完成的工作和约定写进文件。

你在新对话中提出任务

“先读 progress.md,再继续下一步。”

模型调用读取工具

工具返回左边这些文字;
运行框架把结果接入当前上下文。

模型据此继续工作

知道要增加叠加显示,并保留原始时间。
需要代码细节时,再读取绘图文件。

另一种入口:Codex 会自动载入适用的 AGENTS.md,将项目约定加入对话。

I · Principles / 3. Memory

Long-term memory: using files

Files can hold long-term memory. Reading returns their text as tool output into context,
making it input for the next generation. The harness can also load project instructions automatically.

progress.md on disk

Done: separate H1 / L1 views
Data: resources/data/gw150914.json
Plot: resources/gw_explorer.html
Convention: keep original timestamps
Next: add an overlay
Check: detector switch keeps x range

Save completed work and conventions before ending.

You start a new conversation

“Read progress.md, then continue with the next step.”

The model calls a reading tool

The tool returns the text shown on the left.
The harness adds that result to the current context.

The model continues from that input

Add the overlay and preserve original timestamps.
Read the plotting file when code details are needed.

Another route: Codex automatically loads applicable AGENTS.md instructions into the conversation.

Codex · AGENTS.md & contextTool results
王一的短篇科幻小说《深海的光》书页与小说集《在水一方》封面
来源:短篇科幻小说《深海的光》,王一,发表于小说集《在水一方》
Pages of Yi Wang’s science-fiction story Deep-Sea Light and the cover of its collection
Source: “Deep-Sea Light,” a short science-fiction story by Yi Wang, published in the collection《在水一方》.

一 · 原理 / 3. 记忆

分支到新聊天:保留起点,分开探索

Fork 从已有对话分出新聊天,保留起点处的历史;之后各自继续探索。

共同起点

论文、假设与已有推导

解析路线

继续推导,检查极限

数值路线

计算与作图,对照解析结果

分支到新聊天:对话分开

适合查资料、讨论另一种推导。
若沿用同一项目目录,文件仍然共享;
各聊天约定自己的输出位置。

另建工作树:文件改动分开

适合并行尝试不同代码实现。
Git 历史共享,各工作树有自己的文件副本;
完成后比较差异、选择并合入。

要精简上下文,可整理目标、约定与进度摘要,把摘要和必要文件交给全新聊天。

工作树的软件与依赖也需要准备。 执行环境 ↗

I · Principles / 3. Memory

Fork a chat: keep the starting point, explore separately

Fork creates a new chat from an existing conversation, retaining its history up to the starting point.

Shared starting point

Paper, assumptions and existing derivation

Analytic route

Continue the derivation; check limits

Numerical route

Calculate, plot and compare with the analytic result

Fork a chat: separate conversations

For literature searches or alternative derivations.
If chats use the same project directory, they share files.
Agree on separate output locations.

Create a worktree: separate file edits

Try different code implementations in parallel.
Shared Git history, separate file checkouts.
Compare changes, select and integrate them.

For a smaller context, give a fresh chat a summary of goals, conventions and progress, plus the necessary files.

A worktree also needs its software and dependencies. Execution environment ↗

Codex · ForkCodex · Worktrees

一 · 原理

4. 推理与思考强度

推理阶段可以先尝试、检查和修正,再生成给用户的最终回答。

边生成边回答

开头已经说“并不完全相同”,
后面又改口说“完全一样”。
同一条回答留下了矛盾的结论。

先思考,再回答

把检查和修正放在推理阶段,
再根据修正后的结论组织回答。

思考强度

控制投入推理的计算量,
让模型有更多机会尝试不同路线、
交叉检查并修正错误。

BRANES 和 BRAINS 的读音相同吗?

同一条回答中的三个片段

开头判断:读音非常相似,但并不完全相同。
表格中两个单词的音标相同。
后半段纠正:音标其实完全一样,读音完全相同。

I · Principles

4. Reasoning and thinking effort

A reasoning phase allows attempts, checks and revisions before the final answer is presented.

Answer while generating

The opening says “not identical”;
later, it changes to “exactly the same”.
Both conclusions remain in the answer.

Reason before answering

Check and revise during reasoning,
then write the answer from
the corrected conclusion.

Reasoning effort

Sets the reasoning compute budget:
more room to try, check and revise.

Do BRANES and BRAINS sound the same?

Three excerpts from the same response

Opening claim: similar but not identical pronunciation.
The two rows show identical phonetic transcriptions.
The response later corrects itself: the pronunciation is identical.
Google AI 概览 · 原截图 / Original screenshotReasoning

一 · 原理 / 4. 推理与思考强度

思考强度与工作方式

模型增加计算、人补充验证方法、智能体分工,可以配合使用。

模型:更仔细地检查

OpenAI 用同一代码审查模型,改变推理预算,检查已确认的错误。
思考 token:约 7,900 → 30,300;检出率:47% → 68%。

GPT-5.1-Codex;审查 Codex 生成的代码。测量的是检出率。

人:拓展验证方法

把科研经验写进任务:换一种推导、检查极限、用数值结果核对。
宇宙弦案例中,研究者要求探索其他方法,并用 Python 交叉验证。

人扩展检查的角度与依据,模型继续推导、计算和修正。

产品:合并工作选项

有些产品把主动分工也放进强度选择:
例如 ChatGPT Work 的 Ultra 结合最大推理投入与主动调用子智能体。

计算预算与分工策略是两项设置;界面可以将它们组合起来。

I · Principles / 4. Reasoning and thinking effort

Reasoning effort and ways of working

More model computation, human-directed checks and agent delegation can work together.

Model: closer checking

OpenAI varied one code reviewer’s reasoning budget to recover confirmed bugs.
Thinking tokens: about 7,900 → 30,300; recall: 47% → 68%.

GPT-5.1-Codex reviewing Codex-generated code. The measure is recall.

Human: broader checks

Specify another derivation, limiting cases or a numerical cross-check.
In the cosmic-string study, researchers requested other methods
and used Python for verification.

People choose the checks and evidence; the model derives, tests and revises.

Product: bundled options

Some products include proactive delegation in their effort selector.
ChatGPT Work’s Ultra combines maximum reasoning with proactive subagents.

Compute budget and delegation policy are distinct settings that a UI can combine.

OpenAI · Code review · Fig. 3Cosmic strings · §6.1Ultra & subagents

一 · 原理

5. 智能体与工具循环

智能体围绕目标反复使用模型和工具,根据结果决定继续、修改或结束。

模型决定下一步

结合目标与当前上下文,提出回答或工具调用。

运行框架执行并接回结果

连接模型和工具,
组织调用、返回结果与任务状态。

反馈进入下一轮

结果或错误回到上下文,模型据此调整下一步。

实例:两套工具核对一个积分

计算全实轴积分 ∫−∞∞e−ax2cos⁡(bx) dx\int_{-\infty}^{\infty}e^{-a x^2}\cos(bx)\,\mathrm{d}x∫−∞∞​e−ax2cos(bx)dx,a>0a>0a>0,bbb 为实数。

第一轮

SymPy 返回 πaexp⁡ ⁣(−b24a)\sqrt{\frac{\pi}{a}}\exp\!\left(-\frac{b^2}{4a}\right)aπ​​exp(−4ab2​)。

继续调用

用 Wolfram Language 核对,
再代入 a=2a=2a=2、b=3b=3b=3,得到约 0.4068915。

怎样结束

比较结果与假设,保存脚本和结论;有差异就继续查。

下一步取决于工具返回的结果。

I · Principles

5. Agents and the tool loop

An agent repeatedly uses a model and tools to pursue a goal, using results to continue, revise or finish.

The model chooses a step

Use the goal and current context
to answer or request a tool call.

The harness runs it

Connect model and tools;
manage calls, results and task state.

Feedback starts another turn

Returned results or errors
inform the model’s next decision.

Example: cross-check one integral

Integrate e−ax2cos⁡(bx)e^{-a x^2}\cos(bx)e−ax2cos(bx) over the real line, for a>0a>0a>0 and real bbb.

First result

SymPy returns πaexp⁡ ⁣(−b24a)\sqrt{\frac{\pi}{a}}\exp\!\left(-\frac{b^2}{4a}\right)aπ​​exp(−4ab2​).

Continue

Cross-check with Wolfram Language.
At a=2a=2a=2, b=3b=3b=3, the value is about 0.4068915.

Finish

Compare results and assumptions,
then save code and conclusions. Investigate discrepancies.

The next step depends on the tool result.

Function calling

一 · 原理 / 5. 智能体与工具循环

模型、运行框架和工具怎样分工

分清三层职责,才能知道该选模型、配置工具,还是检查运行环境。

层面一般职责放回刚才的积分例子
模型理解问题,推理,决定下一步。写出积分表达式,选择工具,解释差异。
运行框架组织上下文、调用、权限和反馈。把表达式交给工具,再把返回值送给模型。
工具与环境执行计算,读写文件,保存产物。Python / Mathematica 完成运算,文件系统保存脚本。

装了桌面客户端后,还要确认 Mathematica 装在哪里、MCP 连到哪里、结果保存在哪里。

I · Principles / 5. Agents and the tool loop

How the model, harness and tools divide the work

The distinction tells you whether to choose a model, configure a tool or inspect the runtime.

LayerGeneral roleIn the integral example
ModelInterpret the task, reason and choose the next step.Form the integral, select tools and explain discrepancies.
HarnessManage context, calls, permissions and feedback.Send expressions to tools and return results to the model.
Tools and runtimeExecute computations and read or write files.Python / Mathematica computes; files retain the code.

Check where Mathematica runs, which MCP server connects to it and where results are saved.

二 · 框架与智能体

把模型接到文件、软件和工作流程中。

1.工具的演变2.工作方式3.项目规则、Skill 与 MCP4.执行环境5.子智能体编排6.自己的任务

II · Harnesses and agents

Connect the model to files, software
and working processes.

1.How tools evolved2.Working with an agent3.Project rules, skills and MCP4.The execution environment5.Subagent orchestration6.Our own tasks

二 · 框架与智能体

1. 工具的演变

网页助手

网页对话
搜索与计算 → 文件与工具

编程助手

代码补全 → 编辑器协作 → 编程智能体

Copilot → Cursor / Windsurf / Zed
→ Claude Code / Codex / OpenCode

持续工作

使用文件与工具

保存进展 · 接续任务

本机自主助手

单次操作 → 消息与日程 → 持续任务OpenClaw 等

II · Harnesses and agents

1. How tools evolved

Web assistants

Conversation
Search and computation → files and tools

Coding assistants

Completion → editor collaboration → agents

Copilot → Cursor / Windsurf / Zed
→ Claude Code / Codex / OpenCode

Ongoing work

Using files and tools

Save progress · resume tasks

Autonomous local assistants

One-off actions → messages and schedules → ongoing tasksOpenClaw and others

Copilot · 2021Zed ACPOpenClaw

二 · 框架与智能体

2. 工作方式

请读取这份公开数据,画出两台探测器的时域信号。
保留原始数据,另存处理结果;
说明滤波参数和时间对齐方式。
交付图、代码和一条重跑命令。

目标与输入

要解决什么问题,材料在哪里。

选择与交付

哪些约定已确定,最后要拿到什么。

怎样判断完成

看到什么结果,做哪些检查。

II · Harnesses and agents

2. Working with an agent

Read this public dataset and plot the time series from both detectors.
Preserve raw data and save processed results separately.
State filter settings and time alignment.
Deliver plots, code and one rerun command.

Goal and input

What question are we answering, and where is the material?

Choices and output

Which conventions are fixed, and what should be delivered?

Completion

What result and checks will show that the task is done?

二 · 框架与智能体 / 2. 工作方式

编程智能体:从任务到可检查的产物

工作流程把自然语言要求变成文件和程序;每一步都要能找到对应的材料与结果。

选择项目

让智能体知道在哪个目录工作,材料在哪里。

说明任务

给出目标、输入、约定和交付。

看运行与修改

查看读了什么、运行了什么、改了什么。

检查并保存

试用结果,查看差异,保存可回退的版本。

实例:给引力波图增加叠加开关

“先读 resources/gw_explorer.html 和数据格式。
增加 H1 / L1 叠加开关,
保留原时间和振幅约定。”

按这四步观察

是否找到绘图代码?是否保留数据约定?是否真的运行并查看结果?

验收

原始/滤波、缩放、重置仍可用;代码差异中没有意外改变数据处理。

提出任务以后,继续观察执行过程并检查产物。

II · Harnesses and agents / 2. Working with an agent

Coding agents: from a task to a checkable result

A workflow turns a request into files and software, with inputs and results you can inspect at each step.

Choose a project

Establish the working directory
and input locations.

State the task

Specify the goal, inputs,
conventions and deliverables.

Inspect work

See what it reads, runs and changes.

Check and save

Try the result, review the diff
and retain a version you can return to.

Example: add a GW overlay toggle

“Read resources/gw_explorer.html and the data format.
Add an H1 / L1 overlay,
preserving timestamps and amplitude conventions.”

Watch the workflow

Did it find the plotting code,
preserve conventions and actually inspect the result?

Accept the result

Raw/filtered, zoom and reset still work.
The diff contains no unintended processing changes.

After giving the task, observe the work and inspect its output.

二 · 框架与智能体 / 2. 工作方式

遇到不同任务,怎样选工作方式

小而明确

直接执行,尽快看到第一份结果。

结构尚不清楚

先让 AI 看项目、解释现状,再讨论计划。

想同时试两条路线

用独立工作目录或 worktree,比较结果后再合并。

预计要运行较久

保存中间结果、进度和重跑入口。

II · Harnesses and agents / 2. Working with an agent

Choose a mode for the task

Small and clear

Execute directly and inspect the first result quickly.

Structure is unclear

Explore the project, explain its structure, then discuss a plan.

Two competing approaches

Use separate directories or worktrees and compare before integrating.

Long-running work

Save intermediate results, progress and a rerun entry point.

二 · 框架与智能体 / 2. 工作方式

换一个入口,工作方法仍可沿用

OpenCode

终端或桌面入口;选择模型,使用 Build / Plan,连接工具。

WorkBuddy

处理文件和办公任务,例如整理资料、生成报告。

豆包工作

从文档、表格、演示等工作任务开始,观察产物怎样保存。

II · Harnesses and agents / 2. Working with an agent

Different tools, a familiar workflow

OpenCode

Terminal or desktop; select a model, use Build / Plan and connect tools.

WorkBuddy

Start from files and office tasks such as organizing material or drafting reports.

Doubao Work

Start from documents, tables and presentations; inspect how outputs are saved.

OpenCodeWorkBuddy豆包工作

二 · 框架与智能体

3. 项目规则、Skill 与 MCP

以 Codex 为例:个人约定跨项目复用,项目约定随工程一起保存。

所有项目当前项目
项目规则
AGENTS.md
~/.codex/AGENTS.md

例:汇报习惯、文件操作约定。

项目目录/AGENTS.md

例:本幻灯片的配色、双语与公式规范。

智能体技能
Skill
~/.agents/skills/name/SKILL.md

例:各个研究项目都使用的论文下载流程。

项目目录/.agents/skills/name/SKILL.md

例:只用于本项目的数据处理与出图流程。

规则:启动任务时读取;项目内可沿目录逐层补充,更具体的约定优先。

Skill:先提供名称与描述,任务需要时再读取完整步骤和配套脚本。

MCP:连接外部工具的协议。例如,让 Codex 调用 Wolfram Language 执行计算。

~ 表示用户主目录;以上为默认文件位置,name 为技能文件夹名称。

II · Harnesses and agents

3. Project rules, skills and MCP

In Codex, personal conventions span projects; project conventions live with the work.

All projectsCurrent project
Project rules
AGENTS.md
~/.codex/AGENTS.md

Reporting preferences and file handling.

project/AGENTS.md

This deck’s colors, languages and math style.

Agent skills
Skill
~/.agents/skills/name/SKILL.md

A paper-download workflow used across projects.

project/.agents/skills/name/SKILL.md

A workflow for this project’s data and figures.

Rules: loaded at task startup; nested project guidance adds detail and takes precedence.

Skills: names and descriptions first; full instructions and scripts when needed.

MCP: a protocol for connecting tools, such as Wolfram Language for computation.

~ is your home directory; these are default locations. name is the skill folder.

Codex · AGENTS.mdCodex · Skills

二 · 框架与智能体 / 3. 项目规则、Skill 与 MCP

Skill 实例:保存论文阅读的重复步骤

arxiv-reading/
  SKILL.md
  scripts/
    fetch.py
    extract_eqs.py
    extract_sections.py

SKILL.md 告诉智能体

收到 arXiv ID 时,先查已有缓存;
需要时调用下载、公式和章节提取脚本。

最后留下什么?

原始 HTML、公式 JSON、分节内容,
以及能继续阅读的 memory.md。

自然语言说明“何时、怎么用”,脚本完成下载和解析。

II · Harnesses and agents / 3. Project rules, skills and MCP

Skill example: save repeatable paper-reading steps

arxiv-reading/
  SKILL.md
  scripts/
    fetch.py
    extract_eqs.py
    extract_sections.py

SKILL.md tells the agent

When given an arXiv ID, check the cache,
then call download, equation
and section scripts as needed.

What remains?

Raw HTML, equation JSON, section text
and a memory.md for continued reading.

Instructions explain when and how. Scripts perform the download and parsing.

arxiv-reading / SKILL.md

二 · 框架与智能体 / 3. 项目规则、Skill 与 MCP

Skill 文件的结构

name

技能的名字,方便识别和指定使用。

description

说清什么任务适合它:读论文、提取公式、交叉查阅。

II · Harnesses and agents / 3. Project rules, skills and MCP

The structure of a skill file

name

A name to recognize the skill or request it explicitly.

description

Tasks it supports: reading papers, extracting equations and cross-referencing.

arxiv-reading / SKILL.md

二 · 框架与智能体 / 3. 项目规则、Skill 与 MCP

MCP 实例:Wolfram Language

MCP 把工具名称、参数和返回结果连接起来;真正的计算由 Wolfram 内核执行。

配置:连接 Codex

使用:绘制 Airy 函数

II · Harnesses and agents / 3. Project rules, skills and MCP

MCP example: Wolfram Language

MCP connects tool names, arguments and results; the Wolfram kernel performs the calculation.

Setup: connect Codex

Use: plot the Airy functions

Wolfram · Local MCPWolfram · AgentTools demo

二 · 框架与智能体

4. 执行环境

智能体需要能使用的软件、能读取的文件,以及明确的操作范围,才能实际完成任务。

文件与工作树

项目目录、输入文件和输出位置。
讨论分支共用目录;并行改代码时
可 另建工作树 ↗。

软件与工具

Python、Mathematica、依赖包和 MCP 连接。

权限

可修改的范围,以及上传、发布或付费操作。

长任务

中间结果、进度和失败后继续的入口。

实例:Mathematica 计算没有跑起来

看不到工具

先列出可用工具,检查 Wolfram MCP 是否连接。

工具调用失败

先算 1 + 1,保存完整错误,再查安装或连接。

读不到输入文件

输出当前工作目录,确认文件存在和路径正确。

环境正常后,再把计算表达式缩小,定位计算本身的问题。

先判断问题在哪一层,再给智能体完整错误和最小复现。

Windows 下先确认智能体使用的 PowerShell 版本:5.1 不支持 && / ||,7 才支持。技术讨论 ↗

II · Harnesses and agents

4. The execution environment

Execution needs usable software, readable files and a clear scope for actions.

Files and worktrees

Inputs and outputs in a shared directory.
For parallel edits, use a worktree ↗.

Software and tools

Python, Mathematica,
dependencies and MCP connections.

Permissions

The scope for edits, uploads,
publishing and paid actions.

Long tasks

Saved results, progress and restart points.

Example: Mathematica does not run

No tool appears

List available tools and check the Wolfram MCP connection.

The call fails

Try 1 + 1. Preserve the full error
and inspect installation or connectivity.

The input is missing

Print the working directory and check the file and its path.

Once tools work, simplify the expression to isolate the error.

Locate the failing layer, then give the agent the full error and a minimal reproduction.

On Windows, check the agent’s PowerShell version: 5.1 rejects && / ||; 7 supports them. Discussion ↗

二 · 框架与智能体

5. 子智能体编排

主智能体把任务交给子智能体。子智能体用各自的上下文工作,交回结果;
主智能体保留研究目标、已确认的结论与最终判断。

主智能体 · 明确任务、材料与交付要求

分头查资料

分别查理论、观测与数值方法

各自交回文献、原文位置和依据

研究与文稿并行

研究继续推进;另一位整理已确认结果

生成文档、图注或译文,注明所用版本

研究与独立审阅

把推导、假设与代码交给另一位检查

找反例和漏项,交回错误位置
汇总结果 · 对照证据、处理分歧、继续研究

速度

独立任务同时推进

上下文

每位只读相关材料

模型特长

按任务选模型与工具

独立视角

检查者重新判断

局部重试

单独重做失败任务

II · Harnesses and agents

5. Subagent orchestration

The main agent delegates tasks. Subagents work in their own contexts and return results.
The main agent retains the research goal, accepted findings and final decisions.

Main agent · Specify the task, sources and deliverable

Search in parallel

Split theory, observations and numerical methods

Return papers, source locations and evidence

Research and writing

Research continues; another worker uses accepted findings

Produce documents, captions or translations with a version

Independent review

Give another worker the derivation, assumptions and code

Return counterexamples, omissions and checkable errors
Integrate results · Check evidence, resolve disagreements, continue research

Speed

Parallel tasks

Context

Relevant inputs

Model strengths

Models for each task

Fresh perspective

Independent review

Local retries

Retry one task

Codex · Subagents

二 · 框架与智能体 / 5. 子智能体编排

调用子智能体的方式与轻量选项

方式怎样调用适合怎样的控制
框架内置分工 ↗直接让 Codex 等编程智能体调用子智能体主智能体分派、等待和汇总
插件/专门框架 ↗Oh My OpenCode/OmO:预设角色、模型和分派规则复用现成的编排方式
命令行独立任务 ↗codex exec "检查推导的量纲" -o review.md自己选择任务、输入材料和输出文件
ac-llm 封装 ↗把模型任务封装为可跟踪、可恢复的调用批量调用,保存状态与结构化结果
程序编排 ↗LangGraph 等:用程序连接模型、工具与工作步骤明确分支、循环、并行和汇总条件

另一个选项:直接调用大语言模型 API

用 OpenAI 的 Responses/Chat Completions API,仅发送任务与文本。
适合总结、翻译等输入输出明确的工作;省去工具循环和多轮工作记录的额外开销。

异步队列可设置如 100 个在途请求;本机无需为每项任务启动完整智能体进程。
实际并发按请求/token 限额、文本大小与预算设置。

II · Harnesses and agents / 5. Subagent orchestration

Subagents and lightweight alternatives

MethodHow to invoke itWhat you control
Built-in delegation ↗Ask a coding agent such as Codex to use subagentsAssign tasks and integrate results
Plugin / harness ↗Oh My OpenCode / OmO: roles, models and dispatch rulesReuse an existing orchestration setup
CLI task ↗codex exec "Check dimensions" -o review.mdChoose inputs and output files
ac-llm wrapper ↗Wrap model tasks in tracked, resumable callsBatch tasks; save states and results
Workflow code ↗LangGraph: connect models, tools and workflow stepsControl branches, loops and joins

Another option: call the language model API directly

Use OpenAI’s Responses / Chat Completions API with just the task and text.
For summaries or translations, this avoids extra tool loops and accumulated work histories.

An async queue can allow, for example, 100 in-flight requests, without a full agent process per task.
Set concurrency from request / token limits, input size and budget.

OpenAI · Text generationOpenAI · Rate limits

二 · 框架与智能体 / 5. 子智能体编排

子智能体:分工与协调的代价

分工带来并行,也增加启动、重复阅读、等待与汇总。任务之间依赖越多,协调越重。

Coleman 课程:工作流变成审批流

原本的目标

每讲结束后复盘,让下一讲做得更好、更快。

逐渐发生的变化

局部修法写进通用规范。
每段反复包装、交接,等待主智能体批准。

具体阻塞与调整

44.03:已过审代码仍因目录前缀而重新包装。
后来取消重复准入和逐段批准,
继续验片与物理审核。

怎样把分工保持在任务上

重复输入 → 增加 token

交给每位必要材料,返回结论、证据和位置。

互相等待 → 降低速度

拆开可独立完成的任务;程序处理机械步骤。

版本分叉 → 难以汇总

约定材料版本、输出格式,以及每个文件的写者。

层层审批 → 主智能体成为瓶颈

把人的判断留给研究目标、分歧与关键结果。

启动前问:这项任务独立吗?交回什么?由谁接手判断?

II · Harnesses and agents / 5. Subagent orchestration

Subagents: the cost of coordination

Delegation adds startup, repeated reading, waiting and integration. More dependencies mean more coordination.

Coleman lectures: work became approvals

Original goal

Review each lecture so the next one is better and faster.

What accumulated

Local fixes became general rules;
each segment repeated handoffs and approvals.

A blockage and the correction

44.03 passed code checks; a directory prefix
still triggered repackaging and approval.
Repeated approvals ended; reviews continued.

Keep delegation focused on the task

Repeated input → more tokens

Return findings with evidence and locations.

Waiting → less speed

Separate independent tasks; automate routine steps.

Version drift → difficult integration

Agree on versions, formats and one writer per file.

Approval chains → a bottleneck

Decide goals, disagreements and key findings.

Before delegating: is it independent? What will it return? Who will assess it?

Coleman · 制作复盘(第 2–5 节)

二 · 框架与智能体

6. 自己的任务

选一件本周本来就要做的小事,写成四句话。

我要得到

一幅图、一个计算、一张表,或一个能运行的小工具。

材料在这里

文件、论文、数据或已有工程。

请保留这些约定

单位、符号、语言、目录或软件版本。

完成后我会检查

一个已知结果、一种极限,或一次实际操作。

II · Harnesses and agents

6. Our own tasks

Choose one small task you already need to do this week. Describe it in four sentences.

I want

A plot, calculation, table or working tool.

The material is here

Files, a paper, data or an existing project.

Keep these conventions

Units, notation, language, locations or software versions.

I will check

A known result, a limiting case or an actual interaction.

三 · 用智能体编程

从“一句话做出来”,
走向可以持续修改的工程。

1.开发实例2.软件架构与设计模式3.AI 时代的软件组织4.重写与重构5.测试与测试驱动开发

III · Coding with agents

From a one-sentence prototype
to a project you can keep changing.

1.Development examples2.Architecture and design patterns3.Organizing software for AI4.Rewriting and refactoring5.Testing and test-driven development

三 · 用智能体编程

1. 开发实例

做一个单文件的网页小游戏:玩家调整角度和初速度,让抛体落进篮筐。
能重新开始,能改变重力,并显示轨迹。

第一轮先玩起来,第二轮再提出一个具体改动。

III · Coding with agents

1. Development examples

Make a single-file browser game: adjust launch angle and speed to land a projectile in a basket. Include restart, adjustable gravity and a visible trajectory.

Play the first version, then request one concrete change.

三 · 用智能体编程 / 1. 开发实例

一句话,变成一段可检查的数据分析

用 GWOSC 的 GW150914 公开数据,
制作一个能切换 H1 / L1、原始信号 / 滤波信号的交互图,
并显示时频图。
获取真实数据
选择处理方法
生成交互图
回看处理参数

来自我的 PHYS1002 Introduction 课件。

III · Coding with agents / 1. Development examples

One request becomes an inspectable analysis

Use public GWOSC data for GW150914
to build an interactive plot with H1 / L1 and raw / filtered signal controls,
plus a spectrogram.
Obtain real data
Choose processing
Build the display
Inspect parameters

From my PHYS1002 Introduction course materials.

GWOSC GW150914

三 · 用智能体编程 / 1. 开发实例

在真实数据里看见 chirp

III · Coding with agents / 1. Development examples

See the chirp in real data

GWOSC

三 · 用智能体编程 / 1. 开发实例

引力波图:需要核对哪些处理选择

滤波

频段怎样选?
换一个频段,结构是否还在?

时间与归一化

是否平移了曲线?
振幅的单位和缩放是什么?

证据

观察到 chirp;要讨论显著性,
还需要怎样的背景估计?

科研经验体现在知道应该追问哪些选择。

III · Coding with agents / 1. Development examples

GW plots: which processing choices need checking

Filtering

Why this band?
Does the structure persist under a different choice?

Time and normalization

Were curves shifted?
What are the units
and amplitude scaling?

Evidence

We see a chirp.
What background estimate would establish significance?

Scientific experience tells you which choices to ask about.

三 · 用智能体编程 / 1. 开发实例

为了翻译一本书,先写一个软件

Codex 统筹与控制流程:运行脚本、检查输出、接续任务;各模型通过 OpenRouter 调用。

准备材料

分节原文、统一术语表;Gemini 3.6 Flash 生成章节摘要,提供翻译背景。

多模型翻译

DeepSeek V4 Pro · Qwen3.7 Plus · Grok 4.3
使用相同的原文、术语表和章节背景,分别生成译稿。

匿名评分与比较

上述三种模型与 Claude Sonnet 5、Gemini 3.6 Flash 参与评价。
对照原文为试译章节打分、指出问题,再选定主稿和参考稿。

Claude 最后执笔

Claude Sonnet 5 润色 DeepSeek 主稿,参考 Qwen 和 Grok 译稿。
结合原文吸收各稿的长处,输出供人继续修改的翻译底稿。

III · Coding with agents / 1. Development examples

Build software to translate a book

Codex orchestrates the workflow: runs scripts, checks outputs and resumes work.
Model calls go through OpenRouter.

Prepare the material

Source sections and a shared glossary; Gemini 3.6 Flash creates chapter summaries
to give each passage its context.

Generate translations

DeepSeek V4 Pro · Qwen3.7 Plus · Grok 4.3
Each translates the same source with the same glossary and chapter context.

Score and compare

These three models, Claude Sonnet 5 and Gemini 3.6 Flash review anonymized samples.
Scores and specific criticisms inform the choice of main and reference drafts.

Claude writes the draft

Claude Sonnet 5 polishes the DeepSeek draft against the source,
drawing on Qwen and Grok translations. The result is ready for human editing.

三 · 用智能体编程 / 1. 开发实例

翻译底稿进入 ALC,由人接手改进

对照原文修改译文 · 补充译者注 · 保留修改版本

ALC:左侧章节目录,英文原文与中文译文并排,附译者注和译文版本

III · Coding with agents / 1. Development examples

Into ALC: people refine the translation

Edit alongside the source · Add translator’s notes · Retain revisions

ALC with a chapter outline, parallel English and Chinese text, translator notes and revision labels
github.com/tririver/alc

三 · 用智能体编程

2. 软件架构与设计模式

写代码只是软件开发的一部分。用途、模块边界和验收标准决定软件怎样服务实际工作。

产品经理的工作

给谁用?
解决哪一步的困难?
做到什么程度有价值?

架构师的工作

哪些部分独立变化?通过什么数据和接口连接?

实现与验证

完成功能,检查结果,再根据使用反馈修改。

实例:为了翻译一本书写软件

产品决定

读者是物理本科生还是普通读者?术语首次出现要不要带英文?

架构决定

术语表、模型调用和排版分别组织,换模型时能单独重跑翻译。

验收决定

抽查段落、检查术语一致性,再试译下一节。

让 AI 写代码时,也要把这些产品和架构判断说清楚。

III · Coding with agents

2. Architecture and design patterns

Software development also involves deciding its purpose, module boundaries and acceptance criteria.

Product work

Who uses it? Which difficulty does it solve? What would make it useful?

Architecture

Which parts change independently?
Which data and interfaces connect them?

Implementation and checks

Build, inspect the result
and revise through use.

Example: software for translating a book

Product decision

Physics undergraduates or general readers?
Include English at first use of a technical term?

Architecture decision

Separate glossary, model calls and layout
so translation can rerun when the model changes.

Acceptance decision

Inspect passages and terminology, then try the next section.

When asking AI to code, articulate these product and architecture decisions too.

三 · 用智能体编程 / 2. 软件架构与设计模式

软件工程与设计模式:组织编程的方法

软件工程提供组织软件开发的方法:明确需求、安排结构、验证结果,并支持后续修改。

软件工程

怎样把一个需求做成可持续使用的软件?
需求、实现、测试、版本管理与维护共同组成开发过程。

软件架构

软件分成哪些部分,各部分怎样协作?
例如将术语表、模型调用和排版分开,用约定的接口连接。

设计模式

反复遇到的代码组织问题,有哪些可复用的解法?
通过分配职责和安排接口,让一处变化少牵动其他代码。

下面两个例子:生成器与迭代器模式组织逐项处理;工厂模式组织对象创建。

III · Coding with agents / 2. Architecture and design patterns

Software engineering and design patterns

Software engineering organizes development: define requirements, structure the software,
verify results and support later changes.

Software engineering

How does a requirement become software we can keep using?
Requirements, implementation, tests, version control and maintenance form the process.

Software architecture

What are the parts, and how do they work together?
For example, separate the glossary, model calls and layout behind agreed interfaces.

Design patterns

Which reusable solutions address recurring code-organization problems?
Assign responsibilities and interfaces so a change affects fewer other parts.

Two examples follow: generators and the Iterator pattern for iteration;
the Factory pattern for object creation.

三 · 用智能体编程 / 2. 软件架构与设计模式

设计模式实例:Generator 与 Iterator

Generator(生成器)是 Python 实现迭代器模式(Iterator Pattern)的一种方式。
逐项提供数据,让循环与数据的产生方式分开。

例子:逐篇读取、分析论文,给长循环加上进度和剩余时间。

papers = (read_paper(path) for path in paths)
for paper in papers:
    analyse(paper)
from tqdm import tqdm

for paper in tqdm(papers, total=len(paths)):
    analyse(paper)

tqdm 包装同一个可迭代对象,附加进度显示;分析论文的代码不变。

III · Coding with agents / 2. Architecture and design patterns

Design pattern example: Generator and Iterator

A generator is one way to implement the Iterator pattern in Python.
It supplies items one at a time, separating the loop from how data is produced.

Example: read and analyze papers one by one, with progress and time remaining.

papers = (read_paper(path) for path in paths)
for paper in papers:
    analyse(paper)
from tqdm import tqdm

for paper in tqdm(papers, total=len(paths)):
    analyse(paper)

tqdm wraps the same iterable and adds progress reporting.
The paper-analysis code stays the same.

Python · Generatorstqdm

三 · 用智能体编程 / 2. 软件架构与设计模式

设计模式实例:Factory 工厂模式

工厂模式(Factory Pattern)把对象的创建集中起来。
调用方使用统一接口,具体选哪个模型、怎样连接,由工厂负责。

例子:更换翻译模型,不必重写逐章翻译和保存的流程。

# Illustrative example
translator = make_translator(config)

for section in book:
    result = translator.translate(section)
    save(result)

工厂负责创建

读取模型配置,建立对应的翻译器。

翻译流程负责使用

调用 translate,再保存结果。

把“怎样创建”与“怎样使用”分开:更换实现,保留调用方式。

III · Coding with agents / 2. Architecture and design patterns

Design pattern example: Factory

The Factory pattern centralizes object creation.
Callers use a common interface; the factory selects and connects the model.

Example: switch translation models while keeping the chapter-by-chapter workflow.

# Illustrative example
translator = make_translator(config)

for section in book:
    result = translator.translate(section)
    save(result)

The factory creates

Read the model configuration
and construct its translator.

The workflow uses

Call translate and save the result.

Separate creation from use: change the implementation, keep the calling interface.

三 · 用智能体编程 / 2. 软件架构与设计模式

设计中的常用准则

职责是否清楚?

下载论文、调用模型、排版文档,各自在哪里?

变化是否局部?

换模型、加输出格式,会牵动哪些地方?

接口是否合用?

调用方只需知道输入、输出和失败如何表示。

实现能否替换?

替换内部实现后,调用方期待的行为能否保持?

III · Coding with agents / 2. Architecture and design patterns

Common design principles

Are responsibilities clear?

Where do downloading, model calls and document rendering belong?

Is change local?

What changes when we switch models or add an output format?

Is the interface useful?

Callers need inputs, outputs and a clear representation of failure.

Can implementations
be replaced?

Does a replacement preserve the behavior callers rely on?

SOLID · Robert C. Martin

三 · 用智能体编程

3. AI 时代的软件组织

AI 改变了代码生成与修改的成本,也改变了自然语言与程序代码的分工。

1.

开闭原则的边界可以放大

保持外部约定,让一个完整任务留在更大的实现单元里。

2.

厚软件包,薄 Skill

重复流程写进程序,Skill 说明何时调用、怎样使用。

III · Coding with agents

3. Organizing software for AI

AI changes the cost of producing and revising code,
and the division of work between natural language and programs.

1.

A larger open–closed boundary

Keep the external contract; place a complete task in a larger implementation unit.

2.

A substantial package, a thin skill

Put repeatable workflows in code; let the skill explain when and how to call it.

三 · 用智能体编程 / 3. AI 时代的软件组织

1. 开闭原则的边界可以放大

~1k 行简单代码

我的实践参考

AI 生成、修改这段代码的成本很低,
一个完整任务可以留在更大的函数或模块里。
边界要适合 AI 读取和修改代码的方式。

开闭原则:稳定外部约定,扩大可替换的实现单元

调用方
使用稳定接口
一个完整的实现模块

把一起变化的代码放在一起
AI 可以整体生成或替换

新实现
保持接口与行为约定

III · Coding with agents / 3. Organizing software for AI

1. A larger open–closed boundary

~1k lines of simple code

A reference from my own practice

AI can generate or revise this code at very low cost.
One complete task can stay in a larger function or module.
Choose boundaries for how AI reads and edits code.

Open–closed: keep the contract, enlarge the replaceable unit

Callers use
a stable interface
One coherent implementation

Keep code that changes together in one place.
AI can generate or replace it as a whole.

New implementation,
same interface and behavior

三 · 用智能体编程 / 3. AI 时代的软件组织

2. 厚软件包,薄 Skill

薄 Skill什么时候用,输入是什么,怎样看结果
厚软件包解析、缓存、重试、状态、测试和稳定接口

把确定性的重复工作写进程序,把任务选择留在自然语言里。

III · Coding with agents / 3. Organizing software for AI

2. A substantial package, a thin skill

Thin skillWhen to use it, what to pass in and how to interpret results
Substantial packageParsing, caching, retries, state, tests and stable interfaces

Put repeatable mechanics in code; express task choices in natural language.

ARCSkills & prompts · 2026-09

三 · 用智能体编程 / 3. AI 时代的软件组织

理解复杂度,推荐《人月神话》

Frederick P. Brooks, Jr.《人月神话》:建议读包含《没有银弹》的纪念版。

本质复杂度

来自问题本身:物理假设、术语的含义、读者需要怎样的解释。
例如翻译软件要同时照顾准确性、可读性和术语一致性。

偶然复杂度

来自当前的实现方式:重复的模型调用、混在一起的解析与排版、
不同模块间反复转换的数据格式。“偶然”指实现带来的复杂度。

为什么现在仍值得读

概念完整性、模块分工、沟通成本,仍然影响软件怎样被组织。
AI 降低改写成本后,我们更有机会主动消除实现上的纠缠。

讨论:AI 降低了哪些复杂度?哪些判断仍需要研究者明确提出?

III · Coding with agents / 3. Organizing software for AI

Understanding complexity: The Mythical Man-Month

Frederick P. Brooks, Jr. — read the Anniversary Edition,
which includes “No Silver Bullet”.

Essential complexity

Comes from the problem: physical assumptions, terminology and readers’ needs.
A translation must reconcile accuracy, readability and consistent terminology.

Accidental complexity

Comes from the implementation: duplicated model calls, tangled parsing and layout,
or repeated format conversions. “Accidental” refers to implementation choices.

Why read it now?

Conceptual integrity, division of work and communication costs shape software.
Cheaper rewriting gives us more chances to remove tangled implementation details.

Discuss: which complexity does AI reduce, and which judgments must researchers specify?

The Mythical Man-Month · Publisher

三 · 用智能体编程

4. 重写与重构

AI 大幅降低逐文件改写的成本:换语言、重新实现、拆分架构,都更容易尝试。

重写

更换实现或编程语言。
例如:Mathematica → Python;Zig、C → Rust。

重构

保持外部行为,整理内部结构。
例如:拆分模块、抽取公共能力、统一模型接口。

逆向重建

从运行行为、汇编和反编译结果理解机制,再写出高层语言实现。
REA 把分析工具接给智能体,协助这一过程。

设计模式和软件工程术语,帮助我们把“要怎样改”说准确。

III · Coding with agents

4. Rewriting and refactoring

AI lowers the effort of file-by-file changes: language ports, new implementations
and architectural restructuring become easier to attempt.

Rewrite

Replace an implementation or programming language.
Examples: Mathematica → Python; Zig or C → Rust.

Refactor

Improve internal structure while preserving observable behavior.
Split modules, extract shared capabilities or unify model interfaces.

Reconstruct

Infer behavior from execution, assembly and decompiled code,
then implement it in a high-level language. REA connects the analysis tools.

Design patterns and engineering concepts help us specify the change we want.

Refactoring · Martin FowlerREA

三 · 用智能体编程 / 4. 重写与重构

一条提示词:MathGR → Python / SymPy

将 MathGR 移植到 Python、使用 SymPy 的原始提示词

原有 Mathematica 工程成为新实现的规格与参考。

III · Coding with agents / 4. Rewriting and refactoring

One request: MathGR → Python / SymPy

Original prompt to port MathGR to Python using SymPy

The existing Mathematica project supplies the specification and reference.

MathGRMathGR-Py

三 · 用智能体编程 / 4. 重写与重构

Rust 重写:从运行时到视频工具

旧代码提供行为参照,智能体承担大量阅读、翻译和逐文件改写。

Bun · Zig → Rust

2026 年 7 月公布:百万行级迁移,主要代码生成不到两周。
团队报告按 API 标价约 16.5 万美元,重写开始成为可尝试的工程选择。

wedeo · C → Rust

以 FFmpeg 为参照重写媒体组件,仓库明确记录由 Claude Code 生成。
已实现的编解码能力逐项列出,并与 FFmpeg 输出对照。

claux
TypeScript → Rust

从 Claude Code 的 Rust 重写实验起步,随后发展成独立运行框架。
保留工具、会话、权限等机制,再调整成自己的产品。

III · Coding with agents / 4. Rewriting and refactoring

Rust rewrites: runtimes, media and agents

The old code provides a behavioral reference; agents do much of the reading,
translation and file-by-file rewriting.

Bun · Zig → Rust

July 2026: a million-line migration, with the main generation under two weeks.
The team reports roughly US$165k at API list prices.

wedeo · C → Rust

Media components rebuilt from FFmpeg; the repository attributes the code to Claude Code.
Implemented codecs are listed individually and compared against FFmpeg outputs.

claux
TypeScript → Rust

Started as a Rust rewrite experiment of Claude Code, then became an independent harness.
Tools, sessions and permissions provide the starting point for a different product.

Bun · 2026-07Bun · GitHubMigration reportwedeo · GitHubclaux · GitHub

三 · 用智能体编程 / 4. 重写与重构

REA:从程序行为到重新实现

REA = Reverse Engineer Anything。通过 MCP,让智能体使用逆向分析工具。

应用或二进制
汇编、伪代码
与调用关系
解释机制
高层语言实现

工具怎样分工

Ghidra、Hopper 或 IDA 提取本机程序的汇编和反编译信息;
REA 组织分析结果,智能体据此理解并编写新实现。

一个具体任务

分析 Notes 应用怎样搜索笔记,追踪相关函数与数据流,
再为自己的项目写出相同用途的搜索功能。

重建的是算法与行为;高层语言中的命名、结构和接口可以重新设计。

III · Coding with agents / 4. Rewriting and refactoring

REA: from observed behavior to a new implementation

REA = Reverse Engineer Anything. It connects reverse-engineering tools
to an agent through MCP.

App or binary
Assembly, pseudocode
and call relationships
Explain the mechanism
High-level implementation

Division of work

Ghidra, Hopper or IDA extracts native assembly and decompiled code.
REA organizes the findings; the agent uses them to understand and reimplement behavior.

A concrete task

Investigate search in the Notes app and trace the relevant functions and data flow.
Then build a search feature for your own project.

Recover the algorithm and behavior; redesign names, structure and interfaces.

REA · GitHubREA · Guides

三 · 用智能体编程 / 4. 重写与重构

重构:用设计语言说明怎样拆分

AI 可以很快完成移动代码、改接口和更新调用方。软件工程知识帮助我们指定合理的边界。

从“拆开这个大文件”

进一步说明:哪些职责一起变化,哪些职责应独立?
例如:文档解析与科研策略分开;共享能力进入 AC Foundation。

用接口与模式表达

用工厂集中模型创建;用适配器衔接不同后端。
工作流依赖统一接口,让后端变化留在实现内部。

以 ARC 为例:把文档处理从科研工作流中抽出,保留调用接口与输出含义;
让 ARC 和 ALC 共用这层能力,并更新各自的调用方。

“降低耦合”“抽取职责”“保持行为”,比笼统地说“优化代码”更具体。

III · Coding with agents / 4. Rewriting and refactoring

Refactoring: describe the structure you want

AI can move code, change interfaces and update callers quickly.
Engineering knowledge helps us choose the boundaries.

Beyond “split this file”

Say which responsibilities change together and which should vary independently.
Separate document parsing from research policy; extract shared work into AC Foundation.

Use interfaces and patterns

A factory centralizes model creation; an adapter bridges different backends.
The workflow uses one interface, keeping backend differences inside implementations.

For ARC: extract document handling from the research workflow.
Preserve its interface and output meaning; share it with ALC and update both callers.

“Reduce coupling”, “extract a responsibility” and “preserve behavior” specify useful changes.

ARC · b4b1bc6Refactoring

三 · 用智能体编程 / 4. 重写与重构

重构实例:ARC、ALC 共用 AC

ARC

文献、研究领域
与科研工作流

ALC

翻译、阅读辅助
与学术文档

AC Foundation

任务运行 · 模型调用 · 文档处理 · proposer / reviewer 编排

科研与翻译分别演化,共同依赖通用基础能力。

III · Coding with agents / 4. Rewriting and refactoring

Refactoring example: ARC and ALC share AC

ARC

Papers, research domains
and research workflows

ALC

Translation, reading support
and academic documents

AC Foundation

Jobs · model calls · documents · proposer / reviewer orchestration

Research and translation evolve separately on a shared foundation.

ARCAC FoundationALC

三 · 用智能体编程 / 4. 重写与重构

ARC 怎样拆成 AC、ALC、ARC

旧 ARC 同时负责科研、翻译、阅读发布和底层运行。
翻译普通文档也要用到论文模块里的文档能力,复用关系开始绕路。

旧 ARC

科研 + 翻译与阅读
+ 通用基础能力

→

ARC · 科研

arc-paper · arc-domain

ALC · 学习与阅读

翻译 · Companion · OCR 校对 · 发布

↓ 共同依赖 ↓

AC Foundation · 通用基础

文档结构与缓存 · 任务运行 · 模型调用 · 提案/评审编排

1. 抽出共同能力

8/20:抽取 arc-document。
学习功能读取文档,不再依赖
arc-paper 的论文业务。

2. 按用途分成三个工程

8/21:通用包改为 ac-*;
翻译与阅读进入 ALC;
ARC 保留论文与研究领域。

3. 把边界落实到依赖

ARC 和 ALC 各自调用 AC。
删除旧的内部转发入口,
用测试检查包与依赖关系。

结果:ALC 可独立处理书稿;通用文档能力在 AC 维护,科研能力在 ARC 演化。

III · Coding with agents / 4. Rewriting and refactoring

How ARC split into AC, ALC and ARC

Old ARC combined research, translation, readers and infrastructure.
Reading a general document still went through the paper module: reuse crossed the wrong boundary.

Old ARC

Research + learning
+ shared infrastructure

→

ARC · Research

arc-paper · arc-domain

ALC · Learning

Translation · Companion · OCR · publishing

↓ Both depend on ↓

AC Foundation · Shared infrastructure

Documents and caches · jobs · model calls · proposer/reviewer orchestration

1. Extract shared capabilities

20 Aug: extract arc-document.
Learning packages can read documents
without depending on arc-paper.

2. Separate three projects

21 Aug: shared packages become ac-*.
Learning and publishing move to ALC.
Papers and research domains stay in ARC.

3. Enforce dependencies

ARC and ALC each call AC.
Remove old private forwarding modules.
Test package and dependency boundaries.

ALC handles books independently; AC maintains shared documents, while ARC develops research features.

2026-08-20 · b4b1bc62026-08-21 · 29c6af62026-08-21 · 6894d82

三 · 用智能体编程

5. 测试与测试驱动开发

测试把“软件应该怎样工作”写成可以反复运行的检查。
以购物车为例:准备输入,执行操作,再断言结果。

单元测试:一个功能

商品单价 30 元,数量为 2,预期小计为 60 元。
再检查数量为 0、优惠券等边界和分支。

集成测试:组件协作

把订单写入测试数据库,再读回。
检查商品、数量和金额是否完整保存。

端到端测试:用户路径

在浏览器中选商品、加入购物车、提交订单。
检查确认页和订单记录,覆盖整条购买流程。

Smoke test
冒烟测试

先快速确认程序能启动、核心流程能跑通。
例如:启动文献工具,读取一条记录,生成一个可打开的结果文件。

修复一个错误后,留下能重现它的测试,防止以后再次出现。

III · Coding with agents

5. Testing and test-driven development

Tests make expected behavior repeatable.
For a shopping cart: arrange inputs, perform an action, then assert the result.

Unit: one function

A unit price of 30 and quantity of 2 should give a subtotal of 60.
Also cover zero quantity and discount rules.

Integration: components

Save an order to a test database, then read it back.
Check that its items, quantities and amounts survive.

End-to-end: a user journey

In a browser, select a product, add it to the cart and place an order.
Check the confirmation page and the order record.

Smoke test

Quickly check that the program starts and its core path works.
For a literature tool: read one record and produce a file that opens.

Keep a test that reproduces each fixed bug, so future changes cannot silently bring it back.

The Practical Test Pyramid · Ham VockeSmoke test · QF-Test

三 · 用智能体编程 / 5. 测试与测试驱动开发

测试驱动开发:红、绿、重构

先写出期望行为的测试,再实现功能,最后整理代码。
例:会议室预约不能重叠,但上一场结束后,下一场可以立即开始。

红:先写测试10:30–11:30 应被拒绝;
尚未实现重叠判断,测试失败
绿:实现功能加入时间重叠判断,
让这项测试通过
重构:整理代码把重叠判断抽成独立函数,
原有测试继续通过

已有预约:10:00–11:00

新预约预期结果
10:30–11:30拒绝:时间重叠
11:00–12:00允许:首尾相接
09:30–10:30拒绝:也有重叠

逐项增加测试,重复这个循环

先完成第一行,再逐项补上后两种情形。
新测试失败时补上实现,重构后运行全部测试。

测试也帮助我们明确需求

11:00 可以开始下一场吗?这里约定可以。
把约定写进测试,AI 改写后仍能自动检查。

III · Coding with agents / 5. Testing and test-driven development

Test-driven development: red, green, refactor

Test the expected behavior, implement it, then improve the structure.
Example: room bookings cannot overlap; one may start exactly when another ends.

Red: write a testReject 10:30–11:30.
No overlap check yet: the test fails
Green: implementAdd the overlap check
and make this test pass
Refactor: organize the codeExtract a function for overlap;
keep existing tests passing

Existing booking: 10:00–11:00

New bookingExpected result
10:30–11:30Reject: overlaps
11:00–12:00Allow: back-to-back
09:30–10:30Reject: also overlaps

Add tests one at a time; repeat the cycle

Complete the first case, then add the other two.
If a new test fails, implement the missing behavior.
Refactor and run all existing tests.

Tests also clarify the requirement

May a meeting start at 11:00? We decide it may.
A test preserves that rule when AI edits the code.

TDD · Martin Fowler

三 · 用智能体编程 / 5. 测试与测试驱动开发

根据运行结果更新计划

确定一个小目标
做出最小版本
运行并观察
决定下一步

先计划什么

接口、约定、输入输出和重要选择。

尽早试什么

最容易改变后续路线的那一步。

先跑一个章节的翻译,再决定整本书的流程。

III · Coding with agents / 5. Testing and test-driven development

Update the plan from results

Choose a small goal
Build a minimal version
Run and inspect
Choose the next step

Plan first

Interfaces, conventions,
inputs, outputs and consequential choices.

Try early

The step most likely to change the route ahead.

Translate one section before committing to the whole-book workflow.

Dynamic planning

四 · 科研

从聊天中的计算,走向可以反复读取和使用的研究材料。

1.在聊天窗口中的科研2.如何让 AI 读文章3.通过引文网络拓展文献4.让 AI 提科研想法5.实际科研例一6.实际科研例二

IV · Research

From calculations in chat to research material we can read and reuse.

1.Research in a chat window2.How to help AI read papers3.Expanding literature through citation networks4.Generating research ideas with AI5.Research case I6.Research case II

四 · 科研

1. 在聊天窗口中的科研

用 GPT-Pro 查找初稿错误,逐项复核问题与修改建议。

IV · Research

1. Research in a chat window

Use GPT-Pro to find draft errors; assess each issue and proposed change.

Original conversation

四 · 科研 / 1. 在聊天窗口中的科研

用 GPT dot 进行持续研究

持续研究的原始聊天截图:研究进展、报告与重启记录

IV · Research / 1. Research in a chat window

Sustained research with GPT dot

Original sustained-research chat: progress, reports and restart records

四 · 科研 / 1. 在聊天窗口中的科研

持续研究:三种合作方式

Dot 调研并自主选题

我委托领域调研;Dot 自主选择方向,持续推进并写出稿件。

我提供资料与研究方向

给出 PDF 与具体问题,由 Dot 推导、计算,形成质量与波形分类。

Dot 提出新题目,我来筛选

新结果启发新想法;我判断重要性,选择继续研究的方向。

共同选择问题
持续推导与计算
独立审查与复核
报告与归档

研究进展不断改变下一步;问题的物理意义决定优先级。

IV · Research / 1. Research in a chat window

Sustained research: three ways to collaborate

Dot surveys and selects

I commission a field survey; Dot chooses directions and develops manuscripts.

I provide sources and a direction

I supply PDFs and questions; Dot derives and computes mass and waveform classifications.

Dot proposes; I select

Results inspire new ideas; I judge their importance and select directions to pursue.

Choose a question
Derive and compute
Review independently
Report and preserve

Results reshape the next step; physical significance sets the priorities.

四 · 科研 / 1. 在聊天窗口中的科研

用 dot 写 arXiv 与科技新闻周报

每周五 arXiv 批次发布两小时后开始收集,阅读与判断完成后交付中文简报。

从信息输入到研究决策

覆盖文献与新闻

hep-th、gr-qc、astro-ph.CO;补搜跨类 QSF/宇宙对撞机。
AI 新闻优先看官方发布、论文、技术报告和代码。

重点精读与科学判断

筛选基础物理的月度级亮点、宇宙学 Top 3,
跟进 QSF/宇宙对撞机进展与重要修订。
读正文、关键公式和前作,区分作者声称与核查结果。

接回个人研究兴趣

联系全部关注方向,提出新想法与最小检验。
说明相比旧思路的优势、风险;更新研究想法库。

真实交付 · 2026-10-09

449 篇去重后新稿/新跨列 · 7 项重点修订

449 是完整清单数量;重点全文阅读另行筛选。
10 页中文 PDF、可编辑 Word、可筛选 Excel 清单。

该期研究建议

Boosted Odds → 动量复合算符能否读出
密度四点中受投影遮蔽的 clock 信息?

最小检验:比较两种读出的参数零空间,
再加入源与观测干扰。

保留公告批次、版本、覆盖清单与原始来源;
把文献触发的新问题写成可执行的研究检验。

IV · Research / 1. Research in a chat window

Dot: a weekly arXiv and technology digest

Start two hours after Friday’s arXiv release; deliver a Chinese brief after reading and assessment.

From new information to research decisions

Cover papers and news

hep-th, gr-qc, astro-ph.CO; cross-category QSF / collider.
AI: official releases, papers, technical reports and code.

Read closely and assess

Physics highlights of monthly significance; cosmology Top 3.
QSF / collider advances and key revisions.
Read formulas and prior work; separate claims from checks.

Connect to my research interests

Propose ideas across all my interests, with minimal tests.
Assess advantages and risks; update the idea bank.

Actual delivery · 2026-10-09

449 unique papers · 7 key revisions

New / cross-listed inventory; full-text reading is selective.
10-page Chinese PDF; editable Word; filterable Excel.

A research suggestion from this issue

Boosted Odds → can momentum composites recover
clock information hidden by projection
in the density four-point?

Minimal test: compare two parameter null spaces;
then add source and observational nuisances.

Keep batches, versions, inventory and sources.

Dot summary · 2026-10-09 · supplied by userBoosted Odds · v1

四 · 科研

2. 如何让 AI 读文章

选择输入格式,是在决定 AI 能直接得到哪些信息。

PDF · 保留页面版式

原始目标包括跨设备显示、交换和打印,重点是页面看起来一致。
读论文时还要恢复段落、公式与阅读顺序;适合核对原图、页码和印刷编号。

LaTeX · 直接给出数学

文字和数学表达可直接读取。
宏需要展开;自动公式编号与交叉引用需要经过排版才能确定。

HTML · 已展开的结构

arXiv 的 HTML 从 LaTeX 转换,提供章节、公式信息与引用链接。
让 AI 按章节阅读、按编号找公式,再连同前后文取出。

IV · Research

2. How to help AI read papers

The input format determines which information AI receives directly.

PDF · Page fidelity

Designed for reliable display, exchange and printing across systems.
Reading still requires recovering order and structure; use it to check figures, pages and printed labels.

LaTeX · Math source

Text and mathematical expressions are directly available.
Macros need expansion; automatic equation numbers and references need typesetting to be resolved.

HTML · Resolved structure

arXiv converts LaTeX to HTML with headings, equation information and reference links.
Read sections, locate equations by label, and retrieve surrounding context.

PDF · AdobeHTML · arXiv

四 · 科研 / 2. 如何让 AI 读文章

同一篇论文:LaTeX 与 HTML 源码

0911.3380v4 · Quasi-Single Field Inflation and Non-Gaussianities

LaTeX · turnTraj.tex

HTML · arXiv

作者的 LaTeX 源码与 arXiv 转换后的 HTML 源码。

IV · Research / 2. How to help AI read papers

One paper: LaTeX and HTML source

0911.3380v4 · Quasi-Single Field Inflation and Non-Gaussianities

LaTeX · turnTraj.tex

HTML · arXiv

The author’s LaTeX source and the HTML source generated by arXiv.

LaTeX · v4HTML · v4

四 · 科研 / 2. 如何让 AI 读文章

ARC:清洗 HTML,缓存后反复读取

把论文整理成有结构的资料,保留正文、公式和来源,供后续读取。

获取 HTML原始内容与来源
清洗与解析章节 · 公式 · 引用
保存缓存源文件 + 解析结果

清洗保留什么?

提取正文,排除网页导航等外壳。
从 MathML 中读取 TeX 公式,
保留编号、章节层级与前后文。

缓存怎样帮助再次阅读?

保存源文件指纹与解析结果,
再次读取时复用,避免重复下载和解析。
按章节或关键词取出所需内容。

IV · Research / 2. How to help AI read papers

ARC: parse HTML, cache it and read it again

Keep the paper’s structure, equations and source information for later reading.

Acquire HTMLOriginal content and source
Parse the articleSections · equations · references
Cache both formsSource + parsed document

What does parsing retain?

Extract the article, excluding site navigation.
Read TeX equations carried by MathML.
Keep labels, section hierarchy and context.

How does caching support rereading?

Store source digests and parsed content.
Reuse them instead of downloading and parsing again.
Retrieve the sections or passages needed.

ARC · arc-paperAC · ac-document

四 · 科研 / 2. 如何让 AI 读文章

清洗后怎样保存?MD、JSON 与 EPUB

有了“获取 → 清洗 → 保存”的思路,就可以让智能体实现自己的小工具。
同一份清洗结果,也可以导出不同形式。

Markdown · 便于直接读

人和模型都容易检查正文。
数学用 LaTeX;编号、引用和图片路径需要约定。

JSON · 便于精确调用

章节、公式、标签、来源分字段保存。
工具按需取出,再组织成模型的输入。

EPUB · 便于阅读与交换

把 XHTML、公式、图片和目录打包。
给模型时,再解包并取出需要的内容。

IV · Research / 2. How to help AI read papers

After parsing: MD, JSON or EPUB?

Once acquisition, parsing and storage are clear, an agent can build your own tool.
The same parsed content can be exported in several forms.

Markdown · Direct reading

Easy for people and models to inspect.
Use LaTeX for math; define conventions for labels, links and image paths.

JSON · Precise tool access

Store sections, equations, labels and sources as fields.
A tool selects fields and assembles the model input.

EPUB · Reading and exchange

Package XHTML, math, images and navigation.
Unpack and retrieve relevant content for the model.

EPUB · W3C

四 · 科研 / 2. 如何让 AI 读文章

ARC:让 AI 按需读取论文

ARC 为 AI 构造搜索与读取工具。
先在缓存中定位,再读取相关章节、公式和前后文,放入模型上下文。

搜索缓存全文

找命中段落与所在章节

arc-paper search-full-text \
  --term "isocurvaton" --context-lines 1 --limit 5

查看论文目录

得到章节标题与章节 ID

arc-paper get-table-of-contents \
  --reference 0911.3380 --source-format html

读取指定章节

只取出所选章节的全文

arc-paper get-section \
  --reference 0911.3380 --source-format html \
  "8 Conclusion and discussion"

定位公式

返回公式与附近文字

arc-paper search-equations \
  --reference 0911.3380 --source-format html \
  --term "1.2" --context-lines 8

第一条不指定论文,搜索已缓存的全文;其余命令以 0911.3380 为例。

IV · Research / 2. How to help AI read papers

ARC: tools for selective paper reading

ARC gives AI tools to search and read papers selectively.
Use the cache to locate a passage, then bring the relevant content into context.

Search cached papers

Find passages and sections

arc-paper search-full-text \
  --term "isocurvaton" --context-lines 1 --limit 5

Inspect the contents

Get titles and section IDs

arc-paper get-table-of-contents \
  --reference 0911.3380 --source-format html

Read one section

Read the complete section

arc-paper get-section \
  --reference 0911.3380 --source-format html \
  "8 Conclusion and discussion"

Locate an equation

Get math and nearby text

arc-paper search-equations \
  --reference 0911.3380 --source-format html \
  --term "1.2" --context-lines 8

No paper ID in the first command: search the cached corpus. The other commands target 0911.3380.

ARC · GitHubarc-paper · Manual

四 · 科研

3. 通过引文网络拓展文献

论文是节点,引用是有方向的边。从一篇起点论文,沿前序与后续工作展开。

后续论文谁引用了它?
引用 →
起点论文0911.3380
引用 →
前序论文它引用了谁?

取得两侧文献 → 用 DOI/arXiv ID 合并重复记录
逐层扩展,并保存每条引用边的来源。
沿网络找基础工作、研究分支与新进展,再读正文判断关联。

换研究领域,换数据源

高能物理INSPIRE HEP参考文献与后续被引论文
天文与天体物理NASA ADS按 bibcode 取得 reference、citation
跨学科OpenAlexreferenced_works 与引用该论文的记录
跨学科 · 含计算机科学Semantic Scholar学术图谱 API:references、citations
生命科学与医学Europe PMC直接查询参考文献与被引文献列表
按 DOI 追踪引用OpenCitations开放引文索引:查询引用两端的标识

接入时适配论文标识与接口;按领域覆盖范围和引用关系的完整程度选择数据源。

IV · Research

3. Expanding literature through citation networks

Papers are nodes; citations are directed edges. Expand backward and forward from a seed.

Later workCiting papers
Cites →
Seed paper0911.3380
Cites →
Earlier workCited papers

Retrieve both sides → merge records using DOI / arXiv ID.
Expand in steps; preserve the source of each citation edge.
Find foundations, branches and new work.
Read papers to assess relevance.

Change the source to match the field

High-energy physicsINSPIRE HEPReferences and papers citing a work
Astronomy / astrophysicsNASA ADSreference and citation, identified by bibcode
Across disciplinesOpenAlexreferenced_works and records citing a work
Cross-field · CSSemantic ScholarAcademic Graph API: references and citations
Life sciences / medicineEurope PMCLists of references and citing publications
DOI-based citation trackingOpenCitationsOpen citation index: identifiers at both ends

Adapt identifiers and API calls; choose by field coverage and completeness of citation links.

四 · 科研 / 3. 通过引文网络拓展文献

ARC 实例:0911.3380 的领域引文网络

92 篇论文 · 752 条引用边 · 选择节点或论文行查看详情

IV · Research / 3. Expanding literature through citation networks

ARC example: a domain citation network for 0911.3380

92 papers · 752 citation edges · Select a node or row for details

ARC

四 · 科研 / 3. 通过引文网络拓展文献

从引文网络到领域进展

固定起点论文与时间范围,先取得文献,再按研究问题组织进展。

确定范围0911.3380 · 2024 年以来
取得并缓存文献引用关系 · 元数据 · 正文
整理研究方向各方向的结果与关键论文
选一支继续深入逐篇读原文 · 提取证据

整理领域进展

按研究方向概述进展,列出各方向的相关论文。
核对每篇的标题、作者与 arXiv 编号;
生成 HTML 报告。

选定方向,继续追问

研究全形状搜索中的 CMB、LSS 与估计量系统误差。
逐篇阅读,列出各形状的约束数值;
使用原论文图表并注明来源。

IV · Research / 3. Expanding literature through citation networks

From a citation network to a field survey

Fix the seed and date range; collect papers, then organize progress by research question.

Set scope0911.3380 · Since 2024
Collect and cacheCitations · Metadata · Full text
Map directionsResults and key papers
Choose and deepenRead papers · Extract evidence

Organize recent progress

Group the papers into research directions; summarize each and list its papers.
Check titles, authors and arXiv IDs; produce an HTML report.

Choose a direction and investigate

Study full-shape searches combining CMB, LSS and estimator systematics.
Read each paper, give numerical bounds, and cite its original figures.

Original prompts

四 · 科研 / 3. 通过引文网络拓展文献

宇宙学对撞机:领域进展综述

2024 年初—2026 年 6 月 · 从引用 0911.3380 的论文中整理研究方向

IV · Research / 3. Expanding literature through citation networks

Cosmological collider: a survey of recent progress

January 2024–June 2026 · Directions synthesized from papers citing 0911.3380

四 · 科研 / 3. 通过引文网络拓展文献

选定一个方向:观测约束

从综述中的全形状搜索继续深入:读 9 篇论文,整理数值约束与 39 张原始图。

IV · Research / 3. Expanding literature through citation networks

Choose one direction: observational constraints

Deepen the full-shape direction: 9 papers, numerical bounds and 39 original figures.

四 · 科研 / 3. 通过引文网络拓展文献

同一问题的两份 Deep Research 报告

起点 0911.3380 · 2024 年以来的后续文献 · 2026 年 6 月原始报告

GPT Deep Research

Gemini Deep Research

IV · Research / 3. Expanding literature through citation networks

Two Deep Research reports on the same question

Seed 0911.3380 · Citing work since 2024 · Original reports from June 2026

GPT Deep Research

Gemini Deep Research

四 · 科研

4. 让 AI 提科研想法

前面的文献调研,给提出想法提供已有结果、可用方法和待解决的问题。

这次实际给出的任务

use arc, for research field arXiv:0911.3380, recommend idea: tree-level calculations of scalar correlation function, with the internal propagating field a massive scalar

限定领域与计算对象;
再说明什么问题值得做、希望得到什么结果。

ARC 准备的领域材料

关键论文
基础工作与最近邻结果
计算方法
SK 图解、微分方程、解析与数值工具
已解决的问题
标准的准单场暴胀三点函数
开放方向
新的条件、观测量或计算结论

研究经验可以写进任务:重要性、研究边界、可行路径和停止条件。

IV · Research

4. Generating research ideas with AI

The literature survey supplies known results, available methods and open questions.

The actual research request

use arc, for research field arXiv:0911.3380, recommend idea: tree-level calculations of scalar correlation function, with the internal propagating field a massive scalar

Specify the field and calculation target.
Then explain the significance and desired result.

Domain material prepared by ARC

Key papers
Foundations and closest results
Methods
SK diagrams, differential equations,
analytic and numerical tools
Known results
The standard QSFI bispectrum
Open directions
New regimes, observables or results

Put research judgment into the task: significance, scope, route and stopping criteria.

ARC · IdeasDomain briefOriginal requests

四 · 科研 / 4. 让 AI 提科研想法

提出、评审、修改

并行尝试不同候选。每条线集中改进一个具体研究问题。

研究意图
领域材料
判断准则
→
提出者
→
评审者

↶ 反馈后修改,再评审

提出者
→
评审者

↶ 反馈后修改,再评审

提出者
→
评审者

↶ 反馈后修改,再评审

→
候选汇总
人来选择

提出者:把想法变成计算

定义对象、假设和预期结果;
给出首个计算、核查办法与风险。

评审者:给出具体修改

查已有工作,检查意义、定义与可行性;
指出哪里需要修正,以及怎样修正。

保留各轮方案和反馈;每条线选取评分最高的已完成版本。

IV · Research / 4. Generating research ideas with AI

Propose, review and revise

Explore candidates in parallel. Each loop develops one concrete research question.

Research intent
Domain material
Review criteria
→
Proposer
→
Reviewer

↶ Revise from feedback; review again

Proposer
→
Reviewer

↶ Revise from feedback; review again

Proposer
→
Reviewer

↶ Revise from feedback; review again

→
Collect candidates
Human selection

Proposer: define a calculation

Specify the object, assumptions and result.
Give a first calculation, checks and risks.

Reviewer: request concrete changes

Check prior work, significance and feasibility.
Identify what needs repair and how.

Keep proposals and feedback; select each loop’s highest-scoring completed version.

ARC · Ideas

四 · 科研 / 4. 让 AI 提科研想法

新颖性与科学价值分开判断

“还没有人做过”与“做出来值得关注”,需要分别说明依据。

是否已有结果?

查最近邻论文、后续引文与更广的文献。
比较研究对象、假设、可观测量与核心结论;
指出具体差别。

完成以后有什么价值?

解决哪一个物理问题?
改变哪一种理解或计算能力?
结论能覆盖哪些有意义的情形?

实际评审:四点函数的基准结果已有计算

一个修改色散的重场方案,原先要比较三/四点函数的相位。
评审找到已有的基准计算,要求研究新增色散项带来的变化,
并先复现已有结果。

具体到“哪一部分是新贡献”,再判断这项贡献是否重要。

IV · Research / 4. Generating research ideas with AI

Novelty and scientific value

“Not yet done” and “worth doing” require different evidence.

Does the result already exist?

Read closest papers, citers and broader literature.
Compare objects, assumptions and observables;
identify the specific new conclusion.

What would the result contribute?

Which physical problem does it resolve?
What understanding or calculation does it enable?
Which meaningful cases does it cover?

Actual review: a baseline trispectrum was already known

A proposal for a massive field with modified dispersion compared three- and four-point phases.
The reviewer found a known baseline, narrowed the new claim to the added dispersion term,
and required reproduction of the baseline.

Identify the new contribution precisely, then assess its significance.

ARC · IdeasF04 · Review

四 · 科研 / 4. 让 AI 提科研想法

实际记录:五个候选、五轮评审

2026 年 6 月 3 日测试记录 · 打开原始方案,检查研究问题是否具体。

其中一个候选

精确处理强混合,求交换四点函数
在塌缩极限中的软指数。

要回答的问题

混合较强时,四点信号的极限行为
如何改变?哪些传播分支会留下信号?

评分轨迹

79 → 85 → 88 → 89 → 89

这是该次运行的评审分数。
阅读方案,仍要判断问题与路径。

IV · Research / 4. Generating research ideas with AI

Actual run: five candidates, five review rounds

Test run of 3 June 2026 · Inspect the original question and calculation plan.

One candidate

Treat strong mixing exactly; derive soft
indices of a collapsed exchange trispectrum.

The research question

How does strong mixing change the
limiting signal? Which branches survive?

Review scores

79 → 85 → 88 → 89 → 89

Scores from this historical run.
Assess the question and route in the proposal.

Original report

四 · 科研 / 4. 让 AI 提科研想法

收敛到值得做的第一个计算

每加一项方法或延伸,都问:去掉它,核心问题是否仍明确、可检验、有价值?

原方案:完整比较

计算四点函数,与三点函数组合;
扫描完整形状,比较不同传播机制。

→

评审后:先算决定性问题

先检查因子化是否已经固定三/四点关系。
若关系普适,给出证明;若有新信息,再继续算。

原始提案与反馈

人来判断下一步

是否值得投入?
首步能否给出决定性结果?
什么结果会使我们停止或改变方向?

讨论:评分上升,意味着问题改善了,
还是方案更会回应评审要求?

IV · Research / 4. Generating research ideas with AI

A first calculation worth doing

For each added method or extension: does the core question still work without it?

Initial proposal: a full comparison

Combine three- and four-point functions;
scan full shapes and compare mechanisms.

→

After review: test the decisive condition

First ask whether factorization fixes the relation.
Prove universality, or identify new information
before extending the calculation.

Original proposals and reviews

Human judgment of the next step

Is it worth pursuing?
Can the first calculation decide something?
What would make us stop or change direction?

Discuss: does a rising score mean a better problem,
or a better response to the reviewer?

ARC · IdeasF04 · Original rounds

四 · 科研

5. 实际科研例一

一个研究方向,怎样经过讨论、计算、验算和修改,形成论文?

  1. ARC 开发与测试

    基于 0911.3380 提研究想法

  2. 课题组讨论

    问大家:强混合方向是否可行?

  3. 发现相关新论文

    精确线性解帮助后续计算

  4. GPT-Pro 推进计算

    推导三点函数,生成数值图与代码

  5. ARC 与人验算

    独立核查,写下计算笔记

  6. 追问不懂的步骤

    让 AI 解释中间过程,再继续检查

  7. GPT 起草论文

    提供推导、数值结果与笔记

  8. 人复查、修改并投稿

    检查结论、推导与图像

IV · Research

5. Research case I

How did an idea develop through discussion, calculation and revision into a paper?

  1. ARC development and tests

    Propose ideas around 0911.3380

  2. Discuss with the group

    Is the strong-mixing direction feasible?

  3. Find a relevant new paper

    Exact linear solutions enable further work

  4. Calculate with GPT-Pro

    Derive the bispectrum; produce plots and code

  5. ARC and human checks

    Verify independently and write notes

  6. Ask about unclear steps

    Request intermediate explanations; check again

  7. Draft with GPT

    Supply derivations, results and notes

  8. Review, revise and submit

    Check claims, derivations and figures

Paper

四 · 科研 / 5. 实际科研例一

强混合:想法、讨论与新论文

5 月 31 日课题组群聊:讨论 AI 推荐的强混合研究方向
5 月 31 日 · 课题组讨论

开发 ARC 时测试提出研究想法

AI 推荐研究无质量场与有质量场的强混合。
我把方向发到群里:传播子能否解析求解,
或者数值算出后,用在后续关联函数计算中?

6 月 16 日:出现可用的精确线性解

Pushing the Primordial Frontier:
Exact Linear Solutions in Multifield Inflation

Huenupi、Muñoz、Palma、Sypsas · 2606.18248

论文给出两场系统的精确线性解,
可处理任意质量与混合强度。
这为进一步计算非高斯性提供了输入。

把这篇论文交给 GPT-Pro,补全推导细节,
再用解析模函数推进三点函数计算。

IV · Research / 5. Research case I

Strong mixing: idea, discussion and new paper

Group discussion on 31 May about an AI-proposed strong-mixing direction
31 May · research-group discussion

Testing research ideas during ARC development

AI suggested strong mixing of massless and massive fields.
I asked the group whether we could solve the propagator,
analytically or numerically, and use it in correlators.

16 June: exact linear solutions became available

Pushing the Primordial Frontier:
Exact Linear Solutions in Multifield Inflation

Huenupi, Muñoz, Palma, Sypsas · 2606.18248

The paper gives exact linear two-field solutions
for arbitrary masses and mixing strength.
These supply input for non-Gaussianity calculations.

Give the paper to GPT-Pro, expand the derivation,
then use the analytic modes to calculate the bispectrum.

Exact linear solutions · v1

四 · 科研 / 5. 实际科研例一

用 GPT-Pro 研究强混合

提供模型与解析解,继续计算三点函数,并取得绘图代码。

IV · Research / 5. Research case I

Exploring strong mixing with GPT-Pro

Supply the model and solution; calculate the three-point function and obtain plotting code.

Original conversation

四 · 科研 / 5. 实际科研例一

验算、记录与反复追问

人整理计算笔记,再用 ARC 复核笔记;看不懂的中间步骤,继续向 AI 问清楚。

复核人的计算笔记,修正其中错误

保留假设、推导和数值核查

让 AI 解释:用了什么恒等式?省略了哪些步骤?在哪些条件下成立?

IV · Research / 5. Research case I

Verification, notes and follow-up questions

Researchers organize calculation notes; ARC checks those notes. Ask AI about unclear steps.

Check and correct the researchers’ notes

Preserve assumptions, derivations and checks

Ask which identity was used, which steps were omitted, and when the result applies.

Calculation notes

四 · 科研 / 5. 实际科研例一

强混合:从聊天计算到论文

从 GPT 的计算继续推进:检查人的笔记,补全解析积分,并复核结论。

后续工作GPT 计算与人的笔记最终论文 · arXiv v2
复核人的笔记GPT 已给出传播子与软模系数;
人的笔记需修正归一化、符号和前因子。
修正自由模归一化与外腿定义;
软模系数前因子由 −λ-\lambda−λ 改为 −1/λ-1/\lambda−1/λ(§2–3)。
完成解析积分硬模积分已化为二维积分;
一般情形的解析求和仍未完成。
得到绝对收敛的单重级数;
推导尾项加速与稳定求和方法(§4.2、附录 D)。
重做大质量展开已追问幅度、相位与大质量极限;
人的笔记中的鞍点推导需重做。
识别主导贡献来自端点,完成 JWKB 展开;
给出下一阶修正;固定 λ\lambdaλ,要求 λ2/ρ≪1\lambda^2/\rho\ll1λ2/ρ≪1(§5、附录 E)。
加强独立验证已有耦合模方程的数值作图,
以及软模系数的数值核对。
解析级数、独立二维积分与 JWKB 三方比较;
四张图检验硬模积分及信号的幅度、相位(图 1–4)。

论文聚焦挤压极限的三点函数;聊天中提出的四点函数、化学势与质量分布留待后续。

IV · Research / 5. Research case I

Strong mixing: from chat to paper

Build on GPT’s calculation: check the researchers’ notes, complete the integrals, and verify the result.

Further workGPT calculation and human notesFinal paper · arXiv v2
Human notesGPT: propagators and soft coefficients.
Notes: fix normalization, signs, prefactors.
Correct mode normalization and external legs;
change the soft prefactor from −λ-\lambda−λ to −1/λ-1/\lambda−1/λ (§2–3).
Hard integralReduced to an exact 2D hard integral;
analytic summation was still unfinished.
Find an absolutely convergent single series;
accelerate its tail and stabilize sums (§4.2, App. D).
Mass limitGPT: requests for phase and mass limits;
human notes: revise the saddle derivation.
Identify the leading endpoint and derive JWKB;
Next correction: fixed λ\lambdaλ, λ2/ρ≪1\lambda^2/\rho\ll1λ2/ρ≪1 (§5, App. E).
ValidationCoupled-mode plots already existed;
soft coefficients had numerical checks.
Compare series, independent 2D integration and JWKB;
test integral and signal amplitude / phase (Figs. 1–4).

Focus: the squeezed bispectrum. Trispectra, chemical potentials and mass distributions remain future work.

Original conversationComparison sourcesPaper · v2

四 · 科研 / 5. 实际科研例一

GPT 起草论文,人复查、修改并投稿

强混合论文信息及 AI 贡献截图

IV · Research / 5. Research case I

GPT drafts; researchers review, revise and submit

Screenshot of the strong-mixing paper and AI contribution
Paper · v2

四 · 科研

6. 实际科研例二

标量化学势课题的人机协作

问题与文献

设定与校准

计算与审阅

解释与讨论

写作与修订

研究者

明确问题与机制

固定约定与近似

审阅推导与精度

提炼机制与讨论

确定主线与审阅

AI

检索与整理文献

推导设定与复现

计算、化简与核查

整理证据与反馈

写稿、作图与修订

←

讨论与反馈返回计算、审阅

研究者核对图谱、判断近似,逐段读懂并检查后再推进。

仅用 AI 计算的尝试:曾遗漏费曼图,部分关键近似未能自行完成。

IV · Research

6. Research case II

Human–AI collaboration on scalar chemical potential

Questions and literature

Setup and calibration

Calculation and review

Interpretation and discussion

Writing and revision

Researcher

Define questions
and mechanisms

Fix conventions
and approximations

Review derivations
and accuracy

Discuss the
mechanisms

Set the narrative
and review

AI

Find and organize
literature

Derive the setup;
reproduce results

Calculate, simplify
and check

Organize evidence
and feedback

Draft, plot
and revise

←

Discussion and feedback return to calculation and review

Researchers check diagrams and approximations, then understand and check each passage before proceeding.

An AI-only calculation attempt omitted Feynman diagrams
and could not complete some key approximations independently.

四 · 科研 / 6. 实际科研例二

直接交换图与对应积分

(a1)(a_1)(a1​)A+A_+A+​B−B_-B−​ksk_sks​k1k_1k1​k2k_2k2​k3k_3k3​k4k_4k4​ξ2σ~\xi^2\tilde{\sigma}ξ2σ~ξ2σ~†\xi^2\tilde{\sigma}^{\dagger}ξ2σ~†
T(a1),+−12∣34,→=α2Λ4∫−∞0dηA∫−∞0dηB aA4aB4×(ηAηB)iλD+−ks(A,B)K+1(A)K+2(A)K−3(B)K−4(B)\begin{aligned}\mathcal T_{(a_1),+-}^{12|34,\to}&=\frac{\alpha^2}{\Lambda^4}\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\,a_A^4a_B^4\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_B}\right)^{i\lambda}D_{+-}^{k_s}(A,B)K_+^1(A)K_+^2(A)K_-^3(B)K_-^4(B)\end{aligned}T(a1​),+−12∣34,→​​=Λ4α2​∫−∞0​dηA​∫−∞0​dηB​aA4​aB4​×(ηB​ηA​​)iλD+−ks​​(A,B)K+1​(A)K+2​(A)K−3​(B)K−4​(B)​
(a2)(a_2)(a2​)A+A_+A+​B−B_-B−​ksk_sks​ξ2σ~\xi^2\tilde{\sigma}ξ2σ~(∂ξ)2σ~†(\partial\xi)^2\tilde{\sigma}^{\dagger}(∂ξ)2σ~†
T(a2),+−12∣34,→=−2(1−c)αχ0Λ4∫−∞0dηA∫−∞0dηB aA4aB4×(ηAηB)iλD+−ks(A,B)K+1(A)K+2(A)P−34(B)\begin{aligned}\mathcal T_{(a_2),+-}^{12|34,\to}&=-\frac{2(1-c)\alpha\chi_0}{\Lambda^4}\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\,a_A^4a_B^4\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_B}\right)^{i\lambda}D_{+-}^{k_s}(A,B)K_+^1(A)K_+^2(A)\mathcal P_-^{34}(B)\end{aligned}T(a2​),+−12∣34,→​​=−Λ42(1−c)αχ0​​∫−∞0​dηA​∫−∞0​dηB​aA4​aB4​×(ηB​ηA​​)iλD+−ks​​(A,B)K+1​(A)K+2​(A)P−34​(B)​
(a3)(a_3)(a3​)A+A_+A+​B−B_-B−​ksk_sks​(∂ξ)2σ~(\partial\xi)^2\tilde{\sigma}(∂ξ)2σ~ξ2σ~†\xi^2\tilde{\sigma}^{\dagger}ξ2σ~†
T(a3),+−12∣34,→=−2(1−c)αχ0∗Λ4∫−∞0dηA∫−∞0dηB aA4aB4×(ηAηB)iλD+−ks(A,B)P+12(A)K−3(B)K−4(B)\begin{aligned}\mathcal T_{(a_3),+-}^{12|34,\to}&=-\frac{2(1-c)\alpha\chi_0^*}{\Lambda^4}\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\,a_A^4a_B^4\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_B}\right)^{i\lambda}D_{+-}^{k_s}(A,B)\mathcal P_+^{12}(A)K_-^3(B)K_-^4(B)\end{aligned}T(a3​),+−12∣34,→​​=−Λ42(1−c)αχ0∗​​∫−∞0​dηA​∫−∞0​dηB​aA4​aB4​×(ηB​ηA​​)iλD+−ks​​(A,B)P+12​(A)K−3​(B)K−4​(B)​
(a4)(a_4)(a4​)A+A_+A+​B−B_-B−​ksk_sks​(∂ξ)2σ~(\partial\xi)^2\tilde{\sigma}(∂ξ)2σ~(∂ξ)2σ~†(\partial\xi)^2\tilde{\sigma}^{\dagger}(∂ξ)2σ~†
T(a4),+−12∣34,→=4(1−c)2∣χ0∣2Λ4∫−∞0dηA∫−∞0dηB aA4aB4×(ηAηB)iλD+−ks(A,B)P+12(A)P−34(B)\begin{aligned}\mathcal T_{(a_4),+-}^{12|34,\to}&=\frac{4(1-c)^2|\chi_0|^2}{\Lambda^4}\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\,a_A^4a_B^4\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_B}\right)^{i\lambda}D_{+-}^{k_s}(A,B)\mathcal P_+^{12}(A)\mathcal P_-^{34}(B)\end{aligned}T(a4​),+−12∣34,→​​=Λ44(1−c)2∣χ0​∣2​∫−∞0​dηA​∫−∞0​dηB​aA4​aB4​×(ηB​ηA​​)iλD+−ks​​(A,B)P+12​(A)P−34​(B)​
Kai(A)≡Ka(ki;ηA),Dabq(A,B)≡Dab(q;ηA,ηB),aA=a(ηA)K_{\mathrm a}^{i}(A)\equiv K_{\mathrm a}(k_i;\eta_A),\qquad D_{\mathrm{ab}}^{q}(A,B)\equiv D_{\mathrm{ab}}(q;\eta_A,\eta_B),\qquad a_A=a(\eta_A)Kai​(A)≡Ka​(ki​;ηA​),Dabq​(A,B)≡Dab​(q;ηA​,ηB​),aA​=a(ηA​)
Paij(A)≡−aA−2 ⁣[Kai′(A)Kaj′(A)+ki ⁣⋅ ⁣kjKai(A)Kaj(A)],Ki′(A)=∂ηAKi(A)\mathcal P_{\mathrm a}^{ij}(A)\equiv-a_A^{-2}\!\left[K_{\mathrm a}^{i\prime}(A)K_{\mathrm a}^{j\prime}(A)+\mathbf k_i\!\cdot\!\mathbf k_j K_{\mathrm a}^{i}(A)K_{\mathrm a}^{j}(A)\right],\qquad K^{i\prime}(A)=\partial_{\eta_A}K^i(A)Paij​(A)≡−aA−2​[Kai′​(A)Kaj′​(A)+ki​⋅kj​Kai​(A)Kaj​(A)],Ki′(A)=∂ηA​​Ki(A)

IV · Research / 6. Research case II

Direct exchange diagrams and their integrals

(a1)(a_1)(a1​)A+A_+A+​B−B_-B−​ksk_sks​k1k_1k1​k2k_2k2​k3k_3k3​k4k_4k4​ξ2σ~\xi^2\tilde{\sigma}ξ2σ~ξ2σ~†\xi^2\tilde{\sigma}^{\dagger}ξ2σ~†
T(a1),+−12∣34,→=α2Λ4∫−∞0dηA∫−∞0dηB aA4aB4×(ηAηB)iλD+−ks(A,B)K+1(A)K+2(A)K−3(B)K−4(B)\begin{aligned}\mathcal T_{(a_1),+-}^{12|34,\to}&=\frac{\alpha^2}{\Lambda^4}\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\,a_A^4a_B^4\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_B}\right)^{i\lambda}D_{+-}^{k_s}(A,B)K_+^1(A)K_+^2(A)K_-^3(B)K_-^4(B)\end{aligned}T(a1​),+−12∣34,→​​=Λ4α2​∫−∞0​dηA​∫−∞0​dηB​aA4​aB4​×(ηB​ηA​​)iλD+−ks​​(A,B)K+1​(A)K+2​(A)K−3​(B)K−4​(B)​
(a2)(a_2)(a2​)A+A_+A+​B−B_-B−​ksk_sks​ξ2σ~\xi^2\tilde{\sigma}ξ2σ~(∂ξ)2σ~†(\partial\xi)^2\tilde{\sigma}^{\dagger}(∂ξ)2σ~†
T(a2),+−12∣34,→=−2(1−c)αχ0Λ4∫−∞0dηA∫−∞0dηB aA4aB4×(ηAηB)iλD+−ks(A,B)K+1(A)K+2(A)P−34(B)\begin{aligned}\mathcal T_{(a_2),+-}^{12|34,\to}&=-\frac{2(1-c)\alpha\chi_0}{\Lambda^4}\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\,a_A^4a_B^4\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_B}\right)^{i\lambda}D_{+-}^{k_s}(A,B)K_+^1(A)K_+^2(A)\mathcal P_-^{34}(B)\end{aligned}T(a2​),+−12∣34,→​​=−Λ42(1−c)αχ0​​∫−∞0​dηA​∫−∞0​dηB​aA4​aB4​×(ηB​ηA​​)iλD+−ks​​(A,B)K+1​(A)K+2​(A)P−34​(B)​
(a3)(a_3)(a3​)A+A_+A+​B−B_-B−​ksk_sks​(∂ξ)2σ~(\partial\xi)^2\tilde{\sigma}(∂ξ)2σ~ξ2σ~†\xi^2\tilde{\sigma}^{\dagger}ξ2σ~†
T(a3),+−12∣34,→=−2(1−c)αχ0∗Λ4∫−∞0dηA∫−∞0dηB aA4aB4×(ηAηB)iλD+−ks(A,B)P+12(A)K−3(B)K−4(B)\begin{aligned}\mathcal T_{(a_3),+-}^{12|34,\to}&=-\frac{2(1-c)\alpha\chi_0^*}{\Lambda^4}\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\,a_A^4a_B^4\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_B}\right)^{i\lambda}D_{+-}^{k_s}(A,B)\mathcal P_+^{12}(A)K_-^3(B)K_-^4(B)\end{aligned}T(a3​),+−12∣34,→​​=−Λ42(1−c)αχ0∗​​∫−∞0​dηA​∫−∞0​dηB​aA4​aB4​×(ηB​ηA​​)iλD+−ks​​(A,B)P+12​(A)K−3​(B)K−4​(B)​
(a4)(a_4)(a4​)A+A_+A+​B−B_-B−​ksk_sks​(∂ξ)2σ~(\partial\xi)^2\tilde{\sigma}(∂ξ)2σ~(∂ξ)2σ~†(\partial\xi)^2\tilde{\sigma}^{\dagger}(∂ξ)2σ~†
T(a4),+−12∣34,→=4(1−c)2∣χ0∣2Λ4∫−∞0dηA∫−∞0dηB aA4aB4×(ηAηB)iλD+−ks(A,B)P+12(A)P−34(B)\begin{aligned}\mathcal T_{(a_4),+-}^{12|34,\to}&=\frac{4(1-c)^2|\chi_0|^2}{\Lambda^4}\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\,a_A^4a_B^4\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_B}\right)^{i\lambda}D_{+-}^{k_s}(A,B)\mathcal P_+^{12}(A)\mathcal P_-^{34}(B)\end{aligned}T(a4​),+−12∣34,→​​=Λ44(1−c)2∣χ0​∣2​∫−∞0​dηA​∫−∞0​dηB​aA4​aB4​×(ηB​ηA​​)iλD+−ks​​(A,B)P+12​(A)P−34​(B)​
Kai(A)≡Ka(ki;ηA),Dabq(A,B)≡Dab(q;ηA,ηB),aA=a(ηA)K_{\mathrm a}^{i}(A)\equiv K_{\mathrm a}(k_i;\eta_A),\qquad D_{\mathrm{ab}}^{q}(A,B)\equiv D_{\mathrm{ab}}(q;\eta_A,\eta_B),\qquad a_A=a(\eta_A)Kai​(A)≡Ka​(ki​;ηA​),Dabq​(A,B)≡Dab​(q;ηA​,ηB​),aA​=a(ηA​)
Paij(A)≡−aA−2 ⁣[Kai′(A)Kaj′(A)+ki ⁣⋅ ⁣kjKai(A)Kaj(A)],Ki′(A)=∂ηAKi(A)\mathcal P_{\mathrm a}^{ij}(A)\equiv-a_A^{-2}\!\left[K_{\mathrm a}^{i\prime}(A)K_{\mathrm a}^{j\prime}(A)+\mathbf k_i\!\cdot\!\mathbf k_j K_{\mathrm a}^{i}(A)K_{\mathrm a}^{j}(A)\right],\qquad K^{i\prime}(A)=\partial_{\eta_A}K^i(A)Paij​(A)≡−aA−2​[Kai′​(A)Kaj′​(A)+ki​⋅kj​Kai​(A)Kaj​(A)],Ki′(A)=∂ηA​​Ki(A)

四 · 科研 / 6. 实际科研例二

单次混合图与对应积分

(b1)(b_1)(b1​)C±C_\pmC±​A+A_+A+​B−B_-B−​ksk_sks​k1k_1k1​k2k_2k2​k3k_3k3​k4k_4k4​ξσ~†\xi\tilde{\sigma}^{\dagger}ξσ~†ξ2σ~\xi^2\tilde{\sigma}ξ2σ~ξ˙σ~†σ~\dot{\xi}\tilde{\sigma}^{\dagger}\tilde{\sigma}ξ˙​σ~†σ~
T(b1),+−12∣34,→=−2(1−c)λα2Λ4∑c=±1c∫−∞0dηA∫−∞0dηB∫−∞0dηC aA4aB3aC4×(ηAηC)iλD+−ks(A,B)D−ck4(B,C)K+1(A)K+2(A)K−3′(B)Kc4(C)\begin{aligned}\mathcal T_{(b_1),+-}^{12|34,\to}&=-\frac{2(1-c)\lambda\alpha^2}{\Lambda^4}\sum_{\mathrm c=\pm1}\mathrm c\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\int_{-\infty}^{0}d\eta_C\,a_A^4a_B^3a_C^4\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_C}\right)^{i\lambda}D_{+-}^{k_s}(A,B)D_{-\mathrm c}^{k_4}(B,C)K_+^1(A)K_+^2(A)K_-^{3\prime}(B)K_{\mathrm c}^4(C)\end{aligned}T(b1​),+−12∣34,→​​=−Λ42(1−c)λα2​c=±1∑​c∫−∞0​dηA​∫−∞0​dηB​∫−∞0​dηC​aA4​aB3​aC4​×(ηC​ηA​​)iλD+−ks​​(A,B)D−ck4​​(B,C)K+1​(A)K+2​(A)K−3′​(B)Kc4​(C)​
(b2)(b_2)(b2​)C±C_\pmC±​A+A_+A+​B−B_-B−​ksk_sks​ξ˙σ~†\dot{\xi}\tilde{\sigma}^{\dagger}ξ˙​σ~†ξ2σ~\xi^2\tilde{\sigma}ξ2σ~ξ˙σ~†σ~\dot{\xi}\tilde{\sigma}^{\dagger}\tilde{\sigma}ξ˙​σ~†σ~
T(b2),+−12∣34,→=−4i(1−c)2λ2αχ0Λ4∑c=±1c∫−∞0dηA∫−∞0dηB∫−∞0dηC aA4aB3aC3×(ηAηC)iλD+−ks(A,B)D−ck4(B,C)K+1(A)K+2(A)K−3′(B)Kc4′(C)\begin{aligned}\mathcal T_{(b_2),+-}^{12|34,\to}&=-\frac{4i(1-c)^2\lambda^2\alpha\chi_0}{\Lambda^4}\sum_{\mathrm c=\pm1}\mathrm c\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\int_{-\infty}^{0}d\eta_C\,a_A^4a_B^3a_C^3\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_C}\right)^{i\lambda}D_{+-}^{k_s}(A,B)D_{-\mathrm c}^{k_4}(B,C)K_+^1(A)K_+^2(A)K_-^{3\prime}(B)K_{\mathrm c}^{4\prime}(C)\end{aligned}T(b2​),+−12∣34,→​​=−Λ44i(1−c)2λ2αχ0​​c=±1∑​c∫−∞0​dηA​∫−∞0​dηB​∫−∞0​dηC​aA4​aB3​aC3​×(ηC​ηA​​)iλD+−ks​​(A,B)D−ck4​​(B,C)K+1​(A)K+2​(A)K−3′​(B)Kc4′​(C)​
(b3)(b_3)(b3​)C±C_\pmC±​A+A_+A+​B−B_-B−​ksk_sks​ξσ~†\xi\tilde{\sigma}^{\dagger}ξσ~†(∂ξ)2σ~(\partial\xi)^2\tilde{\sigma}(∂ξ)2σ~ξ˙σ~†σ~\dot{\xi}\tilde{\sigma}^{\dagger}\tilde{\sigma}ξ˙​σ~†σ~
T(b3),+−12∣34,→=4(1−c)2λαχ0∗Λ4∑c=±1c∫−∞0dηA∫−∞0dηB∫−∞0dηC aA4aB3aC4×(ηAηC)iλD+−ks(A,B)D−ck4(B,C)P+12(A)K−3′(B)Kc4(C)\begin{aligned}\mathcal T_{(b_3),+-}^{12|34,\to}&=\frac{4(1-c)^2\lambda\alpha\chi_0^*}{\Lambda^4}\sum_{\mathrm c=\pm1}\mathrm c\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\int_{-\infty}^{0}d\eta_C\,a_A^4a_B^3a_C^4\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_C}\right)^{i\lambda}D_{+-}^{k_s}(A,B)D_{-\mathrm c}^{k_4}(B,C)\mathcal P_+^{12}(A)K_-^{3\prime}(B)K_{\mathrm c}^{4}(C)\end{aligned}T(b3​),+−12∣34,→​​=Λ44(1−c)2λαχ0∗​​c=±1∑​c∫−∞0​dηA​∫−∞0​dηB​∫−∞0​dηC​aA4​aB3​aC4​×(ηC​ηA​​)iλD+−ks​​(A,B)D−ck4​​(B,C)P+12​(A)K−3′​(B)Kc4​(C)​
(b4)(b_4)(b4​)C±C_\pmC±​A+A_+A+​B−B_-B−​ksk_sks​ξ˙σ~†\dot{\xi}\tilde{\sigma}^{\dagger}ξ˙​σ~†(∂ξ)2σ~(\partial\xi)^2\tilde{\sigma}(∂ξ)2σ~ξ˙σ~†σ~\dot{\xi}\tilde{\sigma}^{\dagger}\tilde{\sigma}ξ˙​σ~†σ~
T(b4),+−12∣34,→=8i(1−c)3λ2∣χ0∣2Λ4∑c=±1c∫−∞0dηA∫−∞0dηB∫−∞0dηC aA4aB3aC3×(ηAηC)iλD+−ks(A,B)D−ck4(B,C)P+12(A)K−3′(B)Kc4′(C)\begin{aligned}\mathcal T_{(b_4),+-}^{12|34,\to}&=\frac{8i(1-c)^3\lambda^2|\chi_0|^2}{\Lambda^4}\sum_{\mathrm c=\pm1}\mathrm c\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\int_{-\infty}^{0}d\eta_C\,a_A^4a_B^3a_C^3\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_C}\right)^{i\lambda}D_{+-}^{k_s}(A,B)D_{-\mathrm c}^{k_4}(B,C)\mathcal P_+^{12}(A)K_-^{3\prime}(B)K_{\mathrm c}^{4\prime}(C)\end{aligned}T(b4​),+−12∣34,→​​=Λ48i(1−c)3λ2∣χ0​∣2​c=±1∑​c∫−∞0​dηA​∫−∞0​dηB​∫−∞0​dηC​aA4​aB3​aC3​×(ηC​ηA​​)iλD+−ks​​(A,B)D−ck4​​(B,C)P+12​(A)K−3′​(B)Kc4′​(C)​

IV · Research / 6. Research case II

Single-mixing diagrams and their integrals

(b1)(b_1)(b1​)C±C_\pmC±​A+A_+A+​B−B_-B−​ksk_sks​k1k_1k1​k2k_2k2​k3k_3k3​k4k_4k4​ξσ~†\xi\tilde{\sigma}^{\dagger}ξσ~†ξ2σ~\xi^2\tilde{\sigma}ξ2σ~ξ˙σ~†σ~\dot{\xi}\tilde{\sigma}^{\dagger}\tilde{\sigma}ξ˙​σ~†σ~
T(b1),+−12∣34,→=−2(1−c)λα2Λ4∑c=±1c∫−∞0dηA∫−∞0dηB∫−∞0dηC aA4aB3aC4×(ηAηC)iλD+−ks(A,B)D−ck4(B,C)K+1(A)K+2(A)K−3′(B)Kc4(C)\begin{aligned}\mathcal T_{(b_1),+-}^{12|34,\to}&=-\frac{2(1-c)\lambda\alpha^2}{\Lambda^4}\sum_{\mathrm c=\pm1}\mathrm c\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\int_{-\infty}^{0}d\eta_C\,a_A^4a_B^3a_C^4\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_C}\right)^{i\lambda}D_{+-}^{k_s}(A,B)D_{-\mathrm c}^{k_4}(B,C)K_+^1(A)K_+^2(A)K_-^{3\prime}(B)K_{\mathrm c}^4(C)\end{aligned}T(b1​),+−12∣34,→​​=−Λ42(1−c)λα2​c=±1∑​c∫−∞0​dηA​∫−∞0​dηB​∫−∞0​dηC​aA4​aB3​aC4​×(ηC​ηA​​)iλD+−ks​​(A,B)D−ck4​​(B,C)K+1​(A)K+2​(A)K−3′​(B)Kc4​(C)​
(b2)(b_2)(b2​)C±C_\pmC±​A+A_+A+​B−B_-B−​ksk_sks​ξ˙σ~†\dot{\xi}\tilde{\sigma}^{\dagger}ξ˙​σ~†ξ2σ~\xi^2\tilde{\sigma}ξ2σ~ξ˙σ~†σ~\dot{\xi}\tilde{\sigma}^{\dagger}\tilde{\sigma}ξ˙​σ~†σ~
T(b2),+−12∣34,→=−4i(1−c)2λ2αχ0Λ4∑c=±1c∫−∞0dηA∫−∞0dηB∫−∞0dηC aA4aB3aC3×(ηAηC)iλD+−ks(A,B)D−ck4(B,C)K+1(A)K+2(A)K−3′(B)Kc4′(C)\begin{aligned}\mathcal T_{(b_2),+-}^{12|34,\to}&=-\frac{4i(1-c)^2\lambda^2\alpha\chi_0}{\Lambda^4}\sum_{\mathrm c=\pm1}\mathrm c\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\int_{-\infty}^{0}d\eta_C\,a_A^4a_B^3a_C^3\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_C}\right)^{i\lambda}D_{+-}^{k_s}(A,B)D_{-\mathrm c}^{k_4}(B,C)K_+^1(A)K_+^2(A)K_-^{3\prime}(B)K_{\mathrm c}^{4\prime}(C)\end{aligned}T(b2​),+−12∣34,→​​=−Λ44i(1−c)2λ2αχ0​​c=±1∑​c∫−∞0​dηA​∫−∞0​dηB​∫−∞0​dηC​aA4​aB3​aC3​×(ηC​ηA​​)iλD+−ks​​(A,B)D−ck4​​(B,C)K+1​(A)K+2​(A)K−3′​(B)Kc4′​(C)​
(b3)(b_3)(b3​)C±C_\pmC±​A+A_+A+​B−B_-B−​ksk_sks​ξσ~†\xi\tilde{\sigma}^{\dagger}ξσ~†(∂ξ)2σ~(\partial\xi)^2\tilde{\sigma}(∂ξ)2σ~ξ˙σ~†σ~\dot{\xi}\tilde{\sigma}^{\dagger}\tilde{\sigma}ξ˙​σ~†σ~
T(b3),+−12∣34,→=4(1−c)2λαχ0∗Λ4∑c=±1c∫−∞0dηA∫−∞0dηB∫−∞0dηC aA4aB3aC4×(ηAηC)iλD+−ks(A,B)D−ck4(B,C)P+12(A)K−3′(B)Kc4(C)\begin{aligned}\mathcal T_{(b_3),+-}^{12|34,\to}&=\frac{4(1-c)^2\lambda\alpha\chi_0^*}{\Lambda^4}\sum_{\mathrm c=\pm1}\mathrm c\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\int_{-\infty}^{0}d\eta_C\,a_A^4a_B^3a_C^4\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_C}\right)^{i\lambda}D_{+-}^{k_s}(A,B)D_{-\mathrm c}^{k_4}(B,C)\mathcal P_+^{12}(A)K_-^{3\prime}(B)K_{\mathrm c}^{4}(C)\end{aligned}T(b3​),+−12∣34,→​​=Λ44(1−c)2λαχ0∗​​c=±1∑​c∫−∞0​dηA​∫−∞0​dηB​∫−∞0​dηC​aA4​aB3​aC4​×(ηC​ηA​​)iλD+−ks​​(A,B)D−ck4​​(B,C)P+12​(A)K−3′​(B)Kc4​(C)​
(b4)(b_4)(b4​)C±C_\pmC±​A+A_+A+​B−B_-B−​ksk_sks​ξ˙σ~†\dot{\xi}\tilde{\sigma}^{\dagger}ξ˙​σ~†(∂ξ)2σ~(\partial\xi)^2\tilde{\sigma}(∂ξ)2σ~ξ˙σ~†σ~\dot{\xi}\tilde{\sigma}^{\dagger}\tilde{\sigma}ξ˙​σ~†σ~
T(b4),+−12∣34,→=8i(1−c)3λ2∣χ0∣2Λ4∑c=±1c∫−∞0dηA∫−∞0dηB∫−∞0dηC aA4aB3aC3×(ηAηC)iλD+−ks(A,B)D−ck4(B,C)P+12(A)K−3′(B)Kc4′(C)\begin{aligned}\mathcal T_{(b_4),+-}^{12|34,\to}&=\frac{8i(1-c)^3\lambda^2|\chi_0|^2}{\Lambda^4}\sum_{\mathrm c=\pm1}\mathrm c\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\int_{-\infty}^{0}d\eta_C\,a_A^4a_B^3a_C^3\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_C}\right)^{i\lambda}D_{+-}^{k_s}(A,B)D_{-\mathrm c}^{k_4}(B,C)\mathcal P_+^{12}(A)K_-^{3\prime}(B)K_{\mathrm c}^{4\prime}(C)\end{aligned}T(b4​),+−12∣34,→​​=Λ48i(1−c)3λ2∣χ0​∣2​c=±1∑​c∫−∞0​dηA​∫−∞0​dηB​∫−∞0​dηC​aA4​aB3​aC3​×(ηC​ηA​​)iλD+−ks​​(A,B)D−ck4​​(B,C)P+12​(A)K−3′​(B)Kc4′​(C)​

四 · 科研 / 6. 实际科研例二

四阶顶点与混合图的对应积分

A+A_+A+​B−B_-B−​k4k_4k4​(dξ)(d_\xi)(dξ​)ξ3σ~\xi^3\tilde{\sigma}ξ3σ~ξσ~†\xi\tilde{\sigma}^{\dagger}ξσ~†
T(dξ),+−123∣4,→=−α2Λ4∫−∞0dηA∫−∞0dηB aA4aB4×(ηAηB)iλD+−k4(A,B)K+1(A)K+2(A)K+3(A)K−4(B)\begin{aligned}\mathcal T_{(d_\xi),+-}^{123|4,\to}&=-\frac{\alpha^2}{\Lambda^4}\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\,a_A^4a_B^4\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_B}\right)^{i\lambda}D_{+-}^{k_4}(A,B)K_+^1(A)K_+^2(A)K_+^3(A)K_-^4(B)\end{aligned}T(dξ​),+−123∣4,→​​=−Λ4α2​∫−∞0​dηA​∫−∞0​dηB​aA4​aB4​×(ηB​ηA​​)iλD+−k4​​(A,B)K+1​(A)K+2​(A)K+3​(A)K−4​(B)​
A+A_+A+​B−B_-B−​k4k_4k4​(dξ˙)(d_{\dot{\xi}})(dξ˙​​)ξ3σ~\xi^3\tilde{\sigma}ξ3σ~ξ˙σ~†\dot{\xi}\tilde{\sigma}^{\dagger}ξ˙​σ~†
T(dξ˙),+−123∣4,→=−2i(1−c)λαχ0Λ4∫−∞0dηA∫−∞0dηB aA4aB3×(ηAηB)iλD+−k4(A,B)K+1(A)K+2(A)K+3(A)K−4′(B)\begin{aligned}\mathcal T_{(d_{\dot{\xi}}),+-}^{123|4,\to}&=-\frac{2i(1-c)\lambda\alpha\chi_0}{\Lambda^4}\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\,a_A^4a_B^3\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_B}\right)^{i\lambda}D_{+-}^{k_4}(A,B)K_+^1(A)K_+^2(A)K_+^3(A)K_-^{4\prime}(B)\end{aligned}T(dξ˙​​),+−123∣4,→​​=−Λ42i(1−c)λαχ0​​∫−∞0​dηA​∫−∞0​dηB​aA4​aB3​×(ηB​ηA​​)iλD+−k4​​(A,B)K+1​(A)K+2​(A)K+3​(A)K−4′​(B)​
A+A_+A+​B±B_\pmB±​C±C_\pmC±​k3k_3k3​k4k_4k4​(eξξ)(e_{\xi\xi})(eξξ​)ξσ~\xi\tilde{\sigma}ξσ~(∂ξ)2σ~†σ~(\partial\xi)^2\tilde{\sigma}^{\dagger}\tilde{\sigma}(∂ξ)2σ~†σ~ξσ~†\xi\tilde{\sigma}^{\dagger}ξσ~†
T(eξξ),+12∣34,→=−2i(1−c)α2Λ4∑b,c=±1bc∫−∞0dηA∫−∞0dηB∫−∞0dηC aA4aB4aC4×(ηBηC)iλDb+k3(B,A)D+ck4(A,C)P+12(A)Kb3(B)Kc4(C)\begin{aligned}\mathcal T_{(e_{\xi\xi}),+}^{12|34,\to}&=-\frac{2i(1-c)\alpha^2}{\Lambda^4}\sum_{\mathrm b,\mathrm c=\pm1}\mathrm{bc}\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\int_{-\infty}^{0}d\eta_C\,a_A^4a_B^4a_C^4\\[-2pt]&\quad\times \left(\frac{\eta_B}{\eta_C}\right)^{i\lambda}D_{\mathrm b+}^{k_3}(B,A)D_{+\mathrm c}^{k_4}(A,C)\mathcal P_+^{12}(A)K_{\mathrm b}^3(B)K_{\mathrm c}^4(C)\end{aligned}T(eξξ​),+12∣34,→​​=−Λ42i(1−c)α2​b,c=±1∑​bc∫−∞0​dηA​∫−∞0​dηB​∫−∞0​dηC​aA4​aB4​aC4​×(ηC​ηB​​)iλDb+k3​​(B,A)D+ck4​​(A,C)P+12​(A)Kb3​(B)Kc4​(C)​

IV · Research / 6. Research case II

Quartic vertices, mixing diagrams and their integrals

A+A_+A+​B−B_-B−​k4k_4k4​(dξ)(d_\xi)(dξ​)ξ3σ~\xi^3\tilde{\sigma}ξ3σ~ξσ~†\xi\tilde{\sigma}^{\dagger}ξσ~†
T(dξ),+−123∣4,→=−α2Λ4∫−∞0dηA∫−∞0dηB aA4aB4×(ηAηB)iλD+−k4(A,B)K+1(A)K+2(A)K+3(A)K−4(B)\begin{aligned}\mathcal T_{(d_\xi),+-}^{123|4,\to}&=-\frac{\alpha^2}{\Lambda^4}\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\,a_A^4a_B^4\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_B}\right)^{i\lambda}D_{+-}^{k_4}(A,B)K_+^1(A)K_+^2(A)K_+^3(A)K_-^4(B)\end{aligned}T(dξ​),+−123∣4,→​​=−Λ4α2​∫−∞0​dηA​∫−∞0​dηB​aA4​aB4​×(ηB​ηA​​)iλD+−k4​​(A,B)K+1​(A)K+2​(A)K+3​(A)K−4​(B)​
A+A_+A+​B−B_-B−​k4k_4k4​(dξ˙)(d_{\dot{\xi}})(dξ˙​​)ξ3σ~\xi^3\tilde{\sigma}ξ3σ~ξ˙σ~†\dot{\xi}\tilde{\sigma}^{\dagger}ξ˙​σ~†
T(dξ˙),+−123∣4,→=−2i(1−c)λαχ0Λ4∫−∞0dηA∫−∞0dηB aA4aB3×(ηAηB)iλD+−k4(A,B)K+1(A)K+2(A)K+3(A)K−4′(B)\begin{aligned}\mathcal T_{(d_{\dot{\xi}}),+-}^{123|4,\to}&=-\frac{2i(1-c)\lambda\alpha\chi_0}{\Lambda^4}\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\,a_A^4a_B^3\\[-2pt]&\quad\times \left(\frac{\eta_A}{\eta_B}\right)^{i\lambda}D_{+-}^{k_4}(A,B)K_+^1(A)K_+^2(A)K_+^3(A)K_-^{4\prime}(B)\end{aligned}T(dξ˙​​),+−123∣4,→​​=−Λ42i(1−c)λαχ0​​∫−∞0​dηA​∫−∞0​dηB​aA4​aB3​×(ηB​ηA​​)iλD+−k4​​(A,B)K+1​(A)K+2​(A)K+3​(A)K−4′​(B)​
A+A_+A+​B±B_\pmB±​C±C_\pmC±​k3k_3k3​k4k_4k4​(eξξ)(e_{\xi\xi})(eξξ​)ξσ~\xi\tilde{\sigma}ξσ~(∂ξ)2σ~†σ~(\partial\xi)^2\tilde{\sigma}^{\dagger}\tilde{\sigma}(∂ξ)2σ~†σ~ξσ~†\xi\tilde{\sigma}^{\dagger}ξσ~†
T(eξξ),+12∣34,→=−2i(1−c)α2Λ4∑b,c=±1bc∫−∞0dηA∫−∞0dηB∫−∞0dηC aA4aB4aC4×(ηBηC)iλDb+k3(B,A)D+ck4(A,C)P+12(A)Kb3(B)Kc4(C)\begin{aligned}\mathcal T_{(e_{\xi\xi}),+}^{12|34,\to}&=-\frac{2i(1-c)\alpha^2}{\Lambda^4}\sum_{\mathrm b,\mathrm c=\pm1}\mathrm{bc}\int_{-\infty}^{0}d\eta_A\int_{-\infty}^{0}d\eta_B\int_{-\infty}^{0}d\eta_C\,a_A^4a_B^4a_C^4\\[-2pt]&\quad\times \left(\frac{\eta_B}{\eta_C}\right)^{i\lambda}D_{\mathrm b+}^{k_3}(B,A)D_{+\mathrm c}^{k_4}(A,C)\mathcal P_+^{12}(A)K_{\mathrm b}^3(B)K_{\mathrm c}^4(C)\end{aligned}T(eξξ​),+12∣34,→​​=−Λ42i(1−c)α2​b,c=±1∑​bc∫−∞0​dηA​∫−∞0​dηB​∫−∞0​dηC​aA4​aB4​aC4​×(ηC​ηB​​)iλDb+k3​​(B,A)D+ck4​​(A,C)P+12​(A)Kb3​(B)Kc4​(C)​

五 · 报告、教学与其他工作

提供材料与方法,
整合成文档、课件和申请书。

1.用 AI 准备 HTML 报告2.用 AI 准备 Slidev 报告3.课程录像的处理4.修复 Coleman 视频5.出考试题6.用 AI 辅助听报告和开会7.经费申请

V · Reports, teaching and other work

Supply materials and methods to create documents, teaching resources and applications.

1.Preparing HTML reports with AI2.Preparing Slidev reports with AI3.Processing lecture recordings4.Restoring Coleman’s lectures5.Designing exam questions6.AI support for talks and conferences7.Grant applications

五 · 报告、教学与其他工作

1. 用 AI 准备 HTML 报告

这份报告从研究者提供的内容纲要开始。
智能体查资料、组织页面、实现交互;人逐页判断内容与讲述是否合适。

给内容与参考

受众、主题、自己的工程,
以及已有报告的设计。

做出页面

把原理与实例放在一起;
加入源码、截图与交互。

逐页打磨

改论点、例子、语气与版式;
把反复出现的要求写成规则。

构建与检查

从源文件生成 HTML;
检查双语、排版与操作。

105条制作与修改要求
88个外部来源链接
31个来源域名

统计截至本节加入前:从首次要求制作开始计用户消息;外部链接按正文来源栏去重。

好的内容、具体的反馈和可保存的规则,共同决定报告的质量。

V · Reports, teaching and other work

1. Preparing HTML reports with AI

This report began with a researcher’s outline.
The agent gathered evidence and built the pages; the author judged the content and narrative.

Supply content and references

Audience, topics, personal projects
and an existing visual reference.

Build the pages

Connect concepts and examples;
add code, images and interaction.

Refine page by page

Revise claims, examples, tone and layout;
preserve recurring decisions as rules.

Build and inspect

Generate HTML from source;
check both languages and controls.

105creation and revision messages
88external source URLs
31source domains

Before this section: user messages since the first creation request; distinct URLs in slide source fields.

Good content, specific feedback and persistent rules shape the result.

Authoring record

五 · 报告、教学与其他工作 / 1. 用 AI 准备 HTML 报告

从初始提示词到逐页修改

先初始化项目规则,再给出内容纲要并开始制作,随后根据实际页面修改。
例如:补回原理,再讲实例;删掉不服务于讲述的内容;让标题、目录和页眉一致。

V · Reports, teaching and other work / 1. Preparing HTML reports with AI

From the initial prompt to page-by-page revision

Initialize project rules, supply the outline, then build and revise the rendered pages.
Examples: restore the concepts, remove irrelevant content, and unify headings and navigation.

Original messages

五 · 报告、教学与其他工作 / 1. 用 AI 准备 HTML 报告

把参考、规则与素材留在项目里

参考报告提供暖白画布、橘色强调、双语切换、导航与证据窗口。
这些做法落实到本项目的文件中,下次继续修改时仍能找到。

规则 · AGENTS.md

记录设计色值、同行语气、名称统一、公式排版和备注约定。
同时记录参考目录与资源地图,供智能体按需查阅。

素材 · resources/

保存实际使用的截图、视频、源码、原始提示词与来源核对记录。
字体与 KaTeX 也保存在本地;页面引用相对路径。

源文件与构建 · scripts/

内容按主题拆成 Python 模块;CSS 管版式,JavaScript 管交互。
build_training.py 生成网页,verify_training.cjs 检查真实浏览器中的效果。

人看页面,智能体改源文件;保留材料与构建方法,报告就能持续演化。

V · Reports, teaching and other work / 1. Preparing HTML reports with AI

Keep references, rules and assets in the project

The reference report supplied a paper canvas, orange accents, language switching and evidence windows.
Those choices now live in this project’s files and remain available for later edits.

Rules · AGENTS.md

Colors, tone, consistent naming, mathematical typesetting and notes policy.
A resource map also tells the agent where to find reference material.

Assets · resources/

The images, videos, code, original prompts and source audits actually used.
Fonts and KaTeX are local; pages use relative asset paths.

Source and build · scripts/

Topic modules hold content; CSS handles layout and JavaScript interaction.
build_training.py generates HTML; verify_training.cjs checks the rendered browser result.

The author reviews pages; the agent edits source. Preserve the materials and the build process.

Project rulesReference reportBuild script

五 · 报告、教学与其他工作 / 1. 用 AI 准备 HTML 报告

资料怎样进入报告?

先从自己的工程、计算记录和教学材料找实例,再查原始论文、数据与工具文档。
用来源说明机制,用原始产物展示做法;能复现的交互则直接嵌入页面。

V · Reports, teaching and other work / 1. Preparing HTML reports with AI

How do sources enter the report?

Start with personal projects, calculation records and teaching material; then consult primary sources.
Documents explain mechanisms, original artifacts show practice, and reproducible demos run in the page.

Frozen 105-slide sources

五 · 报告、教学与其他工作

2. 用 AI 准备 Slidev 报告

Slidev 用 Markdown 组织页面,也能插入 HTML 与 Vue 组件。
PHYS1002:文字和公式直接写,火星逆行则用真实轨道数据做成可拖动的图。

这一页的原始 Markdown

同一个组件的可操作效果

六个章节各有 Markdown 源文件;共享组件、样式和翻译字典可以复用。

V · Reports, teaching and other work

2. Preparing Slidev reports with AI

Slidev organizes pages in Markdown and accepts HTML and Vue components.
PHYS1002: write prose and equations directly; use real ephemerides for an interactive retrograde-motion plot.

The original slide Markdown

The same interactive component

Six chapters have separate Markdown sources; components, styles and translation catalogs are shared.

PHYS1002 · source auditSlidev · syntaxJPL Horizons

五 · 报告、教学与其他工作 / 2. 用 AI 准备 Slidev 报告

一次翻页,两种语言同步投影

演讲者视图

教师看当前页、下一页与讲稿。
在演讲者视图翻页,其他展示窗口同步跟随。

两个展示窗口

一个选中文,一个选英文,
放到两个投影仪上。
同一页内容,按各自语言显示。

怎样实现

Slidev 提供演讲者视图与翻页同步;课程项目的翻译字典和语言组件决定每个窗口显示哪种语言。

课堂实录:MSDM5051。PHYS1002 使用同一套语言组件。

V · Reports, teaching and other work / 2. Preparing Slidev reports with AI

One navigation action, two synchronized languages

Presenter view

The teacher sees the current slide,
next slide and notes.
Other windows follow navigation.

Two audience windows

Select Chinese in one and English in the other; put them on separate projectors.

Implementation

Slidev supplies presenter mode and navigation sync. The course’s translation catalog and language component choose each window’s language.

Classroom recording: MSDM5051. PHYS1002 uses the same language component.

Slidev · presenter modeCourse implementation

五 · 报告、教学与其他工作 / 2. 用 AI 准备 Slidev 报告

程序在页面上修改、运行和讨论

MSDM5051:先预测,再运行

学生判断程序会输出什么;
改变条件或数据,再运行,
把差别直接用于讨论。

运行代码块的写法

```py {monaco-run} {autorun:false}
print(...)
```

Python 是课程扩展

通过 python-runner 插件运行。
PHYS1002 当前未启用这一功能,
按内容需要选择组件。

V · Reports, teaching and other work / 2. Preparing Slidev reports with AI

Edit, run and discuss code on the slide

MSDM5051: predict, then run

Students predict the output, change a condition or the data, then run again and discuss the difference.

Runnable block notation

```py {monaco-run} {autorun:false}
print(...)
```

Python is an extension

The course uses python-runner.
PHYS1002 currently leaves this off;
choose components for the content.

Slidev · code runnersCourse runner convention

五 · 报告、教学与其他工作 / 2. 用 AI 准备 Slidev 报告

怎样选择制作幻灯片的方式?

我的做法:用网页技术承载可编辑内容与交互,把生成图像用于插图和视觉探索。

方式适合做什么优势需要付出的代价
PPTX常规汇报、与同事协作熟悉的编辑与演讲流程;
便于交换、批注和手工微调。
复杂交互往往另做;
AI 自动生成的版式仍要细调。
Slidev连续教学、代码与公式Markdown 写内容;演讲者视图、
同步翻页与组件可以复用。
需要维护 Node 项目与组件;
双语、Python 按需接扩展。
HTML定制报告、数据与长文档能精确控制版式和交互;
滚动窗口、搜索、小游戏都可嵌入。
导航、备注、同步等功能,
需要自己实现与检查。
直接生图插图、漫画、视觉草稿很快探索画面与视觉风格。文字和公式不易精确修改;
不能直接承担交互。

先确定要展示什么、要怎样讲,再选择文件格式。

V · Reports, teaching and other work / 2. Preparing Slidev reports with AI

Choosing a slide format

My approach: web technologies for editable content and interaction; generated images for visuals.

FormatBest suited toStrengthsWork required
PPTXTalks and collaborationFamiliar editing and presenting; easy review and manual adjustment.Extra tools for interaction; layouts need refinement.
SlidevTeaching, code and equationsMarkdown, presenter view, synchronized navigation and reusable components.Maintain Node and components; add languages and Python as needed.
HTMLCustom reports and dataPrecise layout and interaction; embed scrolling, search and games.Build and test navigation, notes and synchronization.
Generated imagesIllustrations and visual draftsExplore compositions and styles quickly.Text and formulas are harder to edit; interaction needs code.

Choose the content and presentation behavior first, then the format.

Author’s format analysisSlidev

五 · 报告、教学与其他工作

3. 课程录像的处理

过去给学生一整段一个多小时的录像;现在按主题提供片段、摘要和双语转写。
PHYS1002 · 10 月 7 日:12 个主题,学生可以先找内容,再展开文字阅读。

V · Reports, teaching and other work

3. Processing lecture recordings

A recording longer than an hour becomes topic clips, summaries and bilingual transcripts.
PHYS1002 · 7 October: 12 topics; students find the relevant content and expand its transcript.

Canvas · 1007Local page source

五 · 报告、教学与其他工作 / 3. 课程录像的处理

转写是多媒体链条的核心

让 AI 先转写,保存每句话的时间,再围绕文本决定怎样剪、怎样展示。
PHYS1002 的实际流程:faster-whisper large-v3 → 科学术语校对 → 按完整论点分段。

原始录像与音频↓

校对后的时间戳转写

一句话说了什么 · 在原录像的什么时间

剪辑与课件匹配

依论点选择起止时间,
FFmpeg 剪辑、拼接与叠加。

摘要与双语字幕

同一段文本生成标题、摘要,
翻译后对齐到片段时间。

网页与搜索

目录、关键词、转写句子,
都能接到相应时间点。

AI 判断内容:选择主题、改术语、写摘要。
脚本执行:按清单生成视频、字幕与网页。

检查时间映射:剪掉休息或拼接片段后,
原录像时间与新片段时间必须重新对应。

V · Reports, teaching and other work / 3. Processing lecture recordings

The transcript connects the multimedia workflow

Transcribe first, preserve sentence timings, then use the text to plan editing and presentation.
PHYS1002: faster-whisper large-v3 → scientific proofreading → coherent topic boundaries.

Original video and audio↓

Proofread timestamped transcript

What was said · where it occurs in the original recording

Clips and slide matching

Choose ranges by argument;
FFmpeg cuts, joins and overlays.

Summaries and subtitles

Generate titles and summaries;
align translations to clip time.

Web pages and search

Contents, keywords and sentences
link back to time positions.

AI handles content: topics, terms and summaries.
Scripts execute: videos, subtitles and HTML.

Check time mapping: after cuts and joins,
source time must map to the new clip timeline.

PHYS1002 · workflowfaster-whisperFFmpeg

五 · 报告、教学与其他工作 / 3. 课程录像的处理

从一门课扩展到可搜索的课程资料

同一方法用于温伯格量子场论、Srednicki 量子场论和温伯格广义相对论。
下面可搜索温伯格量子场论全部 23 章的转写;试搜“重整化”,结果带原文与视频时间链接。

V · Reports, teaching and other work / 3. Processing lecture recordings

From one lecture to searchable course material

The approach also serves Weinberg QFT, Srednicki QFT and Weinberg general relativity.
Search the transcript of all 23 Weinberg QFT chapters below; try “重整化” for passages and timed links.

All coursesLive course search

五 · 报告、教学与其他工作

4. 修复 Coleman 视频

原声讲解仍有价值,黑板却难以读清。
结合转写、教材与笔记重建公式,把讲到的部分同步突出。

原始黑板

Coleman 原始录像中的黑板

重建公式与同步高亮

同一段指标升降讲解的重建公式

目标是恢复学生理解推导所需的信息:清晰公式、讲解文本与时间对应。

V · Reports, teaching and other work

4. Restoring Coleman’s lectures

The original explanation remains valuable, but the board is hard to read.
Reconstruct equations from the transcript, textbook and notes; highlight the part being discussed.

Original blackboard

Blackboard from the original Coleman recording

Rebuilt equations and highlights

Rebuilt equations for the same passage on raising and lowering indices

Restore what students need to follow the derivation: readable equations, text and timing.

Teaching evidence

五 · 报告、教学与其他工作 / 4. 修复 Coleman 视频

保留原声,重建可读的推导画面

先建立文本依据

转写原声并校对术语;
用教材、笔记与黑板画面
核对公式和讲解顺序。

再重建画面

把公式排成清晰页面,
按时间戳突出当前步骤;
配上校对后的中文字幕。

最后检查同步

公式出现、高亮与字幕,
要对应正在讲的内容。
完整重制视频已公开。

V · Reports, teaching and other work / 4. Restoring Coleman’s lectures

Keep the audio; rebuild the derivation visually

Establish the text

Transcribe and proofread the audio.
Check equations and their order against the textbook, notes and board.

Rebuild the visual

Typeset clear equations.
Highlight each step by timestamp;
add proofread Chinese subtitles.

Check synchronization

Equations, highlights and subtitles should match the spoken explanation.
The full remake is public.

Full Coleman remake

五 · 报告、教学与其他工作

5. 出考试题

PHYS1002:把课程材料与教师判断交给智能体,逐题命题,再平衡组卷。

材料给出命题的尺度

往年试卷 → 题型与难度

英文五选一;参照概念题与估算题的尺度。

课件+录音转写 → 教学范围

课件给出模型;转写界定实际讲授范围。

考试要求 → 值得考的理解

模型迁移、科学判断与有意义的数量级估算。

上次筛题批注 → 教师偏好

第二次先读上次“好/可/不要”,再按此出题。

从候选题到两份正式卷

  1. 智能体:逐题生成 80 道候选题

    边解边改;保存双语题面、答案与考点。

  2. 教师:在中文稿上标“好/可/不要”

    快速判断物理内容,附上具体修改意见。

  3. 智能体:主卷、备用卷各 25 题

    好题优先,兼顾覆盖与难度;复查答案与翻译。

  4. 教师:逐题审核两份英文卷与答案

    确认题面、选项、答案及整卷分配,再定稿。

第二次实际筛选

80 道候选 → 20 好+42 可+18 不要
主卷:20 好+5 可  备用卷:25 可

V · Reports, teaching and other work

5. Designing exam questions

PHYS1002: supply course evidence and teacher judgment, draft questions, then assemble balanced papers.

Materials establish the standard

Past papers → format and difficulty

Calibrate five-option concepts and estimation tasks.

Slides + transcripts → taught scope

Slides supply models; transcripts define taught scope.

Exam requirements → worthwhile reasoning

Model transfer and meaningful estimation.

Earlier annotations → teacher preferences

Use earlier “good / usable / reject” feedback for exam 2.

From candidates to two exam papers

  1. AI: draft 80 questions, one at a time

    Solve and refine; save bilingual questions and answers.

  2. Teacher: mark good / usable / reject

    Screen the Chinese copy and add specific comments.

  3. AI: assemble two 25-question papers

    Balance coverage and difficulty; check each answer.

  4. Teacher: review both English papers

    Check every question and answer, then finalize.

Second exam

80 candidates → 20 good + 42 usable + 18 rejected
Main: 20 good + 5 usable · Backup: 25 usable

PHYS1002 · 命题协作报告 / Case report题目与统计 / Questions and counts

五 · 报告、教学与其他工作

6. 用 AI 辅助听报告和开会

带着自己的研究问题去开会,把听到的内容接回可继续使用的研究材料。

会前 · 建立资料包

整理议程、时区、摘要和公开材料。
对照自己的研究方向,准备要听的报告和问题。

听会 · 保存问题与依据

记下原问题,以及对应报告、页码或时间戳。
让智能体追到论文全文,比较假设和可区分的观测量。

会后 · 写回研究知识库

整理主题模块与计算步骤,保留来源和未解决问题。
下一次阅读、推导或计算时,从这些入口继续。

V · Reports, teaching and other work

6. AI support for talks and conferences

Bring your research questions to the meeting; connect what you hear to material you can use again.

Before · Prepare sources

Collect the schedule, timezone, abstracts and public materials.
Choose talks and questions relevant to your research.

During · Keep questions

Record the question and its talk, page or timestamp.
Follow up in full papers; compare assumptions and observables.

After · Preserve knowledge

Curate topic modules and calculation steps with source links.
Keep open questions as entry points for the next calculation.

Cases and sources

五 · 报告、教学与其他工作 / 6. 用 AI 辅助听报告和开会

会前:整理会议网站与相关论文

Quantum Crossroads · 2026 年 8 月 3–7 日 · Kavli IPMU

先取得会议信息

逐项读取报告题目、讲者、摘要、时间与时区。
保存公开幻灯片/录像链接,并记录材料是否已经提供。

再接到自己的研究

把报告内容与自己的问题、论文和计算笔记比较。
列出相关论文、匹配理由,以及希望向讲者确认的问题。

形成会前资料包

按日期与报告保存入口,保留原网址和采集日期。
会前再核对议程变更;现场延迟时手动确认当前报告。

例:Fukuda · Quantum Metrology for High-Energy Physics
2026-08-05 10:00–11:00 · Asia/Tokyo · contribution 9096

V · Reports, teaching and other work / 6. AI support for talks and conferences

Before the meeting: website and papers

Quantum Crossroads · August 3–7, 2026 · Kavli IPMU

Collect conference data

Read talk titles, speakers, abstracts, times and timezone.
Save public slide / video links and whether materials are available.

Match your research

Compare the talks with your questions, papers and calculation notes.
List relevant papers, reasons for the match and questions for speakers.

Create a source package

Organize by date and talk; retain URLs and collection dates.
Recheck schedule changes; confirm the current talk if sessions run late.

Example: Fukuda · Quantum Metrology for High-Energy Physics
2026-08-05 10:00–11:00 · Asia/Tokyo · contribution 9096

Quantum CrossroadsFukuda · 9096Indico exports

五 · 报告、教学与其他工作 / 6. 用 AI 辅助听报告和开会

听会问题:追到全文和自己的研究

Fukuda 报告后的疑问:波状暗物质是什么量子态,实验测到了什么?

V · Reports, teaching and other work / 6. AI support for talks and conferences

Talk questions, full papers and research

After Fukuda’s talk: which quantum state describes wave dark matter, and what do experiments measure?

Quantum Crossroads · note-9096-1Wave dark matter · paper

五 · 报告、教学与其他工作 / 6. 用 AI 辅助听报告和开会

手写讲义与录音:可追溯的研究知识库

六页手写讲义、两段录音与一段视频,整理为主题模块、计算步骤和错误簿。

V · Reports, teaching and other work / 6. AI support for talks and conferences

Handwritten notes and audio: traceable knowledge

Six handwritten pages, two audio recordings and a video become modules, calculation recipes and an error book.

Original knowledge-base excerptsPartial Mellin–Barnes · paper

五 · 报告、教学与其他工作 / 6. 用 AI 辅助听报告和开会

多模态讲义整理:multimodal-lecture-notes

xingkaizhang77-sketch/multimodal-lecture-notes

输入与清点

视频、录音、板书照片、PDF、手写笔记与参考论文。
清点每份材料,记录已使用、重复、无法读取或暂缓的状态。

提取与对齐

转写、OCR 与公式候选识别,再按来源对齐内容。
为每个主题保存证据,检查是否遗漏材料。

核对与补充

公式候选经过验证;补写推导与图像单独标明。
区分原始讲述、整理者补充,以及仍未确认的内容。

写作与交付

分节写作,组装中文 LaTeX 讲义,再渲染与检查 PDF。
保留来源、写作审计和最终检查记录。

按 README 配置并启用 ASR/OCR/公式识别工具;识别结果继续与原材料核对。

V · Reports, teaching and other work / 6. AI support for talks and conferences

Multimodal Lecture Notes: an audited workflow

xingkaizhang77-sketch/multimodal-lecture-notes

Inventory

Video, audio, board photos, PDFs, handwriting and papers.
Record each source as used, duplicate, unreadable or deferred.

Extract and align

Transcribe, OCR and identify formula candidates; align sources.
Keep evidence per topic and check coverage.

Verify and supplement

Verify formula candidates; label added derivations and figures.
Distinguish source statements, supplements and unresolved points.

Write and deliver

Draft sections, assemble Chinese LaTeX notes and check the PDF.
Retain source records, writing audits and final checks.

Configure and enable ASR / OCR / formula tools as documented; check their output against the sources.

Repo · xingkaizhang77-sketchWorkflow · SKILL.md

五 · 报告、教学与其他工作 / 6. 用 AI 辅助听报告和开会

按处理阶段选择工具

先明确要补上哪一步,再选择开源工具。

处理阶段项目可承担的工作
会议信息Indico读取议程、摘要与公开附件;保存时区和来源。
录音转写WhisperX转写与词级时间对齐;需要时加入说话人分离。
PDF 结构Docling提取正文、图表与结构,保留布局和来源字段。
多模态检索RAG-Anything关联文字、图表和公式,用于跨材料检索。

先用 Markdown 目录、关键词搜索与来源链接。
材料增加、跨文档问题变多时,再加入检索层;公式和关键结论仍回到原材料核对。

V · Reports, teaching and other work / 6. AI support for talks and conferences

Choose tools for each processing stage

Identify the missing step, then choose an open-source tool.

StageProjectRole in the workflow
Conference dataIndicoRead schedules, abstracts and public files;
retain timezone and source.
Audio transcriptionWhisperXTranscribe and align words to audio;
add diarization when needed.
PDF structureDoclingExtract text, figures, tables and structure;
retain layout and provenance.
Multimodal retrievalRAG-AnythingConnect text, figures, tables and equations
for retrieval across materials.

Start with a Markdown index, keyword search and source links.
Add retrieval as the corpus and cross-document questions grow; check key claims against sources.

IndicoWhisperXDoclingRAG-Anything

五 · 报告、教学与其他工作 / 6. 用 AI 辅助听报告和开会

把会议材料与自己的研究一起交给智能体

把自己的问题、现有材料和希望留下的研究产物写进任务。

请辅助我参加这次会议:[会议网址]。
我的研究问题是:[问题];已有材料在:[论文、计算笔记与项目路径]。

会前读取议程、时区、摘要与公开附件,按报告建立资料入口。
对照我的研究,说明值得听哪些报告,并给出相关论文与提问理由。
我说“Note:”时保留原问题,记录对应报告、页码或时间戳。
需要追问时阅读论文全文,写明假设、依据与仍未解决的问题。
会后把讲义、录音和笔记整理为主题模块与可复用的计算步骤。
每条重要结论链接到原材料;补写推导另行标明,未确认内容留在错误簿。
先完成一个报告,供我核对后再扩展;把确认过的结果写回原笔记。

V · Reports, teaching and other work / 6. AI support for talks and conferences

Give the agent meeting sources and your research

State your question, available sources and the research material you want to preserve.

Help me attend this meeting: [conference URL].
My research question is [question]; sources are in [papers, notes and project paths].

Beforehand, read the schedule, timezone, abstracts and public files; organize by talk.
Match talks to my research; explain relevant papers and questions to ask.
When I say “Note:”, preserve my question and its talk, page or timestamp.
For follow-ups, read full papers; record assumptions, evidence and open questions.
Afterward, curate notes and audio into topic modules and reusable calculation steps.
Link important claims to sources; label added derivations and keep unresolved points.
Complete one talk for my review before expanding; write confirmed results back to the note.
Cases and sources

五 · 报告、教学与其他工作 / 6. 用 AI 辅助听报告和开会

用 dot 调研并持续跟踪学术会议

一次系统调研,建立资料与方法索引;随后接入周报,每周补充新进展。

可直接复用的任务指令

  1. 明确主题与范围 · 请检索最近三个月“AI,特别是 LLM 智能体在物理研究与教学中的应用”相关会议、工作坊和专题报告。
    逐一核对官网与议程,记录主题、日期、讲者和来源,未来活动单列。

  2. 筛选值得学习的方法 · 重点寻找利用现有 ChatGPT/Codex 订阅和普通计算资源就能实践的做法。
    说明哪些需要额外 API、商业软件或大量训练算力,选择信息量大、创新且实用的报告深入阅读。

  3. 读取报告背后的材料 · 寻找幻灯片、论文、代码和视频。优先读取平台已有转写;没有文字时,下载音频并转写,
    必要的视频用 480p。重要但无法取得的材料保留链接。需要时,让已授权的本机智能体读取资料并直接汇报分析。

  4. 综合成可实践的知识 · 按用途分类,回答:做了什么?怎样实现?有什么证据?与我的工作有什么关系?我可以先做什么小实验?
    用适合各类内容的图解、比较和案例呈现,输出带来源链接的中文 HTML,公式使用 KaTeX。

  5. 加入每周固定跟踪 · 把这项工作加入现有周报。每周检查新会议、新报告,以及已有会议新公开的讲义、代码和录像;
    去重、保留历史,突出新增内容和最值得尝试的方法。周报统一使用中文 HTML。

本次实践产出

40 项活动索引(含 4 项未来活动)、21 组案例与证据、2 场完整及 1 场部分视频转写分析,
以及可持续更新的中文 HTML 周报。

复现时,只需替换第 1 步的研究主题,并告诉 dot 你已有的工具和资源。

V · Reports, teaching and other work / 6. AI support for talks and conferences

Research and track academic conferences with dot

Build a source and methods index through a systematic survey; add new developments to the weekly report.

Reusable task instructions

  1. Define the scope · Last 3 months: conferences, workshops and talks on AI, especially LLM agents in physics research and teaching. Verify official sites and agendas; log topics, dates, speakers and sources. Separate future events.

  2. Select useful methods · Prioritize methods using existing ChatGPT/Codex subscriptions and ordinary compute. Flag extra APIs, commercial software or heavy training compute; study informative, innovative and practical talks in depth.

  3. Read materials · Find slides, papers, code and videos. Use platform transcripts or download and transcribe audio; video at 480p as needed. Link important missing sources. An authorized local agent can read and report directly if needed.

  4. Turn findings into practice · Group by use: what was done, how, what evidence, relevance to my work, and a first small experiment. Use suitable diagrams, comparisons and cases; deliver Chinese HTML with source links and KaTeX formulas.

  5. Track weekly updates · Add to the existing weekly report. Check new events, talks, and new slides, code and video from earlier events. Deduplicate, keep history; highlight additions and methods worth trying. Use Chinese HTML.

Outputs from this case

An index of 40 events (4 upcoming), 21 sets of cases and evidence, analysis of 2 complete and 1 partial video transcript, and an ongoing Chinese HTML weekly report.

To reuse the task, replace the topic in step 1 and tell dot which tools and resources you have.

五 · 报告、教学与其他工作

7. 经费申请

已有的 CCC 私有仓库内容丰富,提供了具体的研究基础与方法依据。
结合研究构想与历年材料,整合成申请书。

已有 CCC 私有仓库

特殊函数与数值计算实现
C++20 核心、C ABI 与 Python 接口
已有验证方法与网页展示

让智能体先读代码,理解已经具备的能力,
再写研究基础、方法和需要继续发展的目标。

历年申请

2025、2023、2022 年的 Word、CV 与网申 PDF。
了解体例、研究经历、文风与所需附件。

我的研究构想

从 collider 扩展到 correlator。
给出六项目标、开源计划与原型披露尺度。

教育与科研实践

ARC、教学、科普与人才培养材料。
用于说明相关经验、教育计划与影响路径。

分项初稿:摘要、目标、研究方法、时间表、Impact、Education、预算与附件。
每项保存为 Markdown,便于逐项阅读、修改和导出。

V · Reports, teaching and other work

7. Grant applications

The substantial private CCC repo supplied the research basis and methods.
Combine it with research plans and previous materials to draft the application.

Existing private CCC repo

Special functions and numerical code
C++20 core, C ABI and Python interfaces
Validation methods and web visualizations

Read the code and map its capabilities;
draft the research basis, methods and goals.

Previous applications

2025, 2023 and 2022 Word documents, CVs and online PDFs.
Application structure, research record, style and attachments.

My research plan

Extend collider to correlator.
Six objectives, open-source plans and prototype disclosure.

Research and education

ARC, teaching, outreach and student training records.
Evidence for experience, education plans and impact.

Draft sections: summary, objectives, methods, timeline, impact, education, budget and attachments.
One Markdown file per item, ready for reading, revision and export.

CCC · Private repo

五 · 报告、教学与其他工作 / 7. 经费申请

初始提示词:从 CCC 原型到研究计划

把已有实现、研究目标与交付要求写进任务,让智能体据此调研和起草。

V · Reports, teaching and other work / 7. Grant applications

Initial prompt: build on the CCC prototype

Specify the existing implementation, research goals and deliverables to guide the survey and drafting.

五 · 报告、教学与其他工作 / 7. 经费申请

多轮修改:把判断落实到申请书

初稿之后:21 条修改/制作指令,分布在 13 个执行回合。

研究者提出具体判断,智能体把修改同步到相关文档,再继续检查。

V · Reports, teaching and other work / 7. Grant applications

Revising the draft through dialogue

After the initial draft: 21 revision/production requests across 13 working turns.

The researcher makes specific decisions; the agent updates related documents and continues checking.

六 · 人与 AI 共同进化

1.人有人的用处2.学有学的出路

VI · Humans and AI evolving together

1.Humans Have Their Uses2.Learning Has a Way Forward

六 · 人与 AI 共同进化

1. 人有人的用处

AIGC 让执行变得廉价

编程 · 数学计算 · 资料收集 · 论文写作 · 翻译 · 绘图 · 排版

目前,人不可替代的作用:

精神属性

梦想
找到自己希望实现的目标
行动力
以自驱力推进,在 AIGC 时代主动改变
责任
为自己的选择、过程与结果负责

学术属性

创造力
AI 是人的凸包
提问与整合
提问、追问,快速阅读并整合大量资料
方向与检验
判断方向,提出近似方法,验证 AI 输出

技术属性

AI 边界
知道 AI 可以轻松完成哪些任务
指令粒度
掌握任务尺度,把意图变成合适的指令
传统工具
熟悉 WL、FFmpeg 等,便于 AI 迅速调用

沟通属性

意图对齐
理解彼此意图,明确研究目标
多线管理
统筹多个智能体工作
人际联系
保持人与人的交流,不因 AIGC 而削弱

VI · Humans and AI evolving together

1. Humans Have Their Uses

AIGC makes work cheap

Coding · Calculation · Source gathering · Paper writing · Translation · Plots · Typesetting

Where humans remain irreplaceable:

Spirit and agency

Dreams
Choose the goals you want to realize
Action
Drive your work forward; adapt actively in the AIGC era
Responsibility
Own your choices, process and outcomes

Academic qualities

Creativity
AI is the convex hull of humans
Inquiry
Ask and follow up; read and synthesize information quickly
Judgment
Choose directions, propose approximations and verify AI outputs

Technical understanding

AI boundaries
Know which tasks AI can complete easily
Instructions
Match instruction granularity to the task and your intent
Tools
Know WL, FFmpeg and other tools so AI can call them quickly

Communication

Alignment
Understand each other’s intent and clarify research goals
Coordination
Coordinate the work of multiple agents
Human ties
Keep human-to-human communication strong in the AIGC era

六 · 人与 AI 共同进化

2. 学有学的出路

打好基础

通过考试、面试和黑板讲解来检验:
能否把知识和推导讲清楚。

用 AI 加速

和 AI 协作,做出以前课堂难以达到的成果,
或完成以前个人无法做出的科研。

预测 AI 的近未来,不用外推远未来。

做我们能做的,但行好事,无需内耗。

VI · Humans and AI evolving together

2. Learning Has a Way Forward

Build strong foundations

Use exams, interviews and blackboard explanations
to check understanding:
can students explain the ideas and derivations clearly?

Accelerate with AI

Work with AI to create results beyond what
classroom work could previously achieve,
or pursue research once beyond one person’s reach.

Anticipate AI’s near future; no need to extrapolate to the distant future.

Do what we can, do good work, and let go of needless inner conflict.

选做练习

网页:完成一个熟悉的计算

准备

网页模型;先选你能判断对错的问题。

提示词

质量为 mmm 的两个相同振子,各由弹簧 kkk 连到固定端,并由弹簧 kck_ckc​ 互相连接。推导正常模频率和模态;检查 kc→0k_c\to 0kc​→0 的极限。写出假设和可检查的推导。

预期结果

得到两种模态,并能解释耦合如何改变频率。

遇到困难时

没有账号时,提交一个无保密要求的题目,由讲者演示。

MCP:让两个工具算同一题

准备

提前准备 Mathematica 14.3 或 15.0;按对应版本的官方文档连接 Wolfram MCP。

提示词

检查当前 Wolfram MCP 是否可调用。对 a>0a>0a>0、bbb 为实数,用 Wolfram Language 与 SymPy 分别计算 ∫−∞∞e−ax2cos⁡(bx) dx\int_{-\infty}^{\infty}e^{-a x^2}\cos(bx)\,\mathrm{d}x∫−∞∞​e−ax2cos(bx)dx(全实轴)。比较两式之差,并在 a=2a=2a=2、b=3b=3b=3 时数值积分核对。保存脚本和结果。

预期结果

两套表达式、化简后的差和一组数值。

遇到困难时

先让 AI 读取 MCP 连接状态和具体错误;安装较久可先完成 SymPy 部分。

Wolfram MCP

专业软件:运行 MathGR 示例

准备

MathGR-Py 工程或已安装的 MCP。

提示词

阅读 MathGR-Py README,运行一个 Kronecker delta 收缩示例,再运行一个对称张量示例。保存可重跑脚本。最后给示例添加 LaTeX 导出,确认计算结果保持一致。

预期结果

两个小计算、一份脚本、一份公式输出。

遇到困难时

先跑 README 中原样的最小例子,再增加功能。

MathGR-Py

Python 工具:把剪贴板文字变成 PDF

准备

本机 Python;一段自己准备的中英文文字。

提示词

写一个 Python 小工具:我手动运行时读取剪贴板文字,输出 PDF。支持中文、段落换行和多页;同时提供从 UTF-8 文本文件读取的选项。用三段文字测试:短文、长文、带中文与符号的文字。

预期结果

可以重复使用的脚本和三份可读 PDF。

遇到困难时

剪贴板接口卡住时,先走文本文件输入;中文方框先检查字体。

写 Skill:下载并清理论文 HTML

准备

选择一篇提供 HTML 的 arXiv 论文;参考我的 arxiv-reading。

提示词

先为一篇论文完成下载和清理:保留标题、作者、章节、公式编号、参考文献与原始 URL;原始 HTML 和清理结果分别保存。做通以后,将步骤整理成 Skill,再换一篇论文试一次。

预期结果

一个 Skill,以及两篇论文的原始文件和清理结果。

遇到困难时

没有 HTML 时明确记录可用格式,换一篇有 HTML 的论文继续练习。

Literature Skills

写 Skill:找谁引用了这篇论文

准备

INSPIRE-HEP 可访问;选择高能或宇宙学论文。

提示词

通过 INSPIRE API 查找 arXiv:0911.3380 的记录,获取引用它的论文。按年份列出标题、arXiv ID 和链接,保存查询日期与原始 JSON。处理分页和重复记录。将流程整理为 Skill,再筛选其中与原初黑洞相关的论文。

预期结果

可重用的检索流程,以及可以点开核对的结果表。

遇到困难时

先只取第一页;检查查到的是“引用它”,还是“它引用的文献”。

Literature Skills · INSPIRE API

ARC:围绕一篇论文提出问题

准备

按 ARC README 安装插件;首次依赖安装适合会前完成。

提示词

使用 ARC 的 arc-paper 获取 arXiv:0911.3380,列出章节和主要公式。选一个公式,给出它所在的上下文、符号含义和适用条件;把原文位置与说明一起保存。

预期结果

一份围绕具体公式、能返回原文的阅读记录。

遇到困难时

先查元数据和章节列表,再缩小到一个公式。

ARC

数据:给引力波演示增加一个视角

准备

随幻灯片附带的 GW150914 JSON 和交互网页。

提示词

阅读这份 GW150914 数据的字段与处理说明。画出 H1 和 L1 的滤波信号,保持原始时间关系,并添加放大事件附近区间的控件。注明归一化方式和数据来源。

预期结果

新增一个可操作视图,保留数据和处理说明。

遇到困难时

先画一个探测器的一条曲线,再增加叠图和控件。

GWOSC

翻译:做一个术语一致性检查器

准备

自己的一小段原文、译文,以及 5–10 条术语。

提示词

写一个术语检查工具:输入原文、译文和术语表,列出需要人工查看的段落,给出原句、译句和相关术语。只生成报告,原文另存保留。用一个故意改错术语的样本验证工具能发现它。

预期结果

一份定位到具体段落的检查报告。

遇到困难时

先支持一对术语,再扩展到表格;把无法自动判断的匹配显示出来。

教学:给已有互动演示加一个问题

准备

引力波演示,或你自己的课堂网页。

提示词

先读懂现有网页,然后加一个“先预测,再揭示”的问题。以引力波为例:先显示波形,请学生预测高频段出现的位置,再显示时频图。保留原有控件,增加重新开始。

预期结果

一个可直接试教的交互问题。

遇到困难时

先只加显示/隐藏按钮,确认教学顺序后再美化。

重构:把显示和计算分开

准备

一个已有的小脚本;可用上面的 MathGR 或 PDF 练习。

提示词

阅读这个脚本,说明输入输出和当前职责。保留一组已知结果,把核心处理与命令行入口分开;使同一功能既能从 Python 调用,也能从命令行调用。比较修改前后的结果。

预期结果

两个入口调用同一份核心代码,已知结果保持一致。

遇到困难时

让 AI 先说明准备改动的边界;一次只移动一种职责。

悬停或点击任务,查看提示词和具体做法。

致谢:感谢 HK RGC,特别是 RFS2425-6S02 项目的支持。

Optional exercises

Web: solve a familiar calculation

Preparation

A web model and a problem you can check.

Prompt

Two identical masses mmm are each attached to a fixed wall by a spring kkk and coupled by a spring kck_ckc​. Derive the normal-mode frequencies and modes, and check kc→0k_c\to 0kc​→0. State assumptions and show the derivation.

Expected result

Two modes and an explanation of the coupling effect.

If you get stuck

Without an account, submit a nonconfidential problem for the instructor to demonstrate.

MCP: solve one problem with two tools

Preparation

Prepare Mathematica 14.3 or 15.0; connect Wolfram MCP using the documentation for that version.

Prompt

Check that Wolfram MCP is available. For a>0a>0a>0 and real bbb, integrate e−ax2cos⁡(bx)e^{-a x^2}\cos(bx)e−ax2cos(bx) over the real line in Wolfram Language and SymPy. Compare the symbolic results and check numerical integration at a=2a=2a=2, b=3b=3b=3. Save scripts and results.

Expected result

Two expressions, their simplified difference and one numerical check.

If you get stuck

Inspect MCP connection status and the exact error. If setup takes time, start with SymPy.

Wolfram MCP

Scientific software: run MathGR examples

Preparation

The MathGR-Py repository or an installed MCP server.

Prompt

Read the MathGR-Py README. Run a Kronecker-delta contraction and a symmetric-tensor example. Save a rerunnable script. Add LaTeX export and check that the mathematical result stays unchanged.

Expected result

Two calculations, one script and formula output.

If you get stuck

Run the smallest README example unchanged before adding a feature.

MathGR-Py

Python tool: clipboard text to PDF

Preparation

Local Python and a short bilingual sample you prepare.

Prompt

Write a Python tool that reads clipboard text when I manually run it and saves a PDF. Support Chinese, paragraphs and multiple pages; also accept a UTF-8 text file. Test a short text, a long text and text with Chinese and symbols.

Expected result

A reusable script and three readable PDFs.

If you get stuck

Use a text-file input if clipboard integration stalls; inspect fonts if Chinese glyphs are missing.

Write a skill: fetch and clean paper HTML

Preparation

Choose an arXiv paper with HTML; use my arxiv-reading as a reference.

Prompt

Fetch and clean one paper. Preserve title, authors, sections, equation numbers, references and source URL. Save raw HTML separately. Once it works, package the steps as a skill and try a second paper.

Expected result

A skill plus raw and cleaned files for two papers.

If you get stuck

If HTML is unavailable, record the available formats and practice with another paper.

Literature Skills

Write a skill: find citing papers

Preparation

Access to INSPIRE-HEP and a relevant paper.

Prompt

Find arXiv:0911.3380 in the INSPIRE API and retrieve papers citing it. List title, arXiv ID and link by year. Save the query date and raw JSON, handle pagination and duplicates, then package the workflow as a skill. Filter for primordial-black-hole topics.

Expected result

A reusable query workflow and a table with verifiable links.

If you get stuck

Start with one page and check the citation direction.

Literature Skills · INSPIRE API

ARC: ask questions about one paper

Preparation

Install the plugin using the ARC README; complete first-time setup before the session.

Prompt

Use ARC arc-paper to fetch arXiv:0911.3380 and list sections and main equations. Choose one equation and explain its context, notation and assumptions. Save the source location with the explanation.

Expected result

A focused reading note linked to the source equation.

If you get stuck

Start with metadata and sections, then narrow to one equation.

ARC

Data: add one view to the GW demonstration

Preparation

The supplied GW150914 JSON and interactive page.

Prompt

Read the GW150914 fields and processing notes. Plot H1 and L1 filtered signals on their original time coordinates. Add a control to zoom around the event and label normalization and source.

Expected result

One additional interactive view with data and processing notes.

If you get stuck

Plot one curve from one detector before adding overlays and controls.

GWOSC

Translation: check terminology consistency

Preparation

A short source text, its translation and 5–10 glossary entries.

Prompt

Build a terminology checker for a source text, translation and glossary. Report paragraphs to inspect, with source sentence, translated sentence and term. Keep the originals. Test with an intentionally inconsistent term.

Expected result

A report pointing to specific paragraphs.

If you get stuck

Start with one term pair, then expand to a table and show ambiguous matches.

Teaching: add a question to an interactive demo

Preparation

The GW demonstration or your own teaching page.

Prompt

Read the existing page and add a predict-then-reveal question. For the GW example, show the waveform first, ask students where high frequencies occur, then reveal the spectrogram. Preserve controls and add restart.

Expected result

One classroom-ready interactive question.

If you get stuck

Start with a show/hide button; refine appearance after the teaching sequence works.

Refactor: separate display from computation

Preparation

An existing script, such as your MathGR or PDF exercise.

Prompt

Read this script and explain its inputs, outputs and responsibilities. Preserve a known result, then separate core processing from the CLI entry point. Expose the same functionality to Python and the command line. Compare results before and after.

Expected result

Two interfaces using one core implementation with unchanged known results.

If you get stuck

Ask the agent to explain the boundary first; move one responsibility at a time.

Hover over or click a task to see its prompt and instructions.

Acknowledgements: Supported by HK RGC, particularly project RFS2425-6S02.

备注

1与 AI 智能体一起做科研
2内容
3一 · 原理
41. 大语言模型
5注意力机制:怎样从上下文取信息
62. 输入输出格式
7按下发送后,模型收到什么?
8追问时,前面的对话也一起送进去
9缓存:复用重复输入的计算
10再加一层:system 提示词
11System 提示词实例:产品怎样设定工作习惯
12工具消息实例:计算结果怎样回到对话
13工具调用与工具结果,逐渐有了专门格式
143. 记忆
15短期记忆:上下文
16短期记忆的选择
17长期记忆:使用文件
18深海的光
19分支到新聊天:保留起点,分开探索
204. 推理与思考强度
21思考强度与工作方式
225. 智能体与工具循环
23模型、运行框架和工具怎样分工
24二 · 框架与智能体
251. 工具的演变
262. 工作方式
27编程智能体:从任务到可检查的产物
28遇到不同任务,怎样选工作方式
29换一个入口,工作方法仍可沿用
303. 项目规则、Skill 与 MCP
31Skill 实例:保存论文阅读的重复步骤
32Skill 文件的结构
33MCP 实例:Wolfram Language
344. 执行环境
355. 子智能体编排
36调用子智能体的方式与轻量选项
37子智能体:分工与协调的代价
386. 自己的任务
39三 · 用智能体编程
401. 开发实例

一句话实现功能只是例子,网上已有过多的这样例子,例如鹈鹕骑自行车(甚至有的人连动物鹈鹕和醍醐灌顶都没搞清楚,就让醍醐灌顶的醍醐骑自行车)。但是真正把人会用AI和不会用AI区分开来的,不是一句话的例子

41一句话,变成一段可检查的数据分析
42在真实数据里看见 chirp
43引力波图:需要核对哪些处理选择
44为了翻译一本书,先写一个软件
45翻译底稿进入 ALC,由人接手改进
462. 软件架构与设计模式
47软件工程与设计模式:组织编程的方法
48设计模式实例:Generator 与 Iterator
49设计模式实例:Factory 工厂模式
50设计中的常用准则
513. AI 时代的软件组织
521. 开闭原则的边界可以放大
532. 厚软件包,薄 Skill
54理解复杂度,推荐《人月神话》
554. 重写与重构
56一条提示词:MathGR → Python / SymPy
57Rust 重写:从运行时到视频工具
58REA:从程序行为到重新实现
59重构:用设计语言说明怎样拆分
60重构实例:ARC、ALC 共用 AC
61ARC 怎样拆成 AC、ALC、ARC
625. 测试与测试驱动开发
63测试驱动开发:红、绿、重构
64根据运行结果更新计划
65四 · 科研
661. 在聊天窗口中的科研
67用 GPT dot 进行持续研究
68持续研究:三种合作方式
69用 dot 写 arXiv 与科技新闻周报
702. 如何让 AI 读文章
71同一篇论文:LaTeX 与 HTML 源码
72ARC:清洗 HTML,缓存后反复读取
73清洗后怎样保存?MD、JSON 与 EPUB
74ARC:让 AI 按需读取论文
753. 通过引文网络拓展文献
76ARC 实例:0911.3380 的领域引文网络
77从引文网络到领域进展
78宇宙学对撞机:领域进展综述
79选定一个方向:观测约束
80同一问题的两份 Deep Research 报告
814. 让 AI 提科研想法
82提出、评审、修改
83新颖性与科学价值分开判断
84实际记录:五个候选、五轮评审
85收敛到值得做的第一个计算
865. 实际科研例一
87强混合:想法、讨论与新论文
88用 GPT-Pro 研究强混合
89验算、记录与反复追问
90强混合:从聊天计算到论文
91GPT 起草论文,人复查、修改并投稿
926. 实际科研例二
93直接交换图与对应积分
94单次混合图与对应积分
95四阶顶点与混合图的对应积分
96五 · 报告、教学与其他工作
971. 用 AI 准备 HTML 报告
98从初始提示词到逐页修改
99把参考、规则与素材留在项目里
100资料怎样进入报告?
1012. 用 AI 准备 Slidev 报告
102一次翻页,两种语言同步投影
103程序在页面上修改、运行和讨论
104怎样选择制作幻灯片的方式?
1053. 课程录像的处理
106转写是多媒体链条的核心
107从一门课扩展到可搜索的课程资料
1084. 修复 Coleman 视频
109保留原声,重建可读的推导画面
1105. 出考试题
1116. 用 AI 辅助听报告和开会
112会前:整理会议网站与相关论文
113听会问题:追到全文和自己的研究
114手写讲义与录音:可追溯的研究知识库
115多模态讲义整理:multimodal-lecture-notes
116按处理阶段选择工具
117把会议材料与自己的研究一起交给智能体
118用 dot 调研并持续跟踪学术会议
1197. 经费申请
120初始提示词:从 CCC 原型到研究计划
121多轮修改:把判断落实到申请书
122六 · 人与 AI 共同进化
1231. 人有人的用处
1242. 学有学的出路
125选做练习