Rule Responder - UNB

Distributed Rule Responder Querying on the Semantic Web Harold Boley Institute for Information Technology National Research Council, Canada Fredericton, NB, Canada Keynote at ICDIM 2010 6 July 2010 Outline

Rule Responder Overview Agent Types Personal, Organizational, and External Infrastructure for Realizing Agents Reaction RuleML Messages: Performatives Mule ESB: Communication Middleware Rule Engines: Prova, OO jDREW, and DR-Device Symposium Planner Use Case Query Delegation and Answering Knowledge in Organizational and Personal Agents Role Assignment Ontology: Topic Personal Agent Assisting the General, Publicity, and Program Chairs Conclusion and Future Work 2 Overview of Rule Responder (I)

Rule Responder is a multi-agent system for collaborative team and community support on the (Semantic) Web Enables rule-based collaboration between the distributed human members persons of such a virtual organization Persons of an organization are assisted by semi-automated rule-based agents, which use rules (and various ontologies) to describe the decision and behavioral logic 3 Overview of Rule Responder (II) Uses languages and engines of the RuleML family for rule serialization,

based on logic and XML: Hornlog RuleML: Reasoning (decision) Reaction RuleML: Interaction (behavior) Implemented on top of a Mule-based Enterprise Service Bus (ESB) as a Service Oriented Architecture (SOA) 4 Personal Agents A personal agent assists a person or a tight subteam of an organization, semi-autonomously acting on their behalf It works on a profile of FOAF*-like facts

plus FOAF-extending rules that encode routine knowledge of its human owner(s) * The Friend of a Friend (FOAF) project: 5 Organizational Agents An organizational agent represents goals and strategies shared by each member of the organization It contains rule* sets that describe the policies, regulations, opportunities, and expertise of its organization

* For brevity the term rule encompasses fact (which is a rule without premi 6 External Agents External agents exchange messages with (the public interface of) organizational agents, sending queries (requests), receiving answers (results), or interchanging complete rule sets End users, via external agents, employ the Web (HTTP) interface of Rule Responder (currently an API-like browser interface) Support for simultaneous external agents: - Currently, end users (B2C)

- Ultimately, other organizations (B2B) 7 Rule Responder as a Multi-Agent Infrastructure Rule Responder realizes virtual organizations in which an OA links between an EA and PAs Built on top of the Mule ESB Each OA is realized with an instance of a

Rule Engine Each PA is realized with a Servlet using a Rule Engine sometimes several Combines ideas of multi-agent systems, distributed rule management systems, as well as service-oriented and 8 event-driven architectures Two Simple Rule Responder Virtual Organizations on ESB Infrastructure 9 Translation Between PAs' Native Languages and OA's Interchange Language

Each rule engine can use its own rule language Agents require an interchange language so they can communicate with each other Rule Responder uses RuleML as its interchange language Translations between the interchange language and the PA languages are done by the PAs 10 Reaction RuleML

Reaction RuleML is a branch of the RuleML family that supports actions and events When two agents want to communicate, each others Reaction RuleML messages are sent through the ESB The ESB carries RuleML queries (requests), answers (results), and rule bases to/from agents 11 Example Reaction RuleML Message

RuleML-2010 esb

User getContact ruleml2010_PanelChair update Contact 12 Message Performatives The attribute directive="..." specifies the pragmatic performative Message exchange/interaction protocols

Rule Responder Performatives In tradition of KQML and FIPA-ACL Currently implemented: Query and Answer Retract and Update requests planned in collaboration with W3C RIF-PRD / OMG PRR 13 Agent Communication Protocols WSDL-like communication protocols: In-Only Message is sent from agent to agent ;

1 2 then agent2 executes performative Request-Response Performs above In-Only; then agent2 sends response to agent1 Request-Response-Acknowledge Performs Request-Response; then agent1 sends an acknowledgement to agent2 Workflows Generalizes the above protocols to allow other compositions of message interchange between agents 14 Communication Middleware Mule Enterprise Service Bus (ESB)

Mule* is used to create communication end points at each personal and organizational agent of Rule Responder Mule supports around 50 transport protocols (including HTTP, JMS, JDBC, and SOAP) Rule Responder currently uses HTTP and JMS as transport protocols * Mule The open source SOA infrastructure: http:// 15 Rule Engines Prova: Prolog + Java

OO jDREW: Object Oriented java Deductive Reasoning Engine for the Web DR-Device: Defeasible Logic Reasoner for the Semantic Web 16 Prova Prova is mainly used to realize the organizational agents of Rule Responder

It implements Reaction RuleML for agent interaction (event-conditionaction rules) 17 OO jDREW OO jDREW is used to realize the personal agents of Rule Responder It implements Hornlog RuleML for agent reasoning (Horn logic rules) Supports rules in two formats: POSL: Positional Slotted presentation syntax

RuleML: XML interchange syntax (can be generated from POSL: 18 DR-Device Reasons about RDF metadata over multiple Web sources using defeasible logic rules Three rule syntaxes

Multiple rule types of defeasible logic (strict, defeasible, defeaters) Both classical (strong) negation and negation-as-failure Conflicting literals, i.e. derived formulas that mutually exclude each other Import of RDF and RuleML from the Web D-POSL, a defeasible extension of human-oriented POSL syntax Native CLIPS-like (LISP-like) language DR-RuleML, a defeasible extension of OO RuleML/XML serialization

Highly expressive semantics Implemented on top of CLIPS production rule system (bottom-up execution, derives all conclusions as an extension of the rule base + fact base) RDF taxonomies and instances as input facts for the defeasible logic program Defeasible logic programs in RuleML Export of answers and proofs to the Web The answer sets of the defeasible logic program as an RDF document The proof tree of each answer in a RuleML extension for proofs 19

Use Case: Symposium Planner RuleML-20xy Symposia An external agent linked to an organizational agent acts as the single point of entry to support the symposium organization: Currently, query answering about the symposium Ultimately, preparing and running the symposium Personal agents have assisted symposium chairs since 2007 (deployed as Q&A since 2008)

General Chair, Publicity Chair, Program Chair, Panel Chair, etc. 20 Rule Responder Enquiry User OA: Organizational Agent PA: Personal Agent EA: External Agent Architecture General Chair PA OA

General Chair Profile User Publicity Chair PA Virtual Organization Challenge Chair Profile User Liaison Chair PA Publicity Chair Profile User Challenge Chair PA

Program Chair PA Program Chair Profile User Liaison Chair Profile User 21 Online Use Case Demos Rule Responder: Virtual organizations for RuleML-2007/.../2010 Symposia:

External agents: Each an HTTP browser interface using Reaction RuleML: Onlin Organizational agents: Each supporting one symposium as a whole Personal agents: Supporting all Chair subteams of a symposium e

22 Query Delegation The organizational agent delegates queries to appropriate personal agents Tasks for the symposium organization are managed via a role assignment matrix Defined here by an OWL Lite ontology (alternatives: RDFS, RuleML, ...) Assigns (meta)topics to PAs within the virtual organization: ... see next slide ...

23 Role Assignment Ontology Topics Metatopics Personal Agents General Chair General Chair Program Chair Program Chair Challenge Chair .. .. ..

Challenge Chair .. .. . Publicity Chair Publicity Chair Liaison Chair Liaison Chair Responsible Properties: Accountable Sponsoring ..

. Press Release Challenge .. . Demos Media Partners .. . Sponsors Registration .. . Visa Letter Submissions .. . Presentations 24

Multiple Query Answers by PAs Some queries have more than one answer The PA will send the answers one at a time to the OA Interleaving backtracking and transmission When the PA finds no more answers, it sends an end-of-transmission message 25

Knowledge Shared Between Personal Agents Rules can be shared among personal agents Rules that apply to all PAs can be lifted to the OA level ... see next slide ... 26 Symposium OA Knowledge Base % Sample Prova rule stored in the OA: getContact(XID,Topic,Request,

person(Role,Name,Title,EMail,Telephone)) :% Retrieve the responsible PA (Agent) for the Topic assigned(XID,Agent,Topic,ruleml2009_responsible), % Query contact information from that PA sendMsg(XID,esb,Agent,"query", person(Role,Name,Title,Email,Telephone) ), % Receive the answer(s) rcvMult(XID,esb,Agent,"answer", substitutions(Role,Name,Title,EMail,Telephone)). 27 General Chair PA Knowledge Base: Facts % OA rule delegates queries to PAs that use FOAF-like facts % such as to the General Chair PA that uses this fact: person( symposiumChair[ ruleML_2009, general ], foafname[ firstName[ Adrian ], lastName[ Paschke ]], foaftitle[ title[ Dr ]], foafmbox[ email[ adrianDOTpaschkeATbiotecDOTtuDASHdresdenDOTde ]], exphones[ telephoneNumbers[ office[ 4935146340074 ]]]).

% Sample query in RuleML syntax: ... see next slide ... 28 Sample Message to Organizational Agent RuleML-2009 Onlin e

esb User Query Selection: General Chair Contact getContact ruleml2009_GeneralChair update Contact 29

Architecture - Execution 30 Architecture - Execution 31 Architecture - Execution 32 Architecture - Execution 33 Architecture - Execution 34 35

36 Sample Message to Publicity Chair PA (I) sponsor Onlin e contact Mark Query Selection: Publicity Chair Sponsoring JBoss 500 English Description: Mark from JBoss results

would like to sponsor Level RuleML-2009 with Benefits DeadlineResults $500. What level, benefits, and deadline results will this provide, and what performative kind of action should Action be taken? 37 38

Publicity Chair PA Knowledge Base: Rules % Rule stored in the Publicity Chairs PA: sponsor(contact[?Name,?Organization], ?Amount:integer, results[?Level,?Benefits,? DeadlineResults], performative[?Action]) :requestSponsoringLevel(?Amount:integer,?Level), requestBenefits(?Level,?Benefits), checkDeadline(?DeadlineResults), Yellow: Query other rules checkAction(?Action,?Level,?Amount:integer). 39 Publicity Chair PA

Knowledge Base: 1st & 2nd Rule Premise requestSponsoringLevel(?Amount:integer,?Level), % Satisfied by presponsor, bronze, ..., emerald rule: ... requestSponsoringLevel(?Amount:integer,?Level) :sponsoringLevel(rank5,?Level,us$[? EmeraldAmount:integer]), greaterThanOrEqual(?Amount:integer, ?EmeraldAmount:integer). requestBenefits(?Level,?Benefits), % Satisfied by rule: requestBenefits(?Level,?Benefits) :benefits(?Level,?Benefits). Pink: Query facts 40

Publicity Chair PA Knowledge Base: 3rd & 4th Rule Premise checkDeadline(?DeadlineResults), % Satisfied by rule: checkDeadline(passed[deadline]):date(?X:integer), deadline(sponsoring,?D:integer), greaterThan(?X:integer,?D:integer). checkAction(?Action,?Level,?Amount:integer). % Satisfied by rule: checkAction(?Action,?Level,?Amount:integer) :actionPerformed(?Action,?Level,?Amount:integer). What happens if we now provide a $5000 sponsorship? ... see next slide ... 41

Sample Message to Publicity Chair PA (II) sponsor Onlin e contact Mary Query Selection: Publicity Chair Sponsoring (edite Super 5000English Description: Mark from JBoss results would like to sponsor Level RuleML-2009 with

Benefits DeadlineResults $5000. What level, benefits, and deadline results will this provide, and what performative kind of action should Action be taken? 42 43 43 2010): DR-Device Knowledge in DDefeasible rules (with :=-infix, :-label, and ->-slots)

POSL r1: suggested_level(sponsor->?X, level->preSponsor) := offer(sponsor->?X, amount->?Y), ?Y >= 1. r2: suggested_level(sponsor->?X, level->bronze) := offer(sponsor->?X, amount->?Y), ?Y >= 500. r3: suggested_level(sponsor->?X, level->silver) := offer(sponsor->?X, amount->?Y), ?Y >= 1000. r4: suggested_level(sponsor->?X, level->gold) := offer(sponsor->?X, amount->?Y), ?Y >= 3000. r5: suggested_level(sponsor->?X, level->platinum) := offer(sponsor->?X, amount->?Y), ?Y >= 5000. r6: suggested_level(sponsor->?X, level->emerald) := offer(sponsor->?X, amount->?Y), ?Y >= 7500. Priority order (between labeled rules) r6 > r5 > r4 > r3 > r2 > r1. Integrity rule (denial of multiple levels)

:= suggested_level(sponsor->?X, level->?Y), suggested_level(sponsor->?X, level->?Z), ?Y \ = ?Z. 44 Program Chair PA (RuleML2010) Contains knowledge about tracks of RuleML-2010 Track title, Track topics, Track chairs Answers queries for finding a relevant track for a paper

Uses a papers keywords within (the strings of) the track titles and topics Rule-based heuristic scoring functions 45 Program Chair PA: Find Relevant Tracks CfP Query findTracks Answer track defeasibility; rule exceptions

Rules and Norms ScoredTrack relevance 10017 46 Program Chair: OA-PA Interface findTracks(XID, KeywordString, ScoredTrack) :% Parse string of keywords into a list of keywords string_to_keywords(KeywordString,Keywords), % Find the Program Chair Personal Agent

assigned(XID,Agent,ruleml2010_ProgramChair,ruleml2010_responsible) , % Send message querying for tracks relevant to a list of keywords sendMsg(XID,esb,Agent,"query",score_tracks(Keywords,ScoredTrack)), % Receive relevant tracks with a relevance score rcvMult(XID,esb,Agent,"answer",substitutions(ScoredTrack)). 47 Program Chair PA: Knowledge Base track("Rules and Norms":string, % Track title [ % Track topics "Methodologies for modeling regulations using both ontologies and rules":string, "Defeasibility and norms - modeling rule exceptions and priority relations among rules":string, ], [foafname[firstName[Thomas],lastName[Gordon]], % Track chairs

foafname[firstName[Guido],lastName[Governatori]]]). Use a heuristic function See next slide score_tracks(?Keys,track[?Track,relevance[?Score]]) :track(?Track,?Topics,?), % For each track (backtracking) score_track(?Keys,?Track,?Topics,?Score), % Score track relevance greaterThan(?Score,0:real). % Return track with positive score 48 Program Chair PA: Scoring Function* * Slides 43-48 courtesy of Nick Bassiliades, leading joint project: 23.pdf Conclusion (I)

Rule Responder was implemented & tested for various use cases ( and deployed for RuleML-2008/.../2010 Q&A Its organizational agents delegate external queries to topic-assigned personal agents It couples rule engines Prova & OO jDREW & DR-Device (& Euler) via Mule middleware and RuleML 0.91 XML interchange format Without a Reaction Rule Dialect, W3C RIF could not be used for behavioral Responder logic 50 Conclusion (II)

Current system is reusable on all levels: Symposium Planner, Rule Responder, (D-)POSL, RuleML, OO jDREW, DR-Device, Prova, and Mule RuleML Responder Technical Group jointly with Adrian Paschke, Alexander Kozlenkov, Ben Craig, Taylor Osmun, Derek Smith, Irfan ul Haq, Omair Shafiq, Mahsa Kiani, Nick Bassiliades, Stratos Kontopoulos, and Kalliopi Kravari Integrated another partner engine, Euler, for recent use cases, e.g. in WellnessRules2 and PatientSupporter (generating RuleML/XML from query menus for POSL and N3). More welcome! 51 Future Work (I)

Communication between Personal Agent and Human Owner The PA may need to interact with its Human Owner Formal interaction between PAs and their owners can employ Reaction RuleML emails (SMTP) Semi-formal interaction could use Controlled English Query Decomposition Queries decomposed into subqueries, delegated to multiple PAs, and partial answers re-integrated Applications in information (data and knowledge) 52 Future Work (II)

Centralized, Distributed-Hierarchical (here), and Distributed-Networked (future) query answering Centralized: Avoids all communication overhead Distributed: More fault-tolerant and typically faster Alternative agents when an agent becomes defunct Hierarchical: OA may sometime become a bottleneck Networked: Peer-to-peer exchange between PAs From centralized to distributed knowledge maintenance Easier to keep distributed rules up-to-date Discussed in Technical Report by Ben Craig and explored in PhD project by Mahsa Kiani 53

Recently Viewed Presentations

  • Click to add title - Sully District

    Click to add title - Sully District

    Fairfax County Base Realignment and Closure Mark Canale Fairfax County BRAC Coordinator October 5, 2010 * * BRAC Overview Fort Belvoir current workforce (military, civilian personnel, and contractors) 2008 - 21,500 2011 (Post BRAC) - 42,000 to 47,500 Most jobs...
  • 'Assissi' by Norman MacCaig

    'Assissi' by Norman MacCaig

    Poem ends as it begins more brutal descriptions of the beggar and his disabilities. "Assisi" is a poem of contrasts Dwarf and the church juxtaposition of beggar and church. "three tiers" -- "ruined temple". Natural goodness of St Francis and...
  • Sequel - Amazon S3

    Sequel - Amazon S3

    Norms Crisis. Students and employees: will rely on the norms they know. will watch each other's response to determine the norms. will demonstrate anxiety if the norms are not clear or not modeled. The informal norms are the real norms....
  • Teamwork Challenge! - Elementary School Counseling

    Teamwork Challenge! - Elementary School Counseling

    Question #12. VIDEO CHALLENGE! What is dignity? Does Flik have a lot of dignity in this clip?
  • 921: Childhood Mental Health Issues: An Introduction for

    921: Childhood Mental Health Issues: An Introduction for

    Competencies. The foster parent knows how to assist in treatment of children with mental health or behavioral disorders, including discussion of feelings and concerns, problem solving, empathic listening, behavior management, de-escalation, sanctioned physical restraint, and assault prevention.
  • Key vocabulary Year 8 - Knowledge Organiser  Conflict

    Key vocabulary Year 8 - Knowledge Organiser Conflict

    Born in Glasgow, she wrote poetry from an early age, and was first published at the age of 15. She has since written plays, critical works, and several volumes of poetry. Her poetry has been the subject of controversy. Duffy's...
  • Office of Proposal Development - FSU Office of Research

    Office of Proposal Development - FSU Office of Research

    Supplies. Supplies and materials related to the project. Can be listed in budget as broad categories such as glassware, chemicals or art supplies. Minor equipment costing < $5,000. NOTE: For Federally-funded projects, routine office supplies are normally treated as an...
  • Spring 2013 Writing SOL Training - Staunton City Schools

    Spring 2013 Writing SOL Training - Staunton City Schools

    Spring 2013 Writing SOL Training. ... The adult is allowed to transcribe the student's written response into the computer for the student, however the student's written response and what is typed into the computer must be verified by a second...