Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChatGPT cannot consistently generate the right SPARQL. #7

Closed
candlecao opened this issue Aug 28, 2024 · 3 comments
Closed

ChatGPT cannot consistently generate the right SPARQL. #7

candlecao opened this issue Aug 28, 2024 · 3 comments
Assignees
Labels

Comments

@candlecao
Copy link
Contributor

candlecao commented Aug 28, 2024

Even if I gave very detailed context prior to putting forward the question...
---ChatGPT cannot consistently generate the right SPARQL.

The possible way to solve it is:
using python to get GPT's API and prompt it to
(1)run a SPARQL query on an SPARQL endpoint and get the error report and "introspect" the results;
(2)generate more than one SPARQL results for comparison...
(3)... or enhance the interaction of "question-answer" with users to ensure more accurate and context-aware responses.
(4)Extract classes and properties from the natural language question and then assemble them as a "sub graph" of the graph of the whole ontology. Then examine the connectivity of the sub graph. That's why I set up the issue DDMAL/linkedmusic-datalake#162
If the sub graph is well connected, it means the question is executable against the database.
...
We don't have to avoid the ontology which "essentially won't interfere with the extendibility and flexibility of RDF graph." See: DDMAL/linkedmusic-datalake#169.

See the draft https://github.com/DDMAL/linkedmusic-queries/blob/main/LLM2SPARQL_TheSession_WikiData_MusicBrainz/trial.py.

@candlecao candlecao self-assigned this Aug 28, 2024
@candlecao
Copy link
Contributor Author

candlecao commented Aug 28, 2024

Use SPARQL to explore the latent ontology of the RDF graph may also be a supplementary method. I mentioned it in: DDMAL/linkedmusic-datalake#88

@fujinaga
Copy link
Member

For now, ChatGPT doesn't need to generate the correct answer every time. Users of ChatGPT are learning that sometimes you need to ask ChatGPT several times before getting the correct answer. Also, ChatGPT is improving at an amazing rate!

@candlecao
Copy link
Contributor Author

OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants