LHRLAB / ChatKBQA

[ACL 2024] Official resources of "ChatKBQA: A Generate-then-Retrieve Framework for Knowledge Base Question Answering with Fine-tuned Large Language Models".
https://doi.org/10.18653/v1/2024.findings-acl.122
MIT License
272 stars 23 forks source link

How to transform s-expr / sparql_query to path? #17

Closed quqxui closed 4 months ago

quqxui commented 4 months ago

Hi, thank for your great job.

Do you know how to transform a s-expr / sparql_query to a path from source entity to target entity? Rather than only get the final answer with execute_query_with_odbc(sparql_query)

I'm not familirary about the SPARQL system and the usages of pyodbc.

Any assistance you could provide would be greatly appreciated.

LHRLAB commented 4 months ago

You can output all intermediate variables in the SELECT part of SPARQL.

quqxui commented 4 months ago

Thank you!