Resolving Under Constrained and Over Constrained Systems of Conjunctive Constraints for Service Requests Muhammed J. Al-Muhammed David W. Embley Brigham Young University Supported by:
Outline of Presentation The larger project Satisfying free-form service requests Resolving encountered difficulties Focus on resolution for: Under constrained systems of constraints Over constrained systems of constraints System demo Concluding remarks
Challenges for Web Services Help users find and use services Reduce requirements for service specification and resolution I want to see a dermatologist between the 12th and 15th, at 1:00 PM or after. The dermatologist should be within 15 miles from my home and must accept my IHC insurance.
A Conceptual-Modeling Solution Domain Ontology Has a single object set of interest (e.g. Appointment) Establishes requirements for insertion of a single object into the object set of interest (e.g. requirements for making an appointment) Has extensional recognizers (i.e. can match request to requirements) Process Ontology Recognizes constraints Obtains information (from DB and from user) Satisfies constraints Resolves issues (if necessary)
Domain Ontology object set of interest optional mandatory functional
Domain Ontology: Data Frames Time … textual representation: ([2-9]|1[012]?)\s*:\s*([0-5]\d)\s*[AaPp]\s* \.?\s* [Mm]\s* \.?) TimeAtOrAfter(t1: Time, t2: Time) returns (Boolean) contextual keywords/phrases: (at\s+)?Time\s+or\s+after|… … Address … DistanceBetweenAddresses(a1: Address, a2: Address) returns (Distance) … Distance … textual representation: ((\d+(\.\d+)?)|(\.\d+)) … DistanceLessThanOrEqual(d1: Distance, d2: Distance) returns (Boolean) contextual keywords/phrases: (within|not\s+more\s+than |<\s*=|…)\s+Distance … Time … textual representation: ([2-9]|1[012]?)\s*:\s*([0-5]\d)\s*[AaPp]\s* \.?\s* [Mm]\s* \.?) TimeAtOrAfter(t1: Time, t2: Time) returns (Boolean) contextual keywords/phrases: (at\s+)?Time\s+or\s+after|… … Address … DistanceBetweenAddresses(a1: Address, a2: Address) returns (Distance) … Distance … textual representation: ((\d+(\.\d+)?)|(\.\d+)) … DistanceLessThanOrEqual(d1: Distance, d2: Distance) returns (Boolean) contextual keywords/phrases: (within|not\s+more\s+than |<\s*=|…)\s+Distance … Time … textual representation: ([2-9]|1[012]?)\s*:\s*([0-5]\d)\s*[AaPp]\s* \.?\s* [Mm]\s* \.?) TimeAtOrAfter(t1: Time, t2: Time) returns (Boolean) contextual keywords/phrases: (at\s+)?Time\s+or\s+after|… … Address … DistanceBetweenAddresses(a1: Address, a2: Address) returns (Distance) … Distance … textual representation: ((\d+(\.\d+)?)|(\.\d+)) … DistanceLessThanOrEqual(d1: Distance, d2: Distance) returns (Boolean) contextual keywords/phrases: (within|not\s+more\s+than |<\s*=|…)\s+Distance … Time … textual representation: ([2-9]|1[012]?)\s*:\s*([0-5]\d)\s*[AaPp]\s* \.?\s* [Mm]\s* \.?) TimeAtOrAfter(t1: Time, t2: Time) returns (Boolean) contextual keywords/phrases: (at\s+)?Time\s+or\s+after|… … Address … DistanceBetweenAddresses(a1: Address, a2: Address) returns (Distance) … Distance … textual representation: ((\d+(\.\d+)?)|(\.\d+)) … DistanceLessThanOrEqual(d1: Distance, d2: Distance) returns (Boolean) contextual keywords/phrases: (within|not\s+more\s+than |<\s*=|…)\s+Distance …
I want to see a dermatologist between the 12th and 15th, at 1:00 PM or after. The dermatologist should be within 15 miles from my home and must accept my IHC insurance. Appointment context keywords/phrase: “appointment |want to see a |…” Time textual representation: “([2-9]|1[012]?)\s*:\s*([0-5]\d)\s*[AaPp]\s* \.?\s* [Mm]\s* \.?)” TimeAtOrAfter(t1: Time, t2: Time) returns (Boolean) contextual keywords/phrases: (at\s+)?Time\s+or\s+after|… Date DateBetween(x1: Date, x2: Date, x3: Date) returns(Boolean) contextual keywords/phrases: between\s+the\s+Date\s+and\s+Date …. Distance textual representation: ((\d+(\.\d+)?)|(\.\d+)) context keywords/phrases: miles? | kilometers? | … DistanceLessThanOrEqual(d1: Distance, d2: Distance) returns (Boolean) contextual keywords/phrases: (within|…)\s+Distance|… Example
I want to see a dermatologist between the 12th and 15th, at 1:00 PM or after. The dermatologist should be within 15 miles from my home and must accept my IHC insurance. Appointment context keywords/phrase: “appointment |want to see a |…” Time textual representation: “([2-9]|1[012]?)\s*:\s*([0-5]\d)\s*[AaPp]\s* \.?\s* [Mm]\s* \.?)” TimeAtOrAfter(t1: Time, t2: Time) returns (Boolean) contextual keywords/phrases: (at\s+)?Time\s+or\s+after|… Date DateBetween(x1: Date, x2: Date, x3: Date) returns(Boolean) contextual keywords/phrases: between\s+the\s+Date\s+and\s+Date …. Distance textual representation: ((\d+(\.\d+)?)|(\.\d+)) context keywords/phrases: miles? | kilometers? | … DistanceLessThanOrEqual(d1: Distance, d2: Distance) returns (Boolean) contextual keywords/phrases: (within|…)\s+Distance|… Part of this is about finding the right ontology.
Marked-Up Domain Ontology Distance DistanceLessThanOrEqual(d1: Distance, “15”) TimeAtOrAfter(t1: Time, “1:00 PM”) DateBetween(x1: Date, “12th”, “15th”) InsuranceEqual(i1: Insurance, “IHC”)
Relevant Object and Relationship Sets Identification
Relevant Object & Relationship Sets Dermatologist(y) is at Address(z) Appointment(x) is with Dermatologist(y)
Relevant Operations TimeAtOrAfter(t 1 : Time, “1:00 PM”) DateBetween(x 1 : Date, “12th”, “15th”) InsuranceEqual(i 1 : Insurance, “IHC”) DistanceLessThanOrEqual(d 1 : Distance, “15”) Appointment(x 0 ) is at Time(t 1 ) /\ TimeAtOrAfter(t 1, “1:00 PM”) DateBetween(x 1 : Date, “12th”, “15th”) InsuranceEqual(i 1 : Insurance, “IHC”) DistanceLessThanOrEqual(d 1 : Distance, “15”) Appointment(x 0 ) is at Time(t 1 ) /\ TimeAtOrAfter(t 1, “1:00 PM”) Appointment(x 0 ) is at Date(x 1 ) /\ DateBetween(x 1, “12th”, “15th”) Dermatologist(x 1 ) accepts Insurance(i 1 ) /\ InsuranceEqual(i 1, “IHC”) DistanceLessThanOrEqual(d 1 : Distance, “15”) Appointment(x 0 ) is at Time(t 1 ) /\ TimeAtOrAfter(t 1, “1:00 PM”) Appointment(x 0 ) is at Date(x 1 ) /\ DateBetween(x 1, “12th”, “15th”) Dermatologist(x 1 ) accepts Insurance(i 1 ) /\ InsuranceEqual(i 1, “IHC”) DistanceLessThanOrEqual(d 1 : Distance, “15”) Appointment(x 0 ) is at Time(t 1 ) /\ TimeAtOrAfter(t 1, “1:00 PM”) Appointment(x 0 ) is at Date(x 1 ) /\ DateBetween(x 1, “12th”, “15th”) Dermatologist(x 1 ) accepts Insurance(i 1 ) /\ InsuranceEqual(i 1, “IHC”) DistanceLessThanOrEqual(DistanceBetweenAddresses(a 1, a 2 ), “15”) … Address … DistanceBetweenAddresses(a 1 : Address, a 2 : Address) returns (Distance) … Appointment(x 0 ) is at Time(t 1 ) /\ TimeAtOrAfter(t 1, “1:00 PM”) Appointment(x 0 ) is at Date(x 1 ) /\ DateBetween(x 1, “12th”, “15th”) Dermatologist(x 1 ) accepts Insurance(i 1 ) /\ InsuranceEqual(i 1, “IHC”) Dermatologist(x 1 ) is at Address(a 1 ) /\ Person(x 2 ) is at Address(a 2 ) /\ DistanceLessThanOrEqual(DistanceBetweenAddresses(a 1, a 2 ), “15”)
Generated Constraints Appointment(x 0 ) is with Dermatologist(x 1 ) /\ Appointment(x 0 ) is for Person(x 2 ) /\ Dermatologist(x 1 ) has Name(x 3 ) /\ Person(x 2 ) has Name(x 4 ) /\ Appointment(x 0 ) is on Date(x 5 ) /\ DateBetween(x 5, “12th”, “15th”) /\ Appointment(x 0 ) is at Time(x 6 ) /\ TimeAtOrAfter(x 6, “1:00 PM) /\ Dermatologist(x 1 ) is at Address(x 7 ) /\ Person(x 2 ) is at Address(x 8 ) /\ DistanceLessThanOrEqual(DistanceBetweenAddresses(x 7, x 8 ), “15”) /\ Dermatologist(x 1 ) accepts Insurance(x 9 ) /\ InsuranceEqual(x 9, “IHC”)
Process Ontology Create service-request view Generate constraints Obtain information From system From user Satisfy constraints Resolve difficulties Finalize service request
Information from System
Generated Database Query { | Appointment(x 0 ) is with Dermatologist(x 1 ) /\ Dermatologist(x 1 ) has Name(x 3 ) /\ Appointment(x 0 ) is on Date(x 5 ) /\ DateBetween(x 5, “12th”, “15th”) /\ Appointment(x 0 ) is at Time(x 6 ) /\ TimeAtOrAfter(x 6, “1:00 PM) /\ Dermatologist(x 1 ) is at Address(x 7 ) /\ Dermatologist(x 1 ) accepts Insurance(x 9 ) /\ InsuranceEqual(x 9, “IHC”) }
Information from User Some variables cannot be instantiated from the database. Person(x 2 ) Name(x 4 ) Address(x 8 ) Non-lexical values can be instantiated without particular values. The system asks for values for lexical values. Name (of Person) for Appointment? Address (of Person) for Appointment?
Constraint Satisfaction Exactly one solution: return it as the result A few solutions: return all and ask the user to select one Too many solutions (under constrained): resolve No solutions (over constrained): resolve Over the Instantiated Values
Under Constrained “I want a dodge, a 2000 or newer. The Mileage should be less than 80,000 and the price should not exceed $15,000” SolutionMakeModelPriceYearMileage S1DodgeStratus9, ,808 S2DodgeStratus14, ,694 S3DodgeStratus14, ,543 S4DodgeStratus2, ,424 S5DodgeStratus6, ,000 … … S168DodgeStratus9, ,060 November 2005
Over Constrained “I want a dodge, a 2000 or newer. The Mileage should be less than 80,000 and the price should not exceed $4,000.” Sorry No car matches your request. November 2005
Key Observations Some (near) solutions are better than others. People specify constraints on some concepts in a domain more often than on other concepts.
Fundamental Concepts: Reward, Penalty, and Expectation A reward is zero or a positive real number given to a solution for satisfying a constraint. A penalty is a negative real number given to a near solution for violating a constraint. An expectation for a concept is the probability that a constraint for the concept will be specified.
Fundamental Concepts: Pareto Optimality Based on dominance relations The reward for S1 is as high as the reward for S2 For at least one reward S1 has a higher reward Dominated solutions are not Pareto optimal
Too Many Solutions: Reward-Based Ordering Calculate rewards and combine them Order solutions, highest combined reward first Select the top-m Pareto optimal solutions
Example “I want a dodge a 2000 or newer. The mileage should be less than 80,000 and the price should not be more than $15,000.” Solution Make Model Price Year Mileage S1 Dodge Stratus 13, ,775 S2 Dodge Stratus 11, ,404 S3 Dodge Stratus 14, ,008 S4 Dodge Stratus 14, ,954 S5 Dodge Stratus 10, ,608 S1 better The sameS1 better
Too Many Solutions: Expectation-Based Constraint Elicitation Associate expectations with domain concepts. Order the concepts in a domain based on their expectations. e.g. make > price > model > … Elicit additional constraints over unconstrained concepts. e.g. If no preferred make provided, ask for make; if no price, ask for price; …
No Solution: Penalty-Based Ordering Calculate penalties and combine them. Order close solutions, lowest combined penalty first. Select the top-m Pareto optimal near solutions. Ask if constraints can be relaxed, but only ask about a few (so as not to be bothersome).
Example Near SolutionInsuranceDistanceTimeDate S1IHC161:00 PMthe 19th S2IHC181:10 PMthe 19th S3IHC412:40 PMthe 19th S4IHC612:50 PMthe 19th S5IHC203:00 PMthe 19th Near Solution Insurance=“IHC” Expectation: 0.4 Distance 5 Expectation: 0.3 Time “1:00 PM” Expectation: 0.8 Date=“the 20th” Expectation: 0.9 exp plty S S S S S “I want to see a dermatologist on the 20th, 1:00 PM or after. The dermatologist should be within 5 miles from my home and must accept my IHC insurance.” Can this constraint “1:00 PM or after” be relaxed to “12:40 PM”? Can this constraint “the 20th” be relaxed to “the 19th”? 12:40 PMthe 19th
Demo
Performance Analysis (Correspondence to Human Expectations) Tested appointment and car-purchase domains 16 human subjects The best-5 near solutions from 19 appointments The best-5 solutions from 32 cars Compared human selection with system selection
Performance Analysis (appointment domain)
Performance Analysis (car-purchase domain)
Concluding Remarks Simplification of everyday service request specification Free-form service request Ontology-based recognition of constraints Constraint satisfaction Resolution for under and over constrained requests Ordered expectations Ordered penalty/reward Pareto optimality Inter-observer agreement test: “Substantial Agreement” Status of prototype implementation