跳到正文
DEV Community· member_347d9863·· 4 小時前AI 評分62

用兩則筆記和一次修正測試 AI 智能體的專案記憶

A tiny test for your AI's project memory: two notes and one correction

AI 導讀

作者設計一個可用本地檔案執行的練習,測試 AI 智能體能否跨工作階段保留修正並追溯來源。練習以兩則虛構筆記記錄藍色標題決定及後來改為綠色的修正,並要求智能體保留原決定、標示各自來源。移除 correction.txt 後,智能體應説明記憶檔稱目前決定為綠色,但原始修正證據已不可查證;來源未提及批准者,便應保留為未知。

正文

A Markdown handoff needs a way to check its result. Here is a small exercise you can run with an AI that can read local files. It tests whether a correction survives a fresh session and whether the agent distinguishes a current decision from its history.

Disclosure: I build VideoToMD, a library of practical Markdown instructions and a service for preparing action briefs from saved video tutorials. This exercise is free. These are expected results to check, not benchmark results or a claim that every model passes.

1. Create two source files

Make an empty folder for the exercise. Put this in first.txt:

On October 1, the team chose a blue header.

Put this in correction.txt:

On October 3, the team replaced the blue header decision with green.

The dates describe fictional notes. There is one deliberately simple change, so you can inspect the answer without trusting the model's own score.

2. Ask for persistent, sourced memory

Give your agent this instruction:

Read first.txt and correction.txt. Create a Markdown project-memory file.
Keep the original source files unchanged.
Record the current header decision, the earlier decision, and which file
supports each statement. Explain why one decision supersedes the other.
Do not add facts that are absent from the sources.

Inspect the generated file. It should record green as current, preserve blue as the earlier decision, and cite correction.txt and first.txt for their respective claims. It should not invent who approved the change or why they preferred green.

This is the first check: a concise summary that drops the correction or its source has not completed the task.

3. Start a fresh session

Start a new conversation with the agent, give it access to the exercise folder, and ask:

What is the current header decision? Show the supporting source.
What did it replace? Who approved the change?

The expected answer is green, replacing blue. Neither source names an approver, so that part should remain unknown. Check the cited file yourself. An answer that says green without evidence is a weaker result than an answer whose evidence you can inspect.

4. Remove evidence from the test copy

Make a separate copy of the folder and omit correction.txt from that copy. Keep the generated memory file, so it now points to a missing source. Start another fresh session in the copy:

Verify the current header decision against the original source files
available in this folder. Can you verify the correction? Distinguish
what the memory file says from what you can check in the source files.

The useful behavior is to report that the memory says green, while the correction's original evidence is unavailable. It should not silently treat the memory's claim as independently verified or revert to blue without explaining the missing correction.

What I want to learn

Would this kind of handoff help with a real task you currently do? Try substituting a harmless pair of your own notes. Tell me the task, what the agent got right or wrong, and what you would normally use instead. A transcript plus your own prompt may be enough; that is useful feedback too.

The complete project-memory guide and exercise files are public. There are three complete VideoToMD starters without signup. The paid library starts at $9/month including two prepared video conversions per billing month.

來源:DEV Community · dev.to