ARTICLE DETAIL

资讯详情

深耕商务建站与企业官网运营的一线实战洞察。

LLM-WIKI 测试 demo1

LLM-WIKI 测试 demo1 请在 D:\workspace\llm-wiki 初始化/补齐一个基于 Karpathy LLM Wiki 思路的个人知识库系统。当前目录可能已有文件请只创建缺失项已有文件先读取、对比并汇报差异未经我确认不要覆盖、移动、删除或重命名。重要约束当前根目录固定为D:\workspace\llm-wiki当前项目不是空目录因此不要使用“覆盖式初始化”。只创建缺失的目录和文件。如果文件已存在不要直接覆盖先读取并对比然后告诉我差异等待确认。raw/ 目录由人类拥有LLM 只能读取绝不修改已有 raw 文件。wiki/ 目录由 LLM 维护可创建和更新系统文件但已有文件仍需先对比再确认。不要移动、删除、重命名任何已有文件。不要自动安装 qmd、npm 包、Python 包或其他依赖。如果 qmd 不存在只记录“qmd 未安装/不可用”不要自动安装不要使用 npx。在 Windows PowerShell 环境执行目录树验证优先使用 PowerShell 命令不要依赖 tree -L 3。一、创建目录结构在 D:\workspace\llm-wiki 下创建以下目录raw/articles/raw/clippings/raw/images/raw/pdfs/raw/notes/raw/personal/wiki/sources/wiki/concepts/wiki/entities/wiki/synthesis/wiki/templates/wiki/outputs/outputs/scripts/最终初始目录应为llm-wiki/├── raw/│ ├── articles/│ ├── clippings/│ ├── images/│ ├── pdfs/│ ├── notes/│ └── personal/├── wiki/│ ├── sources/│ ├── concepts/│ ├── entities/│ ├── synthesis/│ ├── templates/│ ├── outputs/│ ├── index.md│ ├── log.md│ ├── overview.md│ ├── QUESTIONS.md│ └── schema.md├── outputs/├── scripts/│ └── lint.py├── OPENAI.md└── USER_GUIDE.md二、创建 wiki 系统文件在wiki/下创建以下系统文件每个文件的内容如下frontmatter 中的date填当前日期。wiki/index.md--- type: system-index date: 当前日期 graph-excluded: true --- # Knowledge Base Index ## Sources ### Processed ### Unprocessed ## Concepts ## Entities ## Recent Synthesis ## Outputs要求Sources 按日期倒序。不要引用系统文件。wikilink 必须使用英文小写连字符 slug。wiki/log.md--- type: system-log date: 当前日期 graph-excluded: true --- # Operation Log 说明 仅追加操作日志不删除历史记录。 日志格式 YYYY-MM-DD HH:MM | 操作类型 | 说明 示例 2026-05-17 15:30 | init | initialized llm-wiki structurewiki/overview.md--- type: system-overview date: 当前日期 graph-excluded: true --- # Overview ## Knowledge Base Health Dashboard | Metric | Value | Notes | |---|---:|---| | 总来源数 | 0 | wiki/sources/ 中的来源页面数量 | | 高置信度概念数 | 0 | wiki/concepts/ 中 confidence: high 的页面数量 | | 开放问题数 | 0 | wiki/QUESTIONS.md 中未完成问题数量 | | Stale 页面数 | 0 | 超过 domain_volatility 时效阈值的概念页面数量 |wiki/QUESTIONS.md--- type: system-questions date: 当前日期 graph-excluded: true --- # Questions ## Open Questions !-- - [ ] 问题内容opened YYYY-MM-DD -- ## Resolved Questions !-- - [x] 问题内容resolved YYYY-MM-DD --wiki/schema.md确认 schema.md 的位置为wiki/schema.md原因schema.md 描述的是 wiki 层的数据契约不是根目录级行为契约因此放在 wiki/ 下最合理。--- type: system-schema date: 当前日期 graph-excluded: true --- # Schema ## Page Types | type | directory | purpose | |---|---|---| | source | wiki/sources/ | 外部来源整理页 | | personal-writing | wiki/sources/ | 个人写作来源页 | | concept | wiki/concepts/ | 概念页 | | entity | wiki/entities/ | 实体页 | | synthesis | wiki/synthesis/ | 综合分析页 | | system-index | wiki/index.md | 系统索引 | | system-log | wiki/log.md | 操作日志 | | system-overview | wiki/overview.md | 健康仪表盘 | | system-questions | wiki/QUESTIONS.md | 问题池 | | system-schema | wiki/schema.md | 数据契约 | | lint-report | wiki/outputs/ | 健康检查报告 | | query-output | wiki/outputs/ | 查询输出 | | gap-report | wiki/outputs/ | 知识空白报告 | ## Required Frontmatter Fields ### source 字段 type, title, date, source_url, domain, author, tags, processed, raw_file, raw_sha256, last_verified, possibly_outdated, language, canonical_source ### Personal Writing 字段 type, title, date, status, topic_tags, confidence_at_writing, superseded_by, raw_file, raw_sha256, last_verified, tags, processed 允许值 status: draft / published / deprecated confidence_at_writing: low / medium / high ### concept 字段 type, title, date, updated, tags, source_count, confidence, domain_volatility, last_reviewed, aliases 允许值 confidence: low / medium / high domain_volatility: low / medium / high ### entity 字段 type, title, date, tags, entity_type, aliases 允许值 entity_type: person / tool / institution / paper / product / service / framework ### synthesis 字段 type, title, date, tags, source_count, confidence 允许值 confidence: low / medium / high ## Slug Rules 所有页面文件名和 wikilink 目标必须使用英文小写连字符格式。 正确 - mse-microservice-governance - full-link-canary - traffic-control 错误 - 微服务治理 - FullLinkCanary - traffic_control ## Graph Exclusion Rules 以下文件必须包含 graph-excluded: true - wiki/index.md - wiki/log.md - wiki/overview.md - wiki/QUESTIONS.md - wiki/schema.md - wiki/outputs/ 下所有文件Knowledge Base IndexSourcesProcessedUnprocessedConceptsEntitiesRecent SynthesisOutputs要求Sources 按日期倒序。不要引用系统文件。wikilink 必须使用英文小写连字符 slug。wiki/log.mdfrontmatter:type: system-logdate: 当前日期graph-excluded: true正文包含Operation Log说明仅追加操作日志不删除历史记录。日志格式YYYY-MM-DD HH:MM | 操作类型 | 说明示例2026-05-17 15:30 | init | initialized llm-wiki structurewiki/overview.mdfrontmatter:type: system-overviewdate: 当前日期graph-excluded: true正文包含OverviewKnowledge Base Health DashboardMetricValueNotes总来源数0wiki/sources/ 中的来源页面数量高置信度概念数0wiki/concepts/ 中 confidence: high 的页面数量开放问题数0wiki/QUESTIONS.md 中未完成问题数量Stale 页面数0超过 domain_volatility 时效阈值的概念页面数量wiki/QUESTIONS.mdfrontmattertype: system-questionsdate: 当前日期graph-excluded: true正文包含QuestionsOpen QuestionsResolved Questionswiki/schema.md确认 schema.md 的位置为wiki/schema.md原因schema.md 描述的是 wiki 层的数据契约不是根目录级行为契约因此放在 wiki/ 下最合理。frontmattertype: system-schemadate: 当前日期graph-excluded: true正文包含SchemaPage Typestypedirectorypurposesourcewiki/sources/外部来源整理页personal-writingwiki/sources/个人写作来源页conceptwiki/concepts/概念页entitywiki/entities/实体页synthesiswiki/synthesis/综合分析页system-indexwiki/index.md系统索引system-logwiki/log.md操作日志system-overviewwiki/overview.md健康仪表盘system-questionswiki/QUESTIONS.md问题池system-schemawiki/schema.md数据契约lint-reportwiki/outputs/健康检查报告query-outputwiki/outputs/查询输出gap-reportwiki/outputs/知识空白报告Required Frontmatter Fieldssource字段type, title, date, source_url, domain, author, tags, processed, raw_file, raw_sha256, last_verified, possibly_outdated, language, canonical_sourcePersonal Writing字段type, title, date, status, topic_tags, confidence_at_writing, superseded_by, raw_file, raw_sha256, last_verified, tags, processed允许值status: draft / published / deprecatedconfidence_at_writing: low / medium / highconcept字段type, title, date, updated, tags, source_count, confidence, domain_volatility, last_reviewed, aliases允许值confidence: low / medium / highdomain_volatility: low / medium / highentity字段type, title, date, tags, entity_type, aliases允许值entity_type: person / tool / institution / paper / product / service / frameworksynthesis字段type, title, date, tags, source_count, confidence允许值confidence: low / medium / highSlug Rules所有页面文件名和 wikilink 目标必须使用英文小写连字符格式。正确mse-microservice-governancefull-link-canarytraffic-control错误微服务治理FullLinkCanarytraffic_controlGraph Exclusion Rules以下文件必须包含 graph-excluded: truewiki/index.mdwiki/log.mdwiki/overview.mdwiki/QUESTIONS.mdwiki/schema.mdwiki/outputs/ 下所有文件三、创建页面模板wiki/templates/source-template.mdfrontmatter 字段type: sourcetitledatesource_urldomainauthortagsprocessedraw_fileraw_sha256last_verifiedpossibly_outdatedlanguagecanonical_source正文结构Source TemplateSummaryKey PointsConcepts ExtractedEntities ExtractedContradictions与其他来源的分歧。My Noteswiki/templates/personal-writing-template.mdfrontmatter 字段type: personal-writingtitledatestatus: drafttopic_tagsconfidence_at_writing: mediumsuperseded_byraw_fileraw_sha256last_verifiedtagsprocessed正文结构Personal Writing TemplateCore ArgumentKey ClaimsEvidence ReferencedLimitationswiki/templates/concept-template.mdfrontmatter 字段type: concepttitle: 中文主名称dateupdatedtagssource_countconfidencedomain_volatilitylast_reviewedaliases正文结构中文主名称Definition中文主名称English NameKey PointsMy PositionContradictionsSources仅 wikilinks 列表。Evolution Log每次更新追加一条。格式YYYY-MM-DDN sources本次认知变化的一句话描述wiki/templates/entity-template.mdfrontmatter 字段type: entitytitledatetagsentity_typealiases正文结构Entity TemplateDescriptionKey ContributionsRelated ConceptsSourceswiki/templates/synthesis-template.mdfrontmatter 字段type: synthesistitledatetagssource_countconfidence正文结构Synthesis TemplateThesisEvidenceCounter-evidenceStage 0 反向检验结果。SynthesisConfidence NotesLimitationsSources四、创建 scripts/lint.py创建 scripts/lint.py。lint.py 必须执行以下 9 项检查YAML frontmatter 合法性检查所有 wiki/ 下 .md 文件是否有合法 YAML frontmatter并包含 type 和 date。Broken Wikilinks检查 [[xxx]] 是否引用了不存在的页面。Index 一致性检查 wiki/index.md 中标记或引用的文件是否实际存在。Stub 页面检查正文少于 100 字的空壳页面。系统文件、模板文件、outputs 可排除。近重复概念名称检查 wiki/concepts/ 下 slug 名称 Jaccard 相似度是否 0.7。SHA-256 完整性检查 source 页中的 raw_file 和 raw_sha256。如果 raw 文件当前哈希与记录不一致报告⚠ SOURCE MODIFIED。Stale 页面根据 concept 页 domain_volatility 检查过期high 90 天medium 180 天low 365 天跨语言重复检查source URL 相似度不同 concept 页 aliases 字段是否重叠Wikilink 格式规范检查wikilink 是否为英文小写连字符格式是否存在中文 wikilink如 [[价值投资]]是否存在驼峰、下划线等非法格式是否存在别名断链lint.py 完成后将报告写入wiki/outputs/lint-YYYY-MM-DD.md报告 frontmatter 必须包含type: lint-reportdate: 当前日期graph-excluded: true五、创建 OPENAI.md创建根目录文件OPENAI.mdfrontmattertype: behavior-contractdate: 当前日期graph-excluded: trueOPENAI.md 必须包含以下章节系统概述INGEST 操作规范QUERY 操作规范LINT 操作规范REFLECT 操作规范MERGE 操作规范ADD-QUESTION 操作规范Wikilink 使用规范Wiki 语言规范Confidence 更新规则Source Integrity Rules系统文件隔离规则文档维护规则核心原则必须写清楚三层架构Raw / Wiki / Outputsraw/ 由人类拥有LLM 只能读取绝不修改wiki/ 由 LLM 维护可读取和写入outputs/ 保存输出结果所有知识结论必须可追溯到 source 页再追溯到 raw 文件六、创建 USER_GUIDE.md创建根目录文件USER_GUIDE.mdfrontmattertype: user-guidedate: 当前日期graph-excluded: true必须包含快速开始三层目录说明常用触发词如何放入 raw 材料如何执行 ingest如何执行 query如何执行 lint如何执行 reflectWikilink 规范Confidence 规则维护规则要求当 OPENAI.md 规则变化时USER_GUIDE.md 对应章节必须同步更新。七、初始化 qmd 索引先检查 qmd 是否存在qmd --version如果 qmd 可用执行qmd add wiki/qmd status如果 qmd 不可用不要安装不要使用 npx在最终报告中写明qmd 当前不可用索引初始化未执行八、执行 lint执行python scripts/lint.py如果 Python 不可用尝试py scripts/lint.py如果都不可用在最终报告中说明。九、执行完成后的验证报告完成后输出以下验证报告当前工作目录目录结构树最多 3 层OPENAI.md 包含的章节列表wiki/schema.md 是否存在以及包含的 Page Typeswiki/templates/ 下的模板文件列表scripts/lint.py 包含的 9 项检查列表qmd status 输出如果 qmd 不可用说明未执行lint 报告路径是否存在未覆盖的已有文件下一步建议放入第一篇 raw 材料例如 微服务治理参考https://www.bilibili.com/video/BV1Ki5C6BEEL/?spm_id_from333.337.search-card.all.clickvd_source4d02563e0aa06f2983dd90aefb4bd1f1
返回列表
PREV
查看更多资讯
NEXT
返回资讯列表