This code is for the TIQ benchmark proposed in our WWW'24 full paper "Faithful Temporal Question Answering over Heterogeneous Sources".
Please visit the following repo LINK to access the code for the FAITH method.
In this paper, we construct a new benchmark with focus on implicit temporal questions.
This construction process operates as follows:
- (i) sample a set of topic entities to start with;
- (ii) retrieve temporal information snippets for each such topic entity from Wikipedia text, Wikipedia infoboxes, and Wikidata;
- (iii) concatenate information snippets using a suitable temporal signal and construct an interrogative sentence, a pseudo-question;
- (iv) rephrase the pseudo-question into a natural question using a generative model.
For more details see our paper: Faithful Temporal Question Answering over Heterogeneous Sources and visit our project website: https://qa.mpi-inf.mpg.de/tiq.
If you use this code, please cite:
@article{jia2024faithful,
title={Faithful Temporal Question Answering over Heterogeneous Sources},
author={Jia, Zhen and Christmann, Philipp and Weikum, Gerhard},
journal={arXiv preprint arXiv:2402.15400},
year={2024}
}
We recommend the installation via conda, and provide the corresponding environment file in environment.yml:
git clone https://github.com/zhenjia2017/TIQ.git
cd TIQ/
conda env create --file environment.yml
conda activate tiq
pip install -e .
Alternatively, you can also install the requirements via pip, using the requirements.txt file.
TIQ makes use of CLOCQ for retrieving facts from WIKIDATA. CLOCQ can be conveniently integrated via the publicly available API, using the client from the repo.
You need the following data. You can download from here:
- wikipedia_wikidata_mappings.pickle
- wikipedia_mappings.pickle
- wikidata_mappings.pickle
- types.pickle
- labels.pickle
- augmented_wikidata_mappings.pickle
To construct the benchmark requires following major steps.
bash scripts/pipeline.sh --year-page-retrieve <PATH_TO_CONFIG>
bash scripts/pipeline.sh --pseudoquestion-generate <PATH_TO_CONFIG>
bash scripts/pipeline.sh --question-rephrase <PATH_TO_CONFIG>