Skip to main content

knowledge-representation

Knowledge representation in AI

来源信息

仓库
ffsshhttiikk/opencode-agents-skills
最近来源活动
2026年2月28日 22:52
检测到的 SKILL.md 语言
英语
星标
3
Forks
2

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
knowledge-representation
description
Knowledge representation in AI
license
MIT
compatibility
opencode
metadata
{"audience":"machine-learning-engineers","category":"artificial-intelligence"}
## What I do - Design knowledge structures - Build ontologies and taxonomies - Implement semantic networks - Create knowledge graphs - Represent uncertain knowledge - Build expert systems ## When to use me Use me when: - Building knowledge-based systems - Creating semantic search - Implementing reasoning systems - Integrating heterogeneous data - Building question-answering systems ## Key Concepts ### Knowledge Representation Schemes **1. Semantic Networks** ``` ┌─────────┐ │Animal │ └────┬────┘ │is-a ┌─────┴─────┐ ▼ ▼ ┌───────┐ ┌────────┐ │Mammal │ │ Bird │ └───┬───┘ └───┬────┘ │ │has-a ▼ ▼ ┌───────┐ ┌────────┐ │ Dog │ │Wings │ └───────┘ └────────┘ ``` **2. Frames** ```python class Frame: def __init__(self, name, slots): self.name = name self.slots = slots dog = Frame("Dog", { "is_a": ["Mammal"], "legs": 4, "sound": "bark", "eats": ["meat", "dog_food"], "can": ["fetch", "guard", "hunt"] }) ``` **3. Logic Representation** ``` // First-Order Logic ∀x (Dog(x) → Mammal(x)) ∀x (Mammal(x) → Animal(x)) ∃x (Dog(x) ∧ Barks(x)) // Rules IF patient.has_fever AND patient.cough THEN patient.has_cold ``` ### Knowledge Graphs ```python # RDF-like representation from rdflib import Graph, Namespace, URIRef, Literal EX = Namespace("http://example.org/") g = Graph() g.add((EX.Person, EX.hasName, Literal("Alice"))) g.add((EX.Person, EX.hasAge, Literal(30))) g.add((EX.Person, EX.worksAt, EX.Company)) ``` ### Applications - **Ontologies**: OWL, RDF schemas - **Knowledge Graphs**: Google, Wikidata - **Expert Systems**: MYCIN, DENDRAL - **Semantic Web**: Linked data
在 GitHub 查看