Wikidata:Requests for permissions/Bot/SpinachBot

SpinachBot (talkcontribsnew itemsnew lexemesSULBlock logUser rights logUser rightsxtools)
Operator: HTriedman (WMF) (talkcontribslogs)

Task/s: AI agent-enabled question answering through the creation and execution of complex SPARQL queries on Wikidata. Users tag the bog with wikidata-related questions, and it tries to come up with an answer by iteratively creating SPARQL queries.

Code: https://gitlab.wikimedia.org/htriedman/spinach-bot

Function details: When a properly-formatted query is submitted to SpinachBot (enclosed in spinachbot top and spinachbot bottom template tags and the bot is @-tagged), the bot will use chain of thought prompting combined with a limited set of actions it can take (searching Wikidata for a natural language term/ID, getting all statements for a specific QID, running a SPARQL query, and halting) to attempt to create a functional SPARQL query that answers the prompt. If it is unsuccessful, it will suggest some further directions to pursue. After it answers, users can reply to the bot, tagging it, and asking follow-up questions in a discussion format.

Some examples of test interactions between myself and the bot:

Right now, the bot is not online on toolforge; I'm running it on my local machine as we test and debug. However, in the near future, I'm hoping to automate it to run and reply to users every 10-15 minutes on toolforge. --HTriedman (WMF) (talk) 16:47, 9 July 2024 (UTC)[reply]