cooperative query answering based on a talk by erick martinez
TRANSCRIPT
![Page 1: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/1.jpg)
Cooperative Query Answering
Based on a talk by Erick Martinez
![Page 2: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/2.jpg)
MOTIVATION:
Responses to queries posed by a user of a database do not always contain the information required
DB and information systems are often hard to use because they do not explicitly attempt to cooperate with their users. They answer literally the queries posed to them
A user might need more information than requested, or might actually need different information
An answer with extra or alternative information may be more useful and less misleading to a user
![Page 3: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/3.jpg)
Cooperative Answer (CA)
A CA should be a correct, non-misleading, and useful answer to a query.
![Page 4: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/4.jpg)
Grice's maxims
Maxim of Quality: a system should never give an answer which might mislead the user
Maxim of Quantity: an answer should not be more informative, or more detailed, than necessary
Maxim of Relation: an answer should be always relevant to the user who asked the question
Maxim of Manner: an answer should not be ambiguous, leaving the user with choices to make about its meaning
Q0: “Which students are enrolled?A0: “joana, jacob, shakil, …“
A0: “X. student(X)“
![Page 5: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/5.jpg)
Database Stonewalling
Q1: "Who passed COSC6115 in the winter semester of 2001?A1: “No one“
Q2: "Who failed COSC6115 in the winter semester of 2001?A2: “No one“
Q3: "Who taught COSC6115 in the winter semester of 2001?A3: “No one"
DB stonewall - will answer a yes/no question with a yes or no regardless of whether the answer is misleading.
![Page 6: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/6.jpg)
QUERY / ANSWER SYSTEMS
Natural language interfaces Databases (relational) Logic programming and deductive databases(*)
![Page 7: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/7.jpg)
TECHNIQUES
Evaluation of presuppositions in a query(*)
Detection and correction of misconceptions in a query(*)
Relaxation and generalization of queries and responses(*)
Consideration of specific information about a user's state of mind
Formulation of intensional answers
![Page 8: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/8.jpg)
Presuppositions:
Usually, asking a query not only presupposes the existence of all components of the query, but also presupposes an answer to the query itself.
i.e. "Which employees own red cars?“Q4: emp(X), owns(X,Y), car(Y), red(Y).
Two atoms in a query are joined if they share a variable.
A query is connected if every two atoms in the query are connected.
2n - 2 sub-queries for a conjunctive query with n atoms (exp. cost)
Algorithm: Report the smallest sub-queries that fail, considering only connected sub-queries
TECHNIQUES
![Page 9: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/9.jpg)
Lattice of sub-queries:
If a sub-query has no answers, the query cannot have any answers either (scalar implicature)
Finding presuppositions (failed sub-queries) is independent of domain specific knowledge.
Q 4: " W h ic h e m p loy e e s o w n red c ars?“
< - em p(X ). < - ow n s(X ,Y ).
< - em p(X ),ow ns(X ,Y ).
< - ow n s(X ,Y ),car(Y ).
< - em p(X ),ow ns(X ,Y ),
car(Y ).
< - em p(X ),ow ns(X ,Y ),
red(Y ).
< - ow n s(X ,Y)red(Y ).
< - car(Y ). < - red(Y ).
< - car(Y ),red(Y ).
< - ow n s(X ,Y ),car(Y ),red(Y ).
< - em p(X ), ow n s(X ,Y ),car(Y ), red(Y ).
TECHNIQUES
Presuppositions:
![Page 10: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/10.jpg)
Misconceptions:
Integrity constraints:IC1: professor(X), student(X).IC2: enrolled_in(X, Y), not student(X).
Query:"Which professor is enrolled in COSC6115?“
Q5: professor(X), enrolled_in(X, COSC6115).
Answer:“No one is both a professor and a student. Anyone who is enrolled in a class is a student. So no one is a professor and enrolled in class.“
TECHNIQUES
![Page 11: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/11.jpg)
… Relaxation:
Original query:Q6 : flight(‘Dulles, ‘Orly’).
Q6r : relax (flight(‘Dulles, ‘Orly’)).
Relaxing via reciprocal clause C6T :
Q6r’ : serves_area(‘Dulles, From), serves_area(‘Orly’, To),
travel(From, To) .
Resolving with taxonomy clause C6 :Q6r’’ : serves_area(‘Dulles, From),
serves_area(‘Orly’, To), serves_area(A, From),
serves_area(B, To), flight(A, B) .
C6: travel(From, To) serves_area(A, From),
serves_area(B, To), flight(A,B) *.
C6T: relax(flight(A,B) ) serves_area(A, From),
serves_area(B, To), travel(From, To) .
TECHNIQUES
![Page 12: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/12.jpg)
Generalization:
Relaxation is strictly a syntactic notion, a rewrite mechanism. Generalization is a semantic counterpart to relaxation.
Literal answers to the relaxed query should include answers to the original query, plus some new neighbourhood answers with respect to the original query.
C6T: relax(flight(A,B) )
serves_area(A, From), serves_area(B,
To), travel(From, To) .
TECHNIQUES
After applying relaxation a new query is a generalization only if all the non-key atoms are satisfied whenever the key atom is satisfied. (conservative reciprocal clause)
When all reciprocal clauses are conservative, resolution over a relaxed query will produce all the answers of the original query.
![Page 13: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/13.jpg)
USER GOALS AND MODELS
Types of knowledge about a user relevant to CA
Interests and preferences Needs – user constraints (UC) Goals and intent
![Page 14: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/14.jpg)
KEY POINTS:
CA is mostly intended for DDB as a platform. For RDB, a deductive database interface should be
implemented on top of any relational system. The system should support natural language input to some
extend for some domains (the natural language translator generates a logical query)
The system should produce natural language responses CA techniques, in particular relaxation, can useful for
applications like Internet queries It is not evident that first order logic can serve as an
adequate ontology for CA
![Page 15: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/15.jpg)
The End
![Page 16: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/16.jpg)
A CA SYSTEM (at U of Maryland)
Uniform system:– Defined and implemented through logic– Uniform representation and support for all cooperative
methods Portable
– General approach for RDB, DDB and logic programs– Domain-independent
Natural language interface– Accept natural language queries– Provide cohesive and coherent responses in natural language
![Page 17: Cooperative Query Answering Based on a talk by Erick Martinez](https://reader036.vdocuments.site/reader036/viewer/2022082612/56649de65503460f94adf925/html5/thumbnails/17.jpg)
Deductive Database Structure:
EDB: prerequisite(‘MATH-300’, ‘MATH-350’). prerequisite(‘MATH-350’, ‘MATH-400’).
teaches(smith, ‘MATH-400’).
… IDB : teaches(X, Y) teaches(X, Z) , prerequisite(Y, Z).
… IC : enrolled_in(X, Y), not student(X).
…