UKP-SQuARE / square-core

SQuARE: Software for question answering research.
https://square.ukp-lab.de
Apache License 2.0
71 stars 14 forks source link

Showing SPARQL query in UI #459

Open HaritzPuerto opened 1 year ago

HaritzPuerto commented 1 year ago

Hi,

I can print the sparql from https://github.com/UKP-SQuARE/square-core/tree/master/skills/kgqa-kqapro in the UI if it's always returned. To do this, we would need to update the API schema though... and it's getting a bit bulky

Is showing the sparql actually useful? I would indeed help for explainability though

afaik, right now sparql is not only shown for syntax errors in the sparql

HaishuoFang commented 1 year ago

Currently, SPARQL will only be shown when it cant get the answer from back-end KG. This could be caused by two reasons:

  1. syntax error. 2. No answer in the KG. I do a if-else condition in the skill-api to write answer/sparql into the skill output

I agree showing SPARQL would be helpful for explainability. Do we need to change the prediction constructor to make it work?

HaritzPuerto commented 1 year ago

yes, I think we would need to change the prediction construction, but @timbmg may give a better answer