@equationalapplications/schema-org-llm-wiki

中文文档
8.4.0发布于 2026/11/13MITTypeScriptESM + CJS构建来源已验证近 30 天下载 5537

Curated schema.org warm-agent ontology manifest for Core LLM Wiki: 9 node types, 28 edges, fully schema.org-standard. Data-only.

原始使用文档
文档目录12 节
  1. Why curated?
  2. Why this is the GraphRAG ontology
  3. Why a curated ontology prevents hallucination in edge extra…
  4. Use it with core-llm-wiki for GraphRAG
  5. Requirements
  6. Installation
  7. Usage
  8. Node types
  9. Edge properties (19 names, 28 rows)
  10. JSON-LD export notes
  11. Monorepo Ecosystem
  12. License

@equationalapplications/schema-org-llm-wiki

Curated schema.org warm-agent ontology manifest for hybrid LLM memory. Seeds a knowledge graph with 9 standard node types and 28 polymorphic edges — token-efficient, JSON-LD-ready, data-only with no runtime code.

npm version npm downloads TypeScript License: MIT

📖 Docs · GitHub · ScopeLab · WikiDemo · Changelog · Issues

Ontology manifest for Core LLM Wiki, inspired by Andrej Karpathy's LLM Wiki memory spec.

Why curated?

Full schema.org has ~800 types and ~1,400 properties. Injecting that into every librarian/ingest prompt would blow token budgets and collapse LLM classification accuracy. This manifest selects the high-value warm-agent subset (~2 KB serialized, 9-way classification) while keeping every type and property standard, so stored facts and edges map 1:1 onto schema.org for future JSON-LD export.

Why this is the GraphRAG ontology

This manifest is designed as the canonical taxonomy bundle for warm-agent GraphRAG: the 9 node types and 28 polymorphic edges cover the people, places, organizations, projects, events, and creative works that dominate personal and professional knowledge graphs. Pair it with core-llm-wiki's traverseGraph() and you get a SQL-only GraphRAG stack with no Neo4j.

Why a curated ontology prevents hallucination in edge extraction

The librarian and ingest LLM passes that write llm_wiki_edges only see this manifest's node types and edge properties in their prompt context. Without that constraint, an unconstrained LLM will invent edge types and node types on every call — producing a noisy graph where WITH RECURSIVE walks return orphaned nodes and arbitrary relationships.

With the manifest:

  • Every edge has a valid (type, source_type, target_type) triple — the manifest validates edge structure and reduces invalid relationships.
  • Polymorphic edges (location, organizer, about, itemReviewed) cover the cases where a single property name applies to many source/target type combinations.
  • Token budget stays small — ~2 KB serialized, vs ~50 KB for the full schema.org catalog.

Use it with core-llm-wiki for GraphRAG

import { createWiki } from '@equationalapplications/core-llm-wiki';
import { schemaOrgWarmAgentManifest } from '@equationalapplications/schema-org-llm-wiki';

const wiki = createWiki(db, {
  llmProvider,
  config: {
    ontology: {
      mode: 'strict',
      seedManifests: {
        [entityId]: { mode: 'strict', manifest: schemaOrgWarmAgentManifest },
      },
    },
  },
});

// After ingestDocument / runLibrarian populate edges:
const graph = await wiki.traverseGraph(entityId, { sourceId, maxDepth: 2 });

Requirements

Requires @equationalapplications/core-llm-wiki at the same release or newer — this manifest uses polymorphic edge rows (one property name with several source/target types), which core validates by the (type, source_type, target_type) triple.

Installation

npm install @equationalapplications/schema-org-llm-wiki

Usage

import { createWiki } from '@equationalapplications/core-llm-wiki';
import { schemaOrgWarmAgentManifest } from '@equationalapplications/schema-org-llm-wiki';

const wiki = createWiki(db, {
  llmProvider,
  config: {
    ontology: {
      mode: 'strict',
      seedManifests: {
        [entityId]: { mode: 'strict', manifest: schemaOrgWarmAgentManifest },
      },
    },
  },
});

Or seed an existing entity directly:

await wiki.setOntologyManifest(entityId, schemaOrgWarmAgentManifest, { mode: 'strict' });

Node types

Typeschema.orgCovers
personPersonFriends, family, colleagues, public figures
organizationOrganizationCompanies, schools, clubs, teams, institutions
placePlaceCities, venues, landmarks, addresses
eventEventMeetings, conferences, concerts, celebrations
projectProjectMulti-step initiatives and goals
actionActionIndividual tasks, chores, steps
creativeworkCreativeWorkBooks, movies, articles, songs, recipes
reviewReviewPersonal opinions and evaluations
productProductOwned items, devices, software

Edge properties (19 names, 28 rows)

All standard schema.org properties: knows, spouse, parent, worksFor, memberOf, homeLocation, workLocation, location (×2), containedInPlace, subOrganization, object, agent, attendee, organizer (×2), author, publisher, about (×4), itemReviewed (×5), owns.

Polymorphic properties appear as multiple rows with distinct source/target types, mirroring schema.org's own domain/range definitions — e.g. about targets person, organization, place, and event.

JSON-LD export notes

  • Property names keep schema.org camelCase (worksFor, itemReviewed); core validation compares case-insensitively but stores the given casing, so names survive to storage and future JSON-LD export unchanged.
  • Literal-valued properties (birthDate, startTime, reviewRating values, …) live inside fact content, not as edges. Only object-valued properties (pointing at other facts) are edges.

Monorepo Ecosystem

PackagePurpose
@equationalapplications/schema-org-llm-wikiCurated schema.org warm-agent ontology manifest
@equationalapplications/core-llm-wikiPersistent episodic memory
@equationalapplications/expo-llm-wikiPersistent episodic memory for Expo/React Native
@equationalapplications/react-llm-wikiPersistent episodic memory for Web
@equationalapplications/prisma-outboxSync SQLite outbox events to Prisma
@equationalapplications/core-llm-toolsGemini tool schemas and capability injector
@equationalapplications/core-okfZero-dependency Open Knowledge Format (OKF) v0.1 + v0.2 primitives — parse and produce interoperable knowledge bundles.
@equationalapplications/schema-software-orgSoftware-organization executive ontology manifest — 17 node types, 40 edges, warm-agent superset, data-only
@equationalapplications/mcp-serverMCP server exposing SynapseTree memory tools to coding agents

License

MIT


Made with ❤️ by Equational Applications LLC. https://equationalapplications.com/

版本与发布记录

@equationalapplications/schema-org-llm-wiki 共发布 71 个版本,首次发布于 2026/07/15;过去 12 个月发布了 71 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
8.4.0latest2026/11/131 天前
8.3.02026/11/131 天前
8.2.02026/11/122 天前
8.1.02026/11/122 天前
8.0.52026/11/112 天前
8.0.42026/11/112 天前

关于 @equationalapplications/schema-org-llm-wiki 的常见问题

@equationalapplications/schema-org-llm-wiki 是什么?

Curated schema.org warm-agent ontology manifest for Core LLM Wiki: 9 node types, 28 edges, fully schema.org-standard. Data-only.

如何安装 @equationalapplications/schema-org-llm-wiki?

在项目目录运行 npm install @equationalapplications/schema-org-llm-wiki,或使用 pnpm add / yarn add / bun add。

@equationalapplications/schema-org-llm-wiki 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@equationalapplications/schema-org-llm-wiki 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@equationalapplications/schema-org-llm-wiki 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@equationalapplications/schema-org-llm-wiki 可以商用吗?

@equationalapplications/schema-org-llm-wiki 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@equationalapplications/schema-org-llm-wiki 的下载量有多少?

根据 npm 官方下载统计,@equationalapplications/schema-org-llm-wiki 在 2026/10/14 – 2026/11/12 这 30 天内被下载 5,537 次,日均约 185 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@equationalapplications/schema-org-llm-wiki 还在维护吗?

最新版本 8.4.0 发布于 2026/11/13(1 天前);至今共发布 71 个版本,其中过去 12 个月发布了 71 个;首次发布于 2026/07/15。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。