Write a SPARQL query to fetch (up to) 50 Wikidata items representing people who identify…
- User
Write a SPARQL query to fetch (up to) 50 Wikidata items representing people who identify as non-binary
- Assistant
Here is a SPARQL query to fetch (up to) 50 Wikidata items representing people who identify as non-binary:
SELECT DISTINCT ?item ?itemLabel ?genderIdentityLabel WHERE { ?item wdt:P31 wd:Q5; # items that are instances of human wdt:P21 wd:Q48270; # items with gender identity of non-binary rdfs:label ?itemLabel. FILTER(LANG(?itemLabel) = "en") OPTIONAL { ?item wdt:P21 ?genderIdentity. } SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } LIMIT 50
- User
now check your previous answer to make sure that the code you have just written is correct
- Assistant
The given query is written in SPARQL, a query language for querying RDF data. It retrieves distinct items (?item) along with their labels (?itemLabel) and gender identity labels (?genderIdentityLabel) for human instances with a non-binary gender identity.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →