correction-pipeline
Skill này làm gì
Skill này đặt ra quy trình để agent AI xử lý các chỉnh sửa về sự thật trong ghi chú hoặc kho tri thức của nó. Skill dành cho người dựa vào tri thức đã lưu của agent và cần sửa lỗi tận gốc.
Khi nào nên dùng
- ✓Khi bạn sửa một sự thật mà agent đã nêu và bạn muốn nó được sửa ở mọi nơi.
- ✓Khi một trang sai trong kho tri thức liên tục tạo ra cùng một câu trả lời sai.
- ✓Khi bạn muốn agent xác định lỗi đến từ dữ liệu hay từ một phỏng đoán.
Liên kết skill
https://github.com/garrytan/gbrain/blob/master/plugin-variants/gbrain-coding/skills/correction-pipeline/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn nói văn phòng của chúng tôi đã chuyển đến Lisbon, nhưng điều đó sai. Vui lòng tìm xem thông tin đó xuất phát từ đâu và sửa lại.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent thừa nhận lỗi, tìm kiếm trong kho tri thức để tìm khẳng định đó, xác định lỗi do dữ liệu hay do mô hình, rồi sửa nguồn.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Correction Pipeline
Convention: see conventions/brain-first.md — Step 1 of the root-cause chain IS the brain-first lookup chain (
searchfor exact tokens,queryfor concept-shaped questions) before anything else.Convention: see _brain-filing-rules.md — corrections edit pages in place; the page stays filed by primary subject.
Trigger
ANY factual error the user identifies. No exceptions. No "I'll note that."
(Routing here is a harness convention, not a mechanical guarantee — but once this skill is in play, the no-exceptions contract above is the discipline.)
Immediate Response
- Acknowledge the error. Don't defend. Don't explain. Just: "You're right. I got that wrong."
- Quote the specific wrong claim so the user can see you know exactly what was wrong.
- State the correct fact as the user gave it.
Root Cause Analysis (do THIS, not just a memory note)
Run these steps IN ORDER. Report findings to the user.
Step 1: Search the brain
gbrain search "<relevant terms>" --limit 10
For concept-shaped or synonym-phrased claims, escalate to gbrain query "<question>" (LLM expansion recovers phrasings search misses). To list
every indexed page carrying the claim, use a keyword search (it pages every
match); grep the checkout only for edits not yet synced:
gbrain search '"<wrong claim terms>"' --match keyword
BRAIN_DIR=$(gbrain config get sync.repo_path)
grep -ri "<wrong claim terms>" "$BRAIN_DIR/people/" "$BRAIN_DIR/companies/" "$BRAIN_DIR/concepts/" 2>/dev/null
Question: Is the wrong fact IN the brain? If yes → the brain is the contamination source. Fix the brain page (Step 6).
Step 2: Search memory files
Grep the harness's always-loaded memory files (e.g. the workspace MEMORY.md
and any memory/*.md companions — the exact location depends on your
harness):
grep -ri "<wrong claim terms>" <memory files> 2>/dev/null
Question: Is the wrong fact in memory? If yes → memory is the contamination source. Fix the memory file.
Step 3: Check SOUL.md and USER.md
grep -i "<relevant terms>" <workspace>/SOUL.md <workspace>/USER.md 2>/dev/null
Question: Is there a misleading passage that could have led to the wrong inference? SOUL.md and USER.md are in every context window — a vague or ambiguous line here propagates into every session.
Important: on gbrain installs these files are RENDERED from the bootstrap
answer bank (state/interview.json). Note the finding here; the fix goes
through the answer bank in Step 6, never through a direct edit.
Step 4: Check the facts table
gbrain recall <entity-slug> # facts about the subject, newest first
gbrain recall --grep "<claim terms>" # substring filter when the entity is unclear
Is there a wrong fact with high confidence? Note its fact id.
Step 5: Classify the error
| Classification | Description | Fix surface |
|---|---|---|
| BRAIN_ERROR | Wrong fact exists in a brain page | Edit the page in the brain repo, commit, re-sync |
| MEMORY_ERROR | Wrong fact exists in memory files | Fix the memory file |
| SOUL_USER_ERROR | Misleading passage in SOUL.md or USER.md | Fix the ANSWER BANK, re-render — never the rendered file |
| FACTS_TABLE_ERROR | Wrong fact in the gbrain facts table | recall → forget <fact-id> → remember the correction |
| HALLUCINATION | No source — LLM confabulated from partial signals | Name the contamination vector (what partial signals led to it), write a guard fact |
| STALE_DATA | Fact was once true but is no longer | Update the source with current truth; supersede the stale fact |
| CROSS_CONTAMINATION | Correct fact about person A attributed to person B | Fix attribution in the source — on BOTH entities |
Step 6: Fix the source
- BRAIN_ERROR: Edit the page file in the brain repo. Include
[Source: user correction, YYYY-MM-DD]on the corrected line. Commit, thengbrain syncso the DB reflects the fix. (Editing the DB row without the repo file — or vice versa — leaves the two out of agreement until the next sync overwrites one of them.) - MEMORY_ERROR: Edit the memory file. Add a correction note with date.
- SOUL_USER_ERROR: NEVER edit SOUL.md / USER.md directly — they are rendered files, and a hand edit is silently lost on the next render.
Câu hỏi thường gặp
Có hai loại lỗi nào?
Skill cho biết lỗi là dữ liệu sai trong một trang hoặc tệp, hoặc ảo giác từ các tín hiệu chưa đầy đủ.
Nó chỉ ghi một ghi chú thôi à?
Không. Skill yêu cầu truy vết lỗi về nguồn và sửa tại đó.
Nó có tìm trong kho tri thức trước không?
Có. Bước đầu tiên là tìm kiếm kho tri thức với các thuật ngữ liên quan.
Chi tiết
Mô tả gốc của tác giả
When the user corrects a factual error, root-cause it immediately. Don't just note the correction — trace the error to its source, fix the source, and prevent recurrence. Every factual error is either a data error (bad brain page, bad memory file, bad rendered SOUL/USER identity, bad facts row) or a hallucination (LLM confabulated from partial signals).
repo: garrytan/gbrain
Độ phổ biến
- Sao GitHub
- 31k
- Vị trí xếp hạng
- #9253
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
gbrain
31kCho phép agent của bạn tìm trong kho tri thức dùng chung của công ty các thông tin về con người, dự án và quyết định, và lưu ghi chú bền vững vào đó.
brain-ingest-gate
31kKiểm tra nội dung mới với kho tri thức hiện có trước khi thêm vào, để tránh trùng lặp và xác định các thực thể được nêu tên trước.
brain-link-discipline
31kĐảm bảo agent của bạn kèm một liên kết hoạt động đến mỗi trang kho tri thức mà nó báo cáo, trong cùng một tin nhắn, để bạn mở được ngay.
brain-ops
31kCung cấp cho agent của bạn thói quen cốt lõi cho kho tri thức: kiểm tra ngữ cảnh có sẵn trước, lưu ghi chú rõ ràng kèm nguồn và liên kết các trang liên quan.
Skill tương tự
graincrawl
394kCho phép agent của bạn tìm trong ghi chú cuộc họp và bản chép lời Granola đã lưu, kiểm tra độ mới và đếm số cuộc họp trong một khoảng thời gian.
notcrawl
394kCho phép agent của bạn tìm trong bản sao đã lưu của workspace Notion, tra cứu trang và database, rồi xuất trang ra file Markdown.
knowledge-entities
394kGiúp agent của bạn xác định người, công ty và dự án, rồi viết trang hồ sơ có nguồn cho họ trong kho Knowledge của bạn.