Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

TEQUILA + TempQuestions


This repository contains the code and data for our CIKM'18 short paper. In this paper, we present TEQUILA, an enabler method for temporal QA that can run on top of any KB-QA engine. TEQUILA has four stages. It detects if a question has temporal intent. It decomposes and rewrites the question into non-temporal sub-questions and temporal constraints. Answers to sub-questions are then retrieved from the underlying KB-QA engine. Finally, TEQUILA uses constraint reasoning on temporal intervals to compute final answers to the full question. Comparisons against state-of-the-art baselines show the viability of our method.


An example of TEQUILA pipeline including the steps of "decompose and rewrite", "answer sub-questions", and "reason on time intervals".

For more details see our paper: TEQUILA: Temporal Question Answering over Knowledge Bases and visit our project website:



The system contains two parts:

  • tequila-front: it realizes the functions of detecting temporal questions, decomposing and rewriting sub-questions, and reasoning, and it is implemented in JAVA.
  • backend: it provides the underlying KBQA service and a plug-in for the service to answer sub-questions and retrieve dates related to candidate answers. Backend is implemented in Python.


We use AQQU as the underlying KB-QA system, you should install AQQU first and then copy the following two files into the "data" directory.

  • temporal-predicate-pairs
  • stop-words

After installing AQQU, please replace the modules with the following files:


Change the base file path in config.cfg according to your system.

Start the underlying QA service using the following command:



The file "" in "org.tempo.testsample" provides an example to take the question with parameters as the input, access the underlying QA service, return the results including answers and other intermediated results in a JSON object.

The definition of the parameters are in "org.tempo.Util". You should set global configurations ( such as the gloabal source folder or the base file path, etc. according to your system.

If you want to reproduce the system without installing AQQU, you can set the parameter "qaMode" with "OFFLINE". TEQUILA provides the sub-question answers files (TempQuestions_allsubquestion_aqqu.txt and TempQuestions_allsubquestion_quint.txt) for the questions in TempQuestions Dataset.

The following files required are provided in "source\dictionary" directory:

  • temporal-predicate-pairs: temporal predicate pairs
  • event_dictionary_only.txt: event dictionary
  • TempQuestions_allsubquestion_aqqu.txt: answers to sub-questions from AQQU
  • TempQuestions_allsubquestion_quint.txt: answers to sub-questions from QUINT

If you use this code, please cite:

 author = {Jia, Zhen and Abujabal, Abdalghani and Saha Roy, Rishiraj and Str\"{o}tgen, Jannik and Weikum, Gerhard},
 title = {{TEQUILA: Temporal Question Answering over Knowledge Bases}},
 booktitle = {Proceedings of the 27th ACM International Conference on Information and Knowledge Management},
 series = {CIKM '18},
 year = {2018},
 isbn = {978-1-4503-6014-2},
 location = {Torino, Italy},
 pages = {1807--1810},
 numpages = {4},
 url = {},
 doi = {10.1145/3269206.3269247},
 acmid = {3269247},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {question answering, question decomposition, temporal questions},

If you face any issues when using the code please feel free to contact Zhen Jia (, Rishiraj Saha Roy ( or Gerhard Weikum (


Code for our CIKM'18 paper "TEQUILA: Temporal Question Answering over Knowledge Bases"






No releases published


No packages published