nl to sparql models revisited (and csv to nl!) #4079
Replies: 2 comments 2 replies
-
Hello @donaldziff that sounds like a great project idea. You could definitely use the same process that we used two years ago. An alternative is not to train any model but use large language models like GPT-3. For example, you could use Haystack's PromptNode with an OpenAI api key and create a PromptTemplate that instructs the model to translate the NL question into a SPARQL query. Here is our documentation page about PromptNode and the creation of PromptTemplate Similarly, you could use the PromptNode with a custom template to translate csv or json results into NL answers. For example, the template could be sth like: Good luck with your Master's project! |
Beta Was this translation helpful? Give feedback.
-
Thanks very much @julian-risch ! I do have a few follow-ups: I like the idea you outline as an alternative, partly because I tried to sell my team on that idea, but they didn't bite :-). Maybe we will reconsider it now. But, if we go the other route, perhaps I'm missing something obvious: what kind of model did you start with? Was it a model that already knew something about sparql generation? Or did you start with some flavor of BERT and the only training it got for generating sparql was the LC-QuAD dataset, and then the fine-tuning on Harry Potter? BTW, in your answer you refer to a page: https://haystack.deepset.ai/docs/latest/knowledgegraphmd but it doesn't exist. Thanks agaiun, Donald (Max) Ziff |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! My team and I are interested in implementing an end to end KGQA system over (wikibase) for our Master's project. I read this discussion and it was very helpful. Thanks for your description of how you created the Harry Potter model. I agree with the other commenters about your step 2! I love that idea.
We have two open-ended questions:
Thanks in advance for any help you can give.
Donald "Max" Ziff
Beta Was this translation helpful? Give feedback.
All reactions