Skip to content

UKP-SQuARE/square-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



Website Docs Repo SQuARE v1 SQuARE v2

Flexible and Extensible Question Answering Platform

SQuARE is a flexible and extensible Question Answering (QA) platform to enable users to easily implement, manage and share their custom QA pipelines (aka Skills in SQuARE).

Two ways are supported to use SQuARE:

  1. 🌐 Get access to the existing QA Skills (and even deploy your Skill!) via our demo page;
  2. 💾 Or clone and install SQuARE to host services on a local machine.

Why SQuARE?

Recent advances in NLP and information retrieval have given rise to a diverse set of question answering tasks that are of different formats (e.g., extractive, abstractive), require different model architectures (e.g., generative, discriminative) and setups (e.g., with or without retrieval). Despite having a large number of powerful, specialized QA pipelines (a.k.a., Skills) that consider a single domain, model or setup, there exists no framework where users can easily explore and compare such pipelines and can extend them according to their needs.

To address this issue, we present SQuARE, an extensible online QA platform for researchers which allows users to query and analyze a large collection of modern Skills via a user-friendly web interface and integrated behavioural tests. In addition, QA researchers can develop, manage and share their custom Skills using our microservices that support a wide range of models (Transformers, Adapters, ONNX), datastores and retrieval techniques (e.g., sparse and dense).

Find out more about the project on UKPs Website.

Get Started

👉 If you want to use the SQuARE public service online, you can refer to Online Service for using the existing skills and refer to Add New Skills for adding new skills.

👉 If you want to deploy SQuARE locally yourself, please refer to Local Installation.

👉 For illustration of the architecture, please refer to Architecture.

👉 And welcome to contact us.

Online Service

Try out the on-the-go skills on the demo page! The existing skills include span-extraction, abstractive, multi-choice QA with contexts or without contexts (open QA based on retrieval).

Screenshot



Add New Skills

To add new skills, please see the skills section.

Local Installation

One can also refer to this minimal version for a simpler local setup.

Requirements

To run UKP-SQuARE locally, you need the following software:

Install

Next change the environment to local and os to your operating system in the config.yaml.
Now, modify your /etc/hosts to contain:

127.0.0.1   square.ukp-lab.localhost

For installation we provide a script that takes care of the entire setup for you. After installing the previous requirements, simply run:

bash install.sh

Run

Finally, you can run the full system with docker-compose. Before doing so, you might want to reduce the number of models running depending on your resources. To do so, remove the respective services from the docker-compose.

docker-compose up -d

Check with docker-compose logs -f if all systems have started successfully. Once they are up and running go to square.ukp-lab.localhost. 👉 Accept that the browser cannot verify the certificate.

Add Skills

Add Skills according to the Add New Skills section. Note that, for open-domain skills the datastore need to created first.

Architecture

For a whole (open QA) skill pipeline, it requires 6 steps:

  1. First a user selects a Skill and issues a query via the user interface;
  2. The selected QA Skill forwards the query to the respective Datastore for document retrieval;
  3. The Datastore gets the query embedding from the Models, uses it for semantic document retrieval and returns the top documents to the Skill;
  4. The Skill sends the query and retrieved documents to the reader model for answer extraction;
  5. Finally, the answers are shown to the user;
  6. Optionally, the user can view the results of the predefined behavioural tests for the Skill.



Contact

The current main contributors of this repository are:

Contact person: Haritz Puerto (UI and general questions), Tim Baumgärtner (Skills), Kexin Wang (Datastores), Rachneet Singh Sachdeva (Models),

Previous contributors:

https://www.ukp.tu-darmstadt.de/

Don't hesitate to send us an e-mail or report an issue, if something is broken (and it shouldn't be) or if you have further questions.

Citation

If you find our work useful, please consider citing our ACL and AACL papers.

SQuARE v1@ACL 2022 Demo Track.

@inproceedings{baumgartner-etal-2022-ukp,
    title = "{UKP}-{SQ}u{ARE}: An Online Platform for Question Answering Research",
    author = {Baumg{\"a}rtner, Tim  and
      Wang, Kexin  and
      Sachdeva, Rachneet  and
      Geigle, Gregor  and
      Eichler, Max  and
      Poth, Clifton  and
      Sterz, Hannah  and
      Puerto, Haritz  and
      Ribeiro, Leonardo F. R.  and
      Pfeiffer, Jonas  and
      Reimers, Nils  and
      {\c{S}}ahin, G{\"o}zde  and
      Gurevych, Iryna},
    booktitle = "Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics: System Demonstrations",
    month = may,
    year = "2022",
    address = "Dublin, Ireland",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.acl-demo.2",
    doi = "10.18653/v1/2022.acl-demo.2",
    pages = "9--22",
}

SQuARE v2@AACL 2022 Demo Track.

@inproceedings{sachdeva-etal-2022-ukp,
    title = "{UKP}-{SQ}u{ARE} v2: Explainability and Adversarial Attacks for Trustworthy {QA}",
    author = {Sachdeva, Rachneet  and
      Puerto, Haritz  and
      Baumg{\"a}rtner, Tim  and
      Tariverdian, Sewin  and
      Zhang, Hao  and
      Wang, Kexin  and
      Saadi, Hossain Shaikh  and
      Ribeiro, Leonardo F. R.  and
      Gurevych, Iryna},
    booktitle = "Proceedings of the 2nd Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the 12th International Joint Conference on Natural Language Processing: System Demonstrations",
    month = nov,
    year = "2022",
    address = "Taipei, Taiwan",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.aacl-demo.4",
    pages = "28--38",
}

SQuARE v3@ACL 2023 Demo Track.

@inproceedings{puerto-etal-2023-ukp,
    title = "{UKP}-{SQ}u{ARE} v3: A Platform for Multi-Agent {QA} Research",
    author = {Puerto, Haritz  and
      Baumg{\"a}rtner, Tim  and
      Sachdeva, Rachneet  and
      Fang, Haishuo  and
      Zhang, Hao  and
      Tariverdian, Sewin  and
      Wang, Kexin  and
      Gurevych, Iryna},
    editor = "Bollegala, Danushka  and
      Huang, Ruihong  and
      Ritter, Alan",
    booktitle = "Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations)",
    month = jul,
    year = "2023",
    address = "Toronto, Canada",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2023.acl-demo.55",
    doi = "10.18653/v1/2023.acl-demo.55",
    pages = "569--580",
}

If you want to use SQuARE for teaching an NLP course, check our paper: UKP-SQuARE: An Interactive Tool for Teaching Question Answering

@inproceedings{fang-etal-2023-ukp,
    title = "{UKP}-{SQ}u{ARE}: An Interactive Tool for Teaching Question Answering",
    author = "Fang, Haishuo  and
      Puerto, Haritz  and
      Gurevych, Iryna",
    editor = {Kochmar, Ekaterina  and
      Burstein, Jill  and
      Horbach, Andrea  and
      Laarmann-Quante, Ronja  and
      Madnani, Nitin  and
      Tack, Ana{\"\i}s  and
      Yaneva, Victoria  and
      Yuan, Zheng  and
      Zesch, Torsten},
    booktitle = "Proceedings of the 18th Workshop on Innovative Use of NLP for Building Educational Applications (BEA 2023)",
    month = jul,
    year = "2023",
    address = "Toronto, Canada",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2023.bea-1.17",
    doi = "10.18653/v1/2023.bea-1.17",
    pages = "195--204",
}

This repository contains experimental software and is published for the sole purpose of giving additional background details on the respective publication. We are not held responsible for errors, false, or offensive content generated by the deployed models.