OKBC Open Knowledge Base Connectivity An API For
OKBC Open Knowledge Base Connectivity An API For Knowledge Servers Prof. Richard Fikes CS 222 Fall 1998 Computer Science Department Stanford University 10/26/98
An Interoperability Problem u Knowledge representation systems provide – ä Knowledge representation language ä Knowledge base storage ä Deductive retrieval ä Knowledge base construction and analysis tools u Problem: KR systems do not interoperate ä Differing representation formalisms and idioms Knowledge Systems Laboratory, Stanford University 2 ä Differing reasoning capabilities
Clients u Knowledge ä ä servers Knowledge base storage Deductive retrieval › Query answering with selectable level of inference ä ä ä Reformulation Accessed via a knowledge level network API Analogous to data base servers u Knowledge ä ä clients Operate with any server that supports the API Tools for developing and using knowledge bases › Construction, analysis, merging, reformulation, viewing, … ä 3 Applications that access multi-use knowledge bases Knowledge Systems Laboratory, Stanford University
Sharing u Declarative ä interlingua for expressing knowledge KR system translates KBs into and out of interlingua u. . . 4 Knowledge Systems Laboratory, Stanford University
Knowledge Language 1 . . . Language 2 Language n KIF KB Library u Knowledge ä ä ä 5 Interchange Format (KIF) KIF First order predicate logic with set theory Logically comprehensive Model-theoretic semantics Knowledge Systems Laboratory, Stanford University
Sharing u Declarative interlingua for expressing knowledge E. g. , KIF and Ontolingua ä KR system translates KBs into and out of interlingua u API for accessing and manipulating knowledge ä Provide operations for: › Assertion 6 › Deductive retrieval Knowledge Systems Laboratory, Stanford University › KB creation and manipulation
OKBC: Open Knowledge Base Connectivity u An ä API for knowledge servers Provides knowledge level interoperability u Operations ä ä ä for: Assertion and retrieval KB creation and manipulation Client/server network communication u Object-oriented ä Class-subclass taxonomies, attributes, type constraints. . . u Server-side procedures ä 7 view of knowledge source execution of client-specified Enables multiple operations with one network transmission Knowledge Systems Laboratory, Stanford University
Application (client) OKBC front end OKBC Runtime Architecture OKBC Server En(de)code, Dispatch OKBC Wrapper Application (client) 8 OKBC front end KR System KB Knowledge Systems Laboratory, Stanford University
OKBC Knowledge Model u Implicit interlingua for communicated knowledge u Formal object-oriented representation paradigm u. A simple frame language ä Class-subclass taxonomies ä Monotonic inheritance ä Type and cardinality constraints on attribute values ä Explicit manipulation of “Frames” › Objects representing individuals, classes, and relations u KIF ä 9 sentences Asserted and retrieved via Tell and Ask operations Knowledge Systems Laboratory, Stanford University
Dealing with Variation - Names u KR systems use different names for common terms E. g. , The most general class: … Value restriction: u Applications Thing, Object, All, Any, … Value-Type, Value-Class, Type, must portably refer to these common terms u OKBC defines standard names ä : THING, : VALUE-TYPE, : INVERSE, : CARDINALITY, … ä If (coerce-to-frame : THING) returns a frame, Knowledge Systems Laboratory, Stanford University 10
Standard Names u Class names : THING : CLASS : INDIVIDUAL : NUMBER : INTEGER : STRING : SYMBOL : LIST u Slot names : DOCUMENTATION u Facet names : VALUE-TYPE : MINIMUM-CARDINALITY : NUMERIC-MINIMUM : INVERSE : SAME-VALUES : NUMERIC-MAXIMUM : CARDINALITY : NOT-SAME-VALUES : SOME-VALUES : MAXIMUM-CARDINALITY : SUBSET-OF-VALUES 11 Knowledge Systems Laboratory, Stanford University
Instances u Operations on knowledge bases create-kb, open-kb, close-kb, copy-kb, save-kb, find-kb, u Operations … on frames create-frame, delete-frame, copy-frame, get-frame-name, get -kb-frames, … u Operations on classes create-class, add-class-superclass, remove-classsuperclass, class-p, get-class-instances, get-classsubclasses, instance-of-p, subclass-of-p, … u Operations on instances add-instance-type, get-instance-types, remove-instancetype, type-of-p, … 12 Knowledge Systems Laboratory, Stanford University
Facets u Operations on individuals create-individual, get-kb-individuals, individual-p, u Operations … on slots create-slot, delete-slot, add-slot-value, get-slotvalues, attach-slot, detach-slot, follow-slot-chain, frame-has-slot-p, get-frame-slots, u Operations … on facets create-facet, delete-facet, add-facet-value, get-facetvalues, attach-facet, detach-facet, slot-has-facet-p, get-slot-facets, 13 … Knowledge Systems Laboratory, Stanford University
Tell and Ask u Uses KIF as the “content” language u Operations: Tell, Ask, Untell, Tellable, Askable u Semantics defined for a set of simple relational sentences Tell Effect (S F V) (add-slot-value F S V : slot-type : own) (instance-of F C) (add-instance-type F C) (class C) (create-class C) (slot-of S F) (attach-slot F S : slot-type : own) (subclass-of C Super) (add-class-superclass C Super) … Ask Effect (C ? x) (get-class-instances C) (S F ? x) (get-slot-values F S) (S ? x V) (get-frames-with-slot-value S V) (class ? x) (get-kb-classes) (subclass-of ? x S) (get-class-subclasses S) … 14 Knowledge Systems Laboratory, Stanford University
Retrieval Using OKBC u KR systems vary widely in their inference ability ä Simple lookup ä Taxonomic reasoning ä Full first order logic theorem proving ä Forward chaining u Inference ä Direct – Directly asserted values ä Taxonomic – Directly asserted plus inherited values ä All-Inferable – Values inferable by any means u Must 15 levels in OKBC return at least the values specified Knowledge Systems Laboratory, Stanford University
Understanding Results u Ops return additional information with values u Whether ä All Universities I had time to find ä All Universities I can find u If 16 the answer is complete exactly the requested inferences were performe Knowledge Systems Laboratory, Stanford University
Enumerators u Each “get” op has a corresponding “enumerate” op u Enumerates ä One at a time ä In batches u Operations 17 multiple values on enumerators ä Next – Get the next value from an enumerator ä Has-More – Test whether enumerator has more values ä Fetch – Get a given number of values ä Prefetch – Caches a given number of values ä Free – Indicate an enumerator will no longer be used Knowledge Systems Laboratory, Stanford University
Behaviors u Servers ä Value constraint checking ä Frame representation of entities ä Defaults ä Class slot types ä Collection types ä Frame names ä Compliance › › 18 indicate the behaviors they support Facets supported User defined facets Read only Monotonic Knowledge Systems Laboratory, Stanford University
Architecture u Front ä ä end (client) The 185 OKBC operations for use by client application Issues calls to a middle end (possibly across network) u Middle ä end Default implementation of OKBC operations › In terms of a core set of OKBC operations • Object-oriented: 134 ops => 51 ops • Sentential: 161 ops => 24 ops › For use by front end ä Issues calls to a back end (possibly across network) u Back ä 19 end (server) Implementation of OKBC operations in a KR system Knowledge Systems Laboratory, Stanford University
Sources u Unix ä ä ä file system (a less expressive KR system) Directories => classes Subdirectory relationships => subclass relationships Files => individuals Does not comply with : user-defined-facets May comply with : read-only u ATP theorem prover (a more expressive KR system) ä ä ä 20 What’s a frame? All constants considered to be frames Uses the sentential middle end Implementing the inference levels › Direct – Only ground facts › Taxonomic – Ground facts and taxonomic axioms › All-Inferable – Ground facts and all axioms Knowledge Systems Laboratory, Stanford University
Implementations u Server ä and client reference implementations Front ends and middle ends in Java, Lisp, & C u Example ä ä ä Ontolingua (Stanford KSL) Ocelot (SRI AIC) LOOM (ISI) Cyc (Cycorp) ATP theorem prover (Stanford KSL) Tuple KB (Stanford KSL) u Example ä ä 21 OKBC servers OKBC clients Generic Knowledge Base Editor (SRI AIC) Java Ontology Tool (JOT) Knowledge Systems Laboratory, Stanford University
OKBC Working Group u Working group consists of representatives from: ä ä ä Stanford KSL (chair) Cycorp SAIC SRI Teknowledge USC/ISI u Responsible for spec and reference implementations u Maintains distribution list and Web site ä Web site: http: //www-ksl-svc. stanford. edu/okbc/ ä To join distribution list: Send a message to majordomo@smi. stanford. edu with the following one line body: subscribe OKBC [your email address] 22 Knowledge Systems Laboratory, Stanford University
Next Steps? u Extend ASK to return a proof tree for explanations u Inference level for full frame system reasoning ä u Standard facets for Bayesian probabilities ä u Include constraint checking from standard facets Using Daphne Koller’s formalism Support n-ary relations ä Relational data base rather than frames? u Provide a semantics for defaults u Incorporate standard upper level ontology u Add commands for collaborating agents E. g, like KQML’s advertise, broker, forward, monitor, broadcast, . . . 23 Knowledge Systems Laboratory, Stanford University
- Slides: 23