PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?item ?itemLabel ?object ?objectLabel WHERE {
  VALUES ?ai {
    wd:Q11660
  }
  {
    ?item wdt:P31 ?ai .
  } UNION {
    ?item wdt:P279 ?ai .
  }
  OPTIONAL {
    ?item wdt:P361 ?object .
    OPTIONAL {
      ?object rdfs:label ?objectLabel .
      FILTER ( LANG( ?objectLabel ) = "en" )
    }
  }
  OPTIONAL {
    ?item rdfs:label ?itemLabel .
    FILTER ( LANG( ?itemLabel ) = "en" )
  }
}
ORDER BY ?itemLabel
LIMIT 500

Using entities:
- artificial intelligence (wd:Q11660), also known as AI, AI software, Artificial Intelligence, Artificial Intelligence, a.i., Artificially intelligent, etc.: is instance of type of technology / is instance of branch of computer science / is instance of type of intelligence / is instance of economic branch / is instance of industry / is subclass of reasoning / is subclass of emerging technologies / is subclass of emerging technology / is subclass of computer science / is subclass of Informatics / branch of computer science that develops machines and software with human-like intelligence / field of computer science that develops and studies intelligent machines; also referring to such software

Using properties:
- subclass of (wd:P279 as wdt), also known as all members of this class also belong to, category of, form of, has superclass, is a class of, etc.: this item is a subclass (subset) of that item; ALL instances ... of volcanic landform); Everest is an instance of mountain / this item is a subclass (subset) of that item; all instances ... instance of volcanic landform); K2 is an instance of mountain / this item is a subclass (subset) of that item; all instances ... instance of volcanic landform); K2 is an instance of mountain / this item is a subclass (subset) of that item; all instances ... instance of volcanic landform); K2 is an instance of mountain
- instance of (wd:P31 as wdt), also known as example of, has type, is a, is an, is of type, etc.: that class of which this subject is a particular example and ... a subclass of mountain (and an instance of volcanic landform) / type to which this subject corresponds/belongs. Different ... and the volcano is a type (instance) of volcanic landform
- part of (wd:P361 as wdt), also known as assembly of, branch of, chain, collateral branch of, component of, etc.: object of which the subject is a part (if this subject is ... "has part" (P527, see also "has parts of the class" (P2670)) / object of which the subject is a part (if this subject is ... "has part" (P527, see also "has parts of the class" (P2670)) / object of which the subject is a part (if this subject is ... "has part" (P527, see also "has parts of the class" (P2670)) / object of which the subject is a part (if this subject is ... "has part" (P527, see also "has parts of the class" (P2670))

Got 81 rows and 4 columns, showing the first 5 and last 5 rows below:
| item                                           | itemLabel                                  | object | objectLabel |
| ---------------------------------------------- | ------------------------------------------ | ------ | ----------- |
| wd:Q16632290                                   |                                            |        |             |
| wd:Q125545918                                  |                                            |        |             |
| wd:Q18337489                                   |                                            |        |             |
| wd:Q106548707                                  |                                            |        |             |
| affective computing (wd:Q1185804)              | affective computing (lang:en)              |        |             |
| ...                                            | ...                                        | ...    | ...         |
| wd:Q132820774                                  | SPINACH Wikidata Agent (lang:en)           |        |             |
| strong AI and weak AI (wd:Q116852011)          | strong AI and weak AI (lang:en)            |        |             |
| symbolic artificial intelligence (wd:Q5514059) | symbolic artificial intelligence (lang:en) |        |             |
| Vision and Language (wd:Q111467776)            | Vision and Language (lang:en)              |        |             |
| You.com (wd:Q111598768)                        | You.com (lang:en)                          |        |             |

Answer: I ran the SPARQL query above which returns all items that are either instances (wdt:P31) or subclasses (wdt:P279) of artificial intelligence (wd:Q11660), together with any objects they are part of (wdt:P361). The query returned 81 rows; many of the items do not have a 'part of' (P361) value, so their object columns are empty. To see the complete list of items and their 'part of' objects, run the provided SPARQL query against Wikidata. Examples from the result set include items such as "affective computing" (wd:Q1185804), "symbolic artificial intelligence" (wd:Q5514059), and "You.com" (wd:Q111598768).

I ran the SPARQL query above which returns all items that are either instances (wdt:P31) or subclasses (wdt:P279) of artificial intelligence (wd:Q11660), together with any objects they are part of (wdt:P361). The query returned 81 rows; many of the items do not have a 'part of' (P361) value, so their object columns are empty. To see the complete list of items and their 'part of' objects, run the provided SPARQL query against Wikidata. Examples from the result set include items such as "affective computing" (wd:Q1185804), "symbolic artificial intelligence" (wd:Q5514059), and "You.com" (wd:Q111598768).

SPARQL query over wikidata:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?item ?itemLabel ?object ?objectLabel WHERE {
  VALUES ?ai {
    wd:Q11660
  }
  {
    ?item wdt:P31 ?ai .
  } UNION {
    ?item wdt:P279 ?ai .
  }
  OPTIONAL {
    ?item wdt:P361 ?object .
    OPTIONAL {
      ?object rdfs:label ?objectLabel .
      FILTER ( LANG( ?objectLabel ) = "en" )
    }
  }
  OPTIONAL {
    ?item rdfs:label ?itemLabel .
    FILTER ( LANG( ?itemLabel ) = "en" )
  }
}
ORDER BY ?itemLabel
LIMIT 500

Using entities:
- artificial intelligence (wd:Q11660), also known as AI, AI software, Artificial Intelligence, Artificial Intelligence, a.i., Artificially intelligent, etc.: is instance of type of technology / is instance of branch of computer science / is instance of type of intelligence / is instance of economic branch / is instance of industry / is subclass of reasoning / is subclass of emerging technologies / is subclass of emerging technology / is subclass of computer science / is subclass of Informatics / branch of computer science that develops machines and software with human-like intelligence / field of computer science that develops and studies intelligent machines; also referring to such software

Using properties:
- subclass of (wd:P279 as wdt), also known as all members of this class also belong to, category of, form of, has superclass, is a class of, etc.: this item is a subclass (subset) of that item; ALL instances ... of volcanic landform); Everest is an instance of mountain / this item is a subclass (subset) of that item; all instances ... instance of volcanic landform); K2 is an instance of mountain / this item is a subclass (subset) of that item; all instances ... instance of volcanic landform); K2 is an instance of mountain / this item is a subclass (subset) of that item; all instances ... instance of volcanic landform); K2 is an instance of mountain
- instance of (wd:P31 as wdt), also known as example of, has type, is a, is an, is of type, etc.: that class of which this subject is a particular example and ... a subclass of mountain (and an instance of volcanic landform) / type to which this subject corresponds/belongs. Different ... and the volcano is a type (instance) of volcanic landform
- part of (wd:P361 as wdt), also known as assembly of, branch of, chain, collateral branch of, component of, etc.: object of which the subject is a part (if this subject is ... "has part" (P527, see also "has parts of the class" (P2670)) / object of which the subject is a part (if this subject is ... "has part" (P527, see also "has parts of the class" (P2670)) / object of which the subject is a part (if this subject is ... "has part" (P527, see also "has parts of the class" (P2670)) / object of which the subject is a part (if this subject is ... "has part" (P527, see also "has parts of the class" (P2670))

Execution result:
Got 81 rows and 4 columns, showing the first 5 and last 5 rows below:
| item                                           | itemLabel                                  | object | objectLabel |
| ---------------------------------------------- | ------------------------------------------ | ------ | ----------- |
| wd:Q16632290                                   |                                            |        |             |
| wd:Q125545918                                  |                                            |        |             |
| wd:Q18337489                                   |                                            |        |             |
| wd:Q106548707                                  |                                            |        |             |
| affective computing (wd:Q1185804)              | affective computing (lang:en)              |        |             |
| ...                                            | ...                                        | ...    | ...         |
| wd:Q132820774                                  | SPINACH Wikidata Agent (lang:en)           |        |             |
| strong AI and weak AI (wd:Q116852011)          | strong AI and weak AI (lang:en)            |        |             |
| symbolic artificial intelligence (wd:Q5514059) | symbolic artificial intelligence (lang:en) |        |             |
| Vision and Language (wd:Q111467776)            | Vision and Language (lang:en)              |        |             |
| You.com (wd:Q111598768)                        | You.com (lang:en)                          |        |             |

[System]
You are a question answering assistant. Your job is to generate a SPARQL query to answer a given user question.

You should follow a step-by-step approach to generate the SPARQL query:
1. Determine possible entities and properties implied by the user question.
2. Search for the entities and properties in the knowledge graphs. Where applicable, constrain the searches with already identified entities and properties.
3. Gradually build up the SPARQL query using the identified entities and properties. Start with simple queries and add more complexity as needed. Execute intermediate queries to get feedback and to verify your assumptions. You may need to refine or rethink your current plan based on the query results and go back to step 2 if needed, possibly multiple times.
4. Use the answer or cancel function to finalize your answer and stop the generation process.

Available knowledge graphs:
- wikidata at http://localhost:7001 with prefix index for entities and similarity index for properties, and notes:
  - P106 = occupation. Use wdt:P106 to get occupations and fetch English labels with rdfs:label + FILTER(LANG(?label)="en"). When returning human occupations confirm the subject is human (wdt:P31 wd:Q5) to avoid non-human items.
  - Population (P1082) and tabular (P4179): use wdt:P1082 for quick/direct values; for time-series/point-in-time use p:P1082 + ps:P1082 + pq:P585 and ORDER BY pq:P585 DESC. Inspect statement qualifiers (e.g., 'applies to part') and prov:wasDerivedFrom references (pr:P854 etc.) to detect city-proper vs metro/prefecture scopes before using values.
  - Common person properties: P31 (instance of human Q5), P106 (occupation), P569 (date of birth), P19 (place of birth), P27 (country of citizenship), P21 (sex/gender), P166 (award received). Use wdt: for direct values when possible.
  - P17 (country) can be incomplete/misleading for places (historical/overseas tags). To get modern cities in a country combine: instance-of city (P31=Q515) + wdt:P17 OR use wdt:P131* to find an admin parent whose wdt:P17 = the country. Also cross-check coordinates (P625) or admin hierarchy to spot outliers.
  - When filtering by date of birth (P569) use xsd:dateTime comparisons (e.g. >= "1900-01-01T00:00:00Z"^^xsd:dateTime). Be aware many items have year-only or imprecise dates and coverage is biased toward notable/public figures (sportspeople, politicians, artists).
  - To retrieve qualifiers (e.g., award year) use the statement/qualifier pattern: p:Pxxx / ps:Pxxx / pq:P585. Use wdt:Pxxx for normalized/direct values when you don't need qualifiers. Example: p:P166 + pq:P585 gives award year.
  - To get a person's occupations: use wdt:P106 for direct/normalized values and rdfs:label for human-readable names (FILTER(LANG(...))). Example: wd:Q... wdt:P106 ?occ . ?occ rdfs:label ?occLabel . FILTER(LANG(?occLabel)="en").
  - P166 = award received. Use wdt:P166 for normalized/direct values when you only need award items. To get award years or qualifiers use p:P166 / ps:P166 / pq:P585. Many statements lack pq:P585 — use OPTIONAL { ?stmt pq:P585 ?date } and ORDER BY DESC(?date). When listing award winners, filter ?person wdt:P31 wd:Q5 to ensure humans.
  - Population time-series pattern: wd:Q... p:P1082 ?stmt . ?stmt ps:P1082 ?pop . OPTIONAL { ?stmt pq:P585 ?date } . ORDER BY DESC(?date). pq:P585 is the point-in-time qualifier. IMPORTANT: time-series may mix scopes (city proper vs metro) — e.g., Tokyo has a 2016 entry ~38,140,000 likely metro vs smaller city figures. Inspect qualifiers/references for scope before use.
  - Use wdt:P131* to traverse the admin hierarchy and compare wdt:P17 on the place vs an admin parent to detect historical/colonial country assignments. When mismatches appear, inspect the admin parent's instance-of (P31), labels, qualifiers and references to interpret the historical scope.
  - wdt:P106 often yields multiple occupations for a person. Use GROUP_CONCAT(DISTINCT ?occLabel; separator=", ") or return multiple rows. Always fetch labels with rdfs:label + FILTER(LANG(?label)="en") to get readable occupation names.
  - When a search_entity returns multiple hits (person vs sculpture vs memorial), confirm you selected the human/statements by checking wdt:P31 (instance of) and relevant wdt: properties (e.g., wdt:P106). This avoids using a non-human QID by mistake.
  - search_autocomplete can be constrained with a SPARQL pattern containing ?search (e.g., SELECT * WHERE { ?search wdt:P31 wd:Q5 }). Use constraints to focus results (e.g., humans) and avoid ambiguous fallbacks; if it returns no results, fallback to search_entity and verify wdt:P31.
  - Use search_property_of_entity to find relevant properties for an entity (e.g., 'award' -> P166) and search_object_of_property to discover candidate objects (e.g., 'physicist' for P106). This reduces guessing P/Q ids and surfaces qualifiers.
  - Inspect statement references and qualifiers: use prov:wasDerivedFrom on p: statements to find sources, and check qualifiers (e.g., 'applies to part' or other scope qualifiers) to disambiguate city vs metro vs admin area. Reference labels can be empty; inspect reference node properties for URLs or publication dates.

Index types used for entities and properties:
- Prefix index: Retrieves items by overlap between query keywords and item words. The query keywords can match item words exactly or as prefixes.
- Similarity index: Retrieves items by cosine similarity between their embeddings and the query embedding.

General notes across knowledge graphs:
- Use rdfs:label + FILTER(LANG(?label)="en") for labels; avoid SERVICE wikibase:label. Use wdt:Pxxx for normalized/direct values when qualifiers aren't needed. Use p:Pxxx / ps:Pxxx / pq:Pxxx to access statement qualifiers (e.g., award year via pq:P585). When dates matter, prefer xsd:dateTime and watch for year-only precision.
- Practical query patterns: use rdfs:label + FILTER(LANG(...)) for labels. Use wdt:Pxxx for direct/normalized values when qualifiers aren't needed. Use p:Pxxx / ps:Pxxx / pq:Pxxx to access qualifiers (dates via pq:P585). For dates use xsd:dateTime and expect year-only precision. For places: combine P17 with P131 or coordinate (P625) filters to avoid historical/overseas mismatches.
- Use OPTIONAL for pq: qualifiers (e.g., pq:P585), sort by qualifier (ORDER BY pq:P585 DESC) to prefer recent values. Use GROUP_CONCAT to combine multiple labels/values in one row. Watch for typed literals (xsd:dateTime, xsd:decimal) when filtering or sorting.
- Before querying, use search_entity to resolve human-friendly names to wd:Q identifiers and verify instance-of (e.g., check wdt:P31 = wd:Q5 for humans) to avoid ambiguous matches. Prefer the top match but programmatically confirm P31 before using its data.
- Use search_property to confirm property identifiers (e.g., "country" -> P17) before embedding them in queries. This prevents mistakes from assuming an ID and helps pick the best property if multiple choices exist.
- search_autocomplete can fall back to an unconstrained search or error when there are too many candidates. If this happens (e.g., "more than the maximum supported number of subject candidates"), retry with narrower constraints such as instance-of (wdt:P31), additional type filters, or short prefixes to reduce the candidate set; otherwise fallback to search_entity and verify wdt:P31.
- Use list(...) to inspect all triples on an entity for exploration, but expect large results for notable items. Prefer wdt: properties or targeted p:/ps:/pq: patterns in SPARQL when you need normalized values or qualifiers, respectively.
- Before embedding property or item IDs in SPARQL, use search_property, search_property_of_entity, and search_object_of_property to discover the appropriate P/PID or object QIDs. This reduces errors from guessing IDs and surfaces better property alternatives and qualifiers.
- search_constrained and search_autocomplete can return no results for constrained queries or when the index is large. If they fail, fallback to search_entity + verify P31 (or use search_property_of_entity). Constrain with instance-of (wdt:P31) or other properties in the SPARQL to improve matches.
- When selecting awards by year, prefer xsd:dateTime range filters (e.g., >= "2001-01-01T00:00:00Z"^^xsd:dateTime && < "2002-01-01T00:00:00Z"^^xsd:dateTime) instead of YEAR() for portability and precision.
- When selecting award winners via wdt:P166, filter ?person wdt:P31 wd:Q5 to ensure humans — fictional characters or non-humans may have award claims. If you need award years use p:P166 / ps:P166 / pq:P585 and OPTIONAL { ?stmt pq:P585 ?year } to retrieve qualifier years.
- Use wdt:P625 (coordinates) together with wdt:P131* and wdt:P17 checks to validate a place's modern country or to filter by geography. When country labels mismatch historically, inspect admin parents and coordinates to resolve whether the item refers to historical/colonial scope or current boundaries.
- Prefer wdt:Pxxx for normalized/direct values when qualifiers aren't needed. Use p:Pxxx / ps:Pxxx / pq:Pxxx to access qualifiers (e.g., pq:P585 for award year). Always fetch labels with rdfs:label + FILTER(LANG(?label) = "en").
- If search_autocomplete returns too many candidates or errors, retry with constraints (e.g., SELECT * WHERE { ?search wdt:P31 wd:Q5 }) or narrower query text. If still failing, fallback to search_entity and verify wdt:P31 for type checks.
- For award-year queries use p:P166 / ps:P166 / pq:P585 to access award statements and year qualifiers. Filter by xsd:dateTime ranges (e.g., >= "2020-01-01T00:00:00Z"^^xsd:dateTime && < "2021-01-01T00:00:00Z"^^xsd:dateTime) instead of YEAR() for robustness.
- Use search_property_of_entity to surface relevant properties for an entity (e.g., 'birth' -> P569/P19). list(...) can inspect triples but may return large results for notable items—prefer targeted wdt: patterns (wdt:Pxxx) or p:/ps:/pq: patterns when you need qualifiers.

SPARQL prefixes for use in function calls:
- bd: <http://www.bigdata.com/rdf#
- cc: <http://creativecommons.org/ns#
- data: <https://www.wikidata.org/wiki/Special:EntityData/
- dc: <http://purl.org/dc/elements/1.1/
- dct: <http://purl.org/dc/terms/
- foaf: <http://xmlns.com/foaf/0.1/
- geo: <http://www.opengis.net/ont/geosparql#
- geof: <http://www.opengis.net/def/function/geosparql/
- gn: <http://www.geonames.org/ontology#
- hint: <http://www.bigdata.com/queryHints#
- imdb: <https://www.imdb.com/
- math: <http://www.w3.org/2005/xpath-functions/math#
- ontolex: <http://www.w3.org/ns/lemon/ontolex#
- owl: <http://www.w3.org/2002/07/owl#
- p: <http://www.wikidata.org/prop/
- pq: <http://www.wikidata.org/prop/qualifier/
- pqn: <http://www.wikidata.org/prop/qualifier/value-normalized/
- pqv: <http://www.wikidata.org/prop/qualifier/value/
- pr: <http://www.wikidata.org/prop/reference/
- prn: <http://www.wikidata.org/prop/reference/value-normalized/
- prov: <http://www.w3.org/ns/prov#
- prv: <http://www.wikidata.org/prop/reference/value/
- ps: <http://www.wikidata.org/prop/statement/
- psn: <http://www.wikidata.org/prop/statement/value-normalized/
- psv: <http://www.wikidata.org/prop/statement/value/
- qb: <http://purl.org/linked-data/cube#
- qfn: <http://qlever.cs.uni-freiburg.de/function#
- ql: <http://qlever.cs.uni-freiburg.de/builtin-functions/
- qlss: <https://qlever.cs.uni-freiburg.de/spatialSearch/
- rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#
- rdfs: <http://www.w3.org/2000/01/rdf-schema#
- ref: <http://www.wikidata.org/reference/
- s: <http://www.wikidata.org/entity/statement/
- schema: <http://schema.org/
- skos: <http://www.w3.org/2004/02/skos/core#
- v: <http://www.wikidata.org/value/
- void: <http://rdfs.org/ns/void#
- wd: <http://www.wikidata.org/entity/
- wdno: <http://www.wikidata.org/prop/novalue/
- wdt: <http://www.wikidata.org/prop/direct/
- wdtn: <http://www.wikidata.org/prop/direct-normalized/
- wikibase: <http://wikiba.se/ontology#
- xsd: <http://www.w3.org/2001/XMLSchema#

Additional rules to follow:
- Explain your thought process before and after each step and function call.
- Do not just use or make up entity or property identifiers without verifying their existence in the knowledge graphs first.
- Do not ask the user for clarifications without first attempting to complete the task. If the task input is incomplete or ambiguous, try to make reasonable assumptions and document them.
- Do not use "SERVICE wikibase:label { bd:serviceParam wikibase:language ..." in SPARQL queries. It is not SPARQL standard and unsupported by the used QLever SPARQL endpoints. Use rdfs:label or similar properties to get labels instead.
- Always execute your final SPARQL query before giving an answer to make sure it returns the expected results.
- The SPARQL query should always return the actual identifiers / IRIs of the items in its result. It additionally may return labels or other human-readable information, but they are optional and should be put within optional clauses unless explicitly requested by the user.
- Do not stop early if there are still obvious improvements to be made to the SPARQL query. For example, keep refining your SPARQL query if its result contains irrelevant items or is missing items you expected.
- Do not perform additional computation (e.g. filtering, sorting, calculations) on the result of the SPARQL query to determine the answer. All computation should be done solely within SPARQL.
- For questions with a "True" or "False" answer the SPARQL query should be an ASK query.

[User] What are the items that are instances or subclasses of artificial intelligence, along with the objects they are part of?

[Assistant]
Plan:
1. Find the Wikidata item for "artificial intelligence".
2. Find items that are either instances (wdt:P31) or subclasses (wdt:P279) of that item.
3. For each such item, also fetch "objects they are part of" — this likely corresponds to properties like "part of" (P361) or "part of the class" (P279?) — I'll search for common "part of" properties and then query items with wdt:P361 (part of) and wdt:P527 (has part?) — but primarily P361 indicates "part of".
4. Build and run a SPARQL query that returns the items (IRIs) and the objects they are part of (IRIs), along with English labels.

I'll first search for the "artificial intelligence" entity in Wikidata to get its Q-id.

Question: artificial intelligence

Top 10 entity alternatives:
1. artificial intelligence (wd:Q11660), also known as AI, AI software, Artificial Intelligence, Artificial Intelligence, a.i., Artificially intelligent, etc.: field of computer science that develops and studies intelligent machines; also referring to such software / branch of computer science that develops machines and software with human-like intelligence / is instance of branch of computer science / is subclass of emerging technologies / is instance of type of intelligence / is subclass of emerging technology / is instance of type of technology / is subclass of computer science / is instance of economic branch / is subclass of Informatics / is subclass of reasoning / is instance of industry
2. A.I. Artificial Intelligence (wd:Q221113, matched via Artificial Intelligence), also known as A.I., AI, A.I.: Artificial Intelligence, Artificial Intelligence, Artificial Intelligence: A.I.: 2001 film by Steven Spielberg / is instance of film
3. Artificial Intelligence (wd:Q128447): 1985 studio album by John Cale / is instance of album
4. Artificial Intelligence (wd:Q2865784): series of albums by Warp Records / is instance of album series
5. Artificial Intelligence (wd:Q4801033): 1992 compilation album; various artists / is instance of album
6. Artificial Intelligence (wd:Q4801030), also known as AIJ, Journal of Artificial Intelligence: is instance of scientific journal / journal published by Elsevier
7. Artificial Intelligence (wd:Q28451730): is instance of musical work/composition / song performed by OneRepublic
8. ISO/IEC JTC 1/SC 42: Artificial intelligence (wd:Q98148785, matched via Artificial intelligence), also known as Artificial intelligence: is instance of subcommittee of a technical committee / subcommittee of a technical committee
9. Artificial Intelligence (wd:Q109875730): is instance of extended play / 2021 EP by Tom Cardy
10. Artificial Intelligence (wd:Q125635217): book by Patrick Henry Winston / is instance of written work

[Assistant]
I'll search for relevant properties like "part of" and "has part" to confirm their property IDs before using them in the query.

Question: part of

Top 10 property alternatives:
1. parent organization (wd:P749 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via part of), also known as chapter of, has organizational parent, holding, holding company, owned by (company or organisation), etc.: parent organization of an organization, opposite of subsidiaries (P355) / is subproperty of owned by / is subproperty of part of
2. part of (wd:P361 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn), also known as assembly of, branch of, chain, collateral branch of, component of, etc.: object of which the subject is a part (if this subject is ... "has part" (P527, see also "has parts of the class" (P2670)) / object of which the subject is a part (if this subject is ... "has part" (P527, see also "has parts of the class" (P2670)) / object of which the subject is a part (if this subject is ... "has part" (P527, see also "has parts of the class" (P2670)) / object of which the subject is a part (if this subject is ... "has part" (P527, see also "has parts of the class" (P2670))
3. has part(s) (wd:P527 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via includes part), also known as amalgamation of, assembled from, assembled out of, composed of, comprised of, etc.: part of this subject; inverse property of "part of" (P361). See also "has parts of the class" (P2670). / part of this subject; inverse property of "part of" (P361). See also "has parts of the class" (P2670). / part of this subject, also valuable subclass or exemplar. Inverse property of "part of".
4. partially coincident with (wd:P1382 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via part of (partially)), also known as coincident with, concurrency, concurrent with, has common instances with, has common members with, etc.: object that partially overlaps with the subject in its instances, parts, or members / an object that is partially part of, but not fully part of (P361), the subject / is subproperty of different from
5. applies to part (wd:P518 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via of part), also known as applied to, applies to aspect, applies to form, applies to phase, apply to, etc.: part, aspect, or form of the item to which the claim applies / part of the item for which the claim is valid / part of the item for which the claim is valid
6. proportion (wd:P1107 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via part), also known as %, part, percent, ratio, share, etc.: to be used as a qualifier, value must be between 0 and 1 / to be used as a qualifier, value must be between 0 and 1
7. minimum value (wd:P2313 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via from), also known as at least this many, from, minimum quantity, min quantity, min value, etc.: qualifier indicating the lowest possible value of a quantity
8. source of transfer (wd:P12693 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via from), also known as from, sender, source, starting point, P12693: entity that a transferred item is initially associated with, before this process associates it with another entity
9. relative to (wd:P2210 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via from), also known as compared object, compared to, compared with, from, in relation to, etc.: qualifier: what a statement value is relative to / qualifier: what a statement value is relative to
10. definition domain (wd:P1568 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via from), also known as domain, domain of definition, domain of function, from, function domain, etc.: set of "input" or argument values for which a mathematical function is defined; subset of input set

[Assistant]
I'll run a SPARQL query that finds items that are either instances (P31) or subclasses (P279) of "artificial intelligence" (wd:Q11660), and for each item retrieves any "part of" (P361) object. I will request English labels as OPTIONALs. Then I'll execute the query to verify results.

execute

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?item ?itemLabel ?object ?objectLabel WHERE {
  VALUES ?ai { wd:Q11660 }
  {
    ?item wdt:P31 ?ai .
  } UNION {
    ?item wdt:P279 ?ai .
  }
  OPTIONAL {
    ?item wdt:P361 ?object .
    OPTIONAL { ?object rdfs:label ?objectLabel . FILTER(LANG(?objectLabel) = "en") }
  }
  OPTIONAL { ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") }
}
ORDER BY ?itemLabel
LIMIT 500

Got 81 rows and 4 columns, showing the first 5 and last 5 rows below:
| item                                           | itemLabel                                  | object | objectLabel |
| ---------------------------------------------- | ------------------------------------------ | ------ | ----------- |
| wd:Q16632290                                   |                                            |        |             |
| wd:Q125545918                                  |                                            |        |             |
| wd:Q18337489                                   |                                            |        |             |
| wd:Q106548707                                  |                                            |        |             |
| affective computing (wd:Q1185804)              | affective computing (lang:en)              |        |             |
| ...                                            | ...                                        | ...    | ...         |
| wd:Q132820774                                  | SPINACH Wikidata Agent (lang:en)           |        |             |
| strong AI and weak AI (wd:Q116852011)          | strong AI and weak AI (lang:en)            |        |             |
| symbolic artificial intelligence (wd:Q5514059) | symbolic artificial intelligence (lang:en) |        |             |
| Vision and Language (wd:Q111467776)            | Vision and Language (lang:en)              |        |             |
| You.com (wd:Q111598768)                        | You.com (lang:en)                          |        |             |

[Assistant]
I will finalize by returning the SPARQL I ran and a short summary of the query results. The SPARQL below returns all items that are instances (P31) or subclasses (P279) of artificial intelligence (wd:Q11660) and, for each item, any "part of" (P361) object (with English labels where available). The executed query returned 81 rows; many items do not have a P361 value. You can run the query to see the full table of items and their part-of objects.

answer

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?item ?itemLabel ?object ?objectLabel WHERE {
  VALUES ?ai { wd:Q11660 }
  {
    ?item wdt:P31 ?ai .
  } UNION {
    ?item wdt:P279 ?ai .
  }
  OPTIONAL {
    ?item wdt:P361 ?object .
    OPTIONAL { ?object rdfs:label ?objectLabel . FILTER(LANG(?objectLabel) = "en") }
  }
  OPTIONAL { ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel) = "en") }
}
ORDER BY ?itemLabel
LIMIT 500

Answer: I ran the SPARQL query above which returns all items that are either instances (wdt:P31) or subclasses (wdt:P279) of artificial intelligence (wd:Q11660), together with any objects they are part of (wdt:P361). The query returned 81 rows; many of the items do not have a 'part of' (P361) value, so their object columns are empty. To see the complete list of items and their 'part of' objects, run the provided SPARQL query against Wikidata. Examples from the result set include items such as "affective computing" (wd:Q1185804), "symbolic artificial intelligence" (wd:Q5514059), and "You.com" (wd:Q111598768).


PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?art ?artLabel ?creator ?creatorLabel WHERE {
  VALUES ?type {
    wd:Q557141 wd:Q179700 wd:Q860861 wd:Q5003624 wd:Q4989906
  }
  ?art wdt:P31 ?type .
  ?art wdt:P170 ?creator .
  ?creator wdt:P31 wd:Q5 .
  ?creator wdt:P21 wd:Q6581072 .
  {
    ?art wdt:P276 wd:Q84 .
  } UNION {
    ?art wdt:P131 * wd:Q84 .
  }
  OPTIONAL {
    ?art rdfs:label ?artLabel FILTER ( LANG( ?artLabel ) = "en" )
  }
  OPTIONAL {
    ?creator rdfs:label ?creatorLabel FILTER ( LANG( ?creatorLabel ) = "en" )
  }
}
ORDER BY ?artLabel

Using entities:
- statue (wd:Q179700): is instance of genre of sculpture / is subclass of sculpture / is subclass of artificial physical object / is subclass of artefact / is subclass of figure / sculpture primarily conceived as a representational figure / sculpture primarily conceived as a representational figure / sculpture primarily conceived as a representational figure
- monument (wd:Q4989906), also known as monuments: is subclass of statue / is subclass of work of art / is subclass of built structure / is subclass of Architectural structure / is subclass of architectural structure / is subclass of Work of art / imposing structure created to commemorate a person or event, or used for that purpose / type of structure either explicitly created to commemorate a person or important event, or used for that purpose / type of structure either explicitly created to commemorate a person or important event, or used for that purpose
- memorial (wd:Q5003624), also known as memorial site, remembrance: is subclass of monument / is subclass of memory space / area or object, smaller than a monument, which serves as a focus for memory of something / object which serves as a focus for memory of something
- public art (wd:Q557141): is instance of art genre / is subclass of work of art / is subclass of Work of art / genre of art in the physical public domain / genre of art that is created to be in a public space
- human (wd:Q5), also known as human being, humans, individual Homo sapiens, individual human, modern humans, etc.: is instance of organisms known by a particular common name / is instance of class of organisms known by one particular common name / is subclass of omnivore / is subclass of natural person / is subclass of mammal / is subclass of individual animal / is subclass of person / any member of Homo sapiens, unique extant species of the genus Homo / common name of Homo sapiens, unique extant species of the genus Homo / common name of Homo sapiens, unique extant species of the genus Homo / common name of Homo sapiens, unique extant species of the genus Homo, from embryo to adult
- female (wd:Q6581072), also known as f, fairer sex, fem, female character, female gender, etc.: is instance of gender / is instance of sex of humans / to be used in "sex or gender" (P21) to indicate that the human subject is a female / to be used in "sex or gender" (P21) to indicate that the ... (P10339) to indicate that a word refers to a female person
- London (wd:Q84), also known as Augusta, Big Smoke, Kaerlud, Karelundein, LDN, etc.: is instance of global city / is instance of largest city / is instance of city / is instance of geographic location / is instance of financial center / is instance of Metropolis / is instance of metropolis / is instance of megacity / is instance of national capital / is instance of financial centre / capital and largest city of England and the United Kingdom / capital of England and the United Kingdom
- sculpture (wd:Q860861), also known as piece of sculpture, sculptural work, sculptures: is instance of type of work of art / is subclass of artificial physical object / is subclass of artefact / is subclass of plastic artwork / three-dimensional work of art / three-dimensional work of art / three-dimensional work of art

Using properties:
- located in the administrative territorial entity (wd:P131 as wdt), also known as administrative territorial entity, administrative territory, city, happens in, in, etc.: is subproperty of location / is subproperty of part of / the item is located on the territory of the following administrative entity / the item is located on the territory of the following administrative entity / the item is located on the territory of the following ... the item falls only partially into the administrative entity. / the item is located on the territory of the following ... the item falls only partially into the administrative entity.
- creator (wd:P170 as wdt), also known as art by, artist (non-musical), art work by, artwork by, by, etc.: maker of a creative work or other object (where no more specific property exists) / maker of this creative work or other object (where no more specific property exists) / maker of this creative work or other object (where no more specific property exists)
- sex or gender (wd:P21 as wdt), also known as biological sex, gender, gender expression, gender identity, gender or sex, etc.: sex or gender identity: male (Q6581097), female (Q6581072), ... (Q43445). Groups of same gender use subclass of (P279) / sex or gender identity of human or animal. For human: male, ... female organism. Groups of same gender use subclass of (P279) / sexual identity of subject: male (Q6581097), female ... (Q43445). Groups of same gender use "subclass of" (P279)
- location (wd:P276 as wdt), also known as based in, city, from, held by, in, etc.: location of the item, physical object or event is within. In ... use P131. In case of a distinct terrain feature use P706. / location of the item, physical object or event is within. In ... use P131. In case of a distinct terrain feature use P706. / location of the object, structure or event. In the case of an ... use P706. Use P7153 for locations associated with the object
- instance of (wd:P31 as wdt), also known as example of, has type, is a, is an, is of type, etc.: that class of which this subject is a particular example and ... a subclass of mountain (and an instance of volcanic landform) / type to which this subject corresponds/belongs. Different ... and the volcano is a type (instance) of volcanic landform

Got 6 rows and 4 columns:
| art                                                | artLabel                                     | creator                                | creatorLabel                      |
| -------------------------------------------------- | -------------------------------------------- | -------------------------------------- | --------------------------------- |
| Energy Sculpture London (wd:Q63183611)             | Energy Sculpture London (lang:en)            | Tia Anna Paynich (wd:Q61927540)        | Tia Anna Paynich (lang:en)        |
| Reach (wd:Q123049287)                              | Reach (lang:en)                              | Pixie Mudge Massey Shaw (wd:Q90518856) | Pixie Mudge Massey Shaw (lang:en) |
| Sadako Sasaki Monument (wd:Q129719331)             | Sadako Sasaki Monument (lang:en)             | Hazel Reeves (wd:Q59779567)            | Hazel Reeves (lang:en)            |
| Statue of Laurence Olivier, London (wd:Q110819408) | Statue of Laurence Olivier, London (lang:en) | Angela Conner (wd:Q4762412)            | Angela Conner (lang:en)           |
| The End (sculpture) (wd:Q118697934)                | The End (sculpture) (lang:en)                | Heather Phillipson (wd:Q19517821)      | Heather Phillipson (lang:en)      |
| The Tuckshop Tanner (wd:Q122678557)                | The Tuckshop Tanner (lang:en)                | Jessica Wetherly (wd:Q122678392)       | Jessica Wetherly (lang:en)        |

Answer:
Results (public artworks located in London created by female artists):

- Energy Sculpture London (wd:Q63183611) — creator: Tia Anna Paynich (wd:Q61927540)
- Reach (wd:Q123049287) — creator: Pixie Mudge Massey Shaw (wd:Q90518856)
- Sadako Sasaki Monument (wd:Q129719331) — creator: Hazel Reeves (wd:Q59779567)
- Statue of Laurence Olivier, London (wd:Q110819408) — creator: Angela Conner (wd:Q4762412)
- The End (sculpture) (wd:Q118697934) — creator: Heather Phillipson (wd:Q19517821)
- The Tuckshop Tanner (wd:Q122678557) — creator: Jessica Wetherly (wd:Q122678392)

Notes:
- Query searched for items that are instance of common public-art classes (public art, statue, sculpture, memorial, monument), located in London (P276 = wd:Q84 or via the administrative hierarchy P131*), and whose creator (P170) is a human (P31 = wd:Q5) with sex/gender = female (P21 = wd:Q6581072).
- Wikidata coverage is incomplete; this result set reflects items in Wikidata matching those constraints and may miss artworks lacking P31, location, or creator statements, or where the artist's gender is not recorded.

Results (public artworks located in London created by female artists):

- Energy Sculpture London (wd:Q63183611) — creator: Tia Anna Paynich (wd:Q61927540)
- Reach (wd:Q123049287) — creator: Pixie Mudge Massey Shaw (wd:Q90518856)
- Sadako Sasaki Monument (wd:Q129719331) — creator: Hazel Reeves (wd:Q59779567)
- Statue of Laurence Olivier, London (wd:Q110819408) — creator: Angela Conner (wd:Q4762412)
- The End (sculpture) (wd:Q118697934) — creator: Heather Phillipson (wd:Q19517821)
- The Tuckshop Tanner (wd:Q122678557) — creator: Jessica Wetherly (wd:Q122678392)

Notes:
- Query searched for items that are instance of common public-art classes (public art, statue, sculpture, memorial, monument), located in London (P276 = wd:Q84 or via the administrative hierarchy P131*), and whose creator (P170) is a human (P31 = wd:Q5) with sex/gender = female (P21 = wd:Q6581072).
- Wikidata coverage is incomplete; this result set reflects items in Wikidata matching those constraints and may miss artworks lacking P31, location, or creator statements, or where the artist's gender is not recorded.

SPARQL query over wikidata:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT DISTINCT ?art ?artLabel ?creator ?creatorLabel WHERE {
  VALUES ?type {
    wd:Q557141 wd:Q179700 wd:Q860861 wd:Q5003624 wd:Q4989906
  }
  ?art wdt:P31 ?type .
  ?art wdt:P170 ?creator .
  ?creator wdt:P31 wd:Q5 .
  ?creator wdt:P21 wd:Q6581072 .
  {
    ?art wdt:P276 wd:Q84 .
  } UNION {
    ?art wdt:P131 * wd:Q84 .
  }
  OPTIONAL {
    ?art rdfs:label ?artLabel FILTER ( LANG( ?artLabel ) = "en" )
  }
  OPTIONAL {
    ?creator rdfs:label ?creatorLabel FILTER ( LANG( ?creatorLabel ) = "en" )
  }
}
ORDER BY ?artLabel

Using entities:
- statue (wd:Q179700): is instance of genre of sculpture / is subclass of sculpture / is subclass of artificial physical object / is subclass of artefact / is subclass of figure / sculpture primarily conceived as a representational figure / sculpture primarily conceived as a representational figure / sculpture primarily conceived as a representational figure
- monument (wd:Q4989906), also known as monuments: is subclass of statue / is subclass of work of art / is subclass of built structure / is subclass of Architectural structure / is subclass of architectural structure / is subclass of Work of art / imposing structure created to commemorate a person or event, or used for that purpose / type of structure either explicitly created to commemorate a person or important event, or used for that purpose / type of structure either explicitly created to commemorate a person or important event, or used for that purpose
- memorial (wd:Q5003624), also known as memorial site, remembrance: is subclass of monument / is subclass of memory space / area or object, smaller than a monument, which serves as a focus for memory of something / object which serves as a focus for memory of something
- public art (wd:Q557141): is instance of art genre / is subclass of work of art / is subclass of Work of art / genre of art in the physical public domain / genre of art that is created to be in a public space
- human (wd:Q5), also known as human being, humans, individual Homo sapiens, individual human, modern humans, etc.: is instance of organisms known by a particular common name / is instance of class of organisms known by one particular common name / is subclass of omnivore / is subclass of natural person / is subclass of mammal / is subclass of individual animal / is subclass of person / any member of Homo sapiens, unique extant species of the genus Homo / common name of Homo sapiens, unique extant species of the genus Homo / common name of Homo sapiens, unique extant species of the genus Homo / common name of Homo sapiens, unique extant species of the genus Homo, from embryo to adult
- female (wd:Q6581072), also known as f, fairer sex, fem, female character, female gender, etc.: is instance of gender / is instance of sex of humans / to be used in "sex or gender" (P21) to indicate that the human subject is a female / to be used in "sex or gender" (P21) to indicate that the ... (P10339) to indicate that a word refers to a female person
- London (wd:Q84), also known as Augusta, Big Smoke, Kaerlud, Karelundein, LDN, etc.: is instance of global city / is instance of largest city / is instance of city / is instance of geographic location / is instance of financial center / is instance of Metropolis / is instance of metropolis / is instance of megacity / is instance of national capital / is instance of financial centre / capital and largest city of England and the United Kingdom / capital of England and the United Kingdom
- sculpture (wd:Q860861), also known as piece of sculpture, sculptural work, sculptures: is instance of type of work of art / is subclass of artificial physical object / is subclass of artefact / is subclass of plastic artwork / three-dimensional work of art / three-dimensional work of art / three-dimensional work of art

Using properties:
- located in the administrative territorial entity (wd:P131 as wdt), also known as administrative territorial entity, administrative territory, city, happens in, in, etc.: is subproperty of location / is subproperty of part of / the item is located on the territory of the following administrative entity / the item is located on the territory of the following administrative entity / the item is located on the territory of the following ... the item falls only partially into the administrative entity. / the item is located on the territory of the following ... the item falls only partially into the administrative entity.
- creator (wd:P170 as wdt), also known as art by, artist (non-musical), art work by, artwork by, by, etc.: maker of a creative work or other object (where no more specific property exists) / maker of this creative work or other object (where no more specific property exists) / maker of this creative work or other object (where no more specific property exists)
- sex or gender (wd:P21 as wdt), also known as biological sex, gender, gender expression, gender identity, gender or sex, etc.: sex or gender identity: male (Q6581097), female (Q6581072), ... (Q43445). Groups of same gender use subclass of (P279) / sex or gender identity of human or animal. For human: male, ... female organism. Groups of same gender use subclass of (P279) / sexual identity of subject: male (Q6581097), female ... (Q43445). Groups of same gender use "subclass of" (P279)
- location (wd:P276 as wdt), also known as based in, city, from, held by, in, etc.: location of the item, physical object or event is within. In ... use P131. In case of a distinct terrain feature use P706. / location of the item, physical object or event is within. In ... use P131. In case of a distinct terrain feature use P706. / location of the object, structure or event. In the case of an ... use P706. Use P7153 for locations associated with the object
- instance of (wd:P31 as wdt), also known as example of, has type, is a, is an, is of type, etc.: that class of which this subject is a particular example and ... a subclass of mountain (and an instance of volcanic landform) / type to which this subject corresponds/belongs. Different ... and the volcano is a type (instance) of volcanic landform

Execution result:
Got 6 rows and 4 columns:
| art                                                | artLabel                                     | creator                                | creatorLabel                      |
| -------------------------------------------------- | -------------------------------------------- | -------------------------------------- | --------------------------------- |
| Energy Sculpture London (wd:Q63183611)             | Energy Sculpture London (lang:en)            | Tia Anna Paynich (wd:Q61927540)        | Tia Anna Paynich (lang:en)        |
| Reach (wd:Q123049287)                              | Reach (lang:en)                              | Pixie Mudge Massey Shaw (wd:Q90518856) | Pixie Mudge Massey Shaw (lang:en) |
| Sadako Sasaki Monument (wd:Q129719331)             | Sadako Sasaki Monument (lang:en)             | Hazel Reeves (wd:Q59779567)            | Hazel Reeves (lang:en)            |
| Statue of Laurence Olivier, London (wd:Q110819408) | Statue of Laurence Olivier, London (lang:en) | Angela Conner (wd:Q4762412)            | Angela Conner (lang:en)           |
| The End (sculpture) (wd:Q118697934)                | The End (sculpture) (lang:en)                | Heather Phillipson (wd:Q19517821)      | Heather Phillipson (lang:en)      |
| The Tuckshop Tanner (wd:Q122678557)                | The Tuckshop Tanner (lang:en)                | Jessica Wetherly (wd:Q122678392)       | Jessica Wetherly (lang:en)        |

[System]
You are a question answering assistant. Your job is to generate a SPARQL query to answer a given user question.

You should follow a step-by-step approach to generate the SPARQL query:
1. Determine possible entities and properties implied by the user question.
2. Search for the entities and properties in the knowledge graphs. Where applicable, constrain the searches with already identified entities and properties.
3. Gradually build up the SPARQL query using the identified entities and properties. Start with simple queries and add more complexity as needed. Execute intermediate queries to get feedback and to verify your assumptions. You may need to refine or rethink your current plan based on the query results and go back to step 2 if needed, possibly multiple times.
4. Use the answer or cancel function to finalize your answer and stop the generation process.

Available knowledge graphs:
- wikidata at http://localhost:7001 with prefix index for entities and similarity index for properties, and notes:
  - P106 = occupation. Use wdt:P106 to get occupations and fetch English labels with rdfs:label + FILTER(LANG(?label)="en"). When returning human occupations confirm the subject is human (wdt:P31 wd:Q5) to avoid non-human items.
  - Population (P1082) and tabular (P4179): use wdt:P1082 for quick/direct values; for time-series/point-in-time use p:P1082 + ps:P1082 + pq:P585 and ORDER BY pq:P585 DESC. Inspect statement qualifiers (e.g., 'applies to part') and prov:wasDerivedFrom references (pr:P854 etc.) to detect city-proper vs metro/prefecture scopes before using values.
  - Common person properties: P31 (instance of human Q5), P106 (occupation), P569 (date of birth), P19 (place of birth), P27 (country of citizenship), P21 (sex/gender), P166 (award received). Use wdt: for direct values when possible.
  - P17 (country) can be incomplete/misleading for places (historical/overseas tags). To get modern cities in a country combine: instance-of city (P31=Q515) + wdt:P17 OR use wdt:P131* to find an admin parent whose wdt:P17 = the country. Also cross-check coordinates (P625) or admin hierarchy to spot outliers.
  - When filtering by date of birth (P569) use xsd:dateTime comparisons (e.g. >= "1900-01-01T00:00:00Z"^^xsd:dateTime). Be aware many items have year-only or imprecise dates and coverage is biased toward notable/public figures (sportspeople, politicians, artists).
  - To retrieve qualifiers (e.g., award year) use the statement/qualifier pattern: p:Pxxx / ps:Pxxx / pq:P585. Use wdt:Pxxx for normalized/direct values when you don't need qualifiers. Example: p:P166 + pq:P585 gives award year.
  - To get a person's occupations: use wdt:P106 for direct/normalized values and rdfs:label for human-readable names (FILTER(LANG(...))). Example: wd:Q... wdt:P106 ?occ . ?occ rdfs:label ?occLabel . FILTER(LANG(?occLabel)="en").
  - P166 = award received. Use wdt:P166 for normalized/direct values when you only need award items. To get award years or qualifiers use p:P166 / ps:P166 / pq:P585. Many statements lack pq:P585 — use OPTIONAL { ?stmt pq:P585 ?date } and ORDER BY DESC(?date). When listing award winners, filter ?person wdt:P31 wd:Q5 to ensure humans.
  - Population time-series pattern: wd:Q... p:P1082 ?stmt . ?stmt ps:P1082 ?pop . OPTIONAL { ?stmt pq:P585 ?date } . ORDER BY DESC(?date). pq:P585 is the point-in-time qualifier. IMPORTANT: time-series may mix scopes (city proper vs metro) — e.g., Tokyo has a 2016 entry ~38,140,000 likely metro vs smaller city figures. Inspect qualifiers/references for scope before use.
  - Use wdt:P131* to traverse the admin hierarchy and compare wdt:P17 on the place vs an admin parent to detect historical/colonial country assignments. When mismatches appear, inspect the admin parent's instance-of (P31), labels, qualifiers and references to interpret the historical scope.
  - wdt:P106 often yields multiple occupations for a person. Use GROUP_CONCAT(DISTINCT ?occLabel; separator=", ") or return multiple rows. Always fetch labels with rdfs:label + FILTER(LANG(?label)="en") to get readable occupation names.
  - When a search_entity returns multiple hits (person vs sculpture vs memorial), confirm you selected the human/statements by checking wdt:P31 (instance of) and relevant wdt: properties (e.g., wdt:P106). This avoids using a non-human QID by mistake.
  - search_autocomplete can be constrained with a SPARQL pattern containing ?search (e.g., SELECT * WHERE { ?search wdt:P31 wd:Q5 }). Use constraints to focus results (e.g., humans) and avoid ambiguous fallbacks; if it returns no results, fallback to search_entity and verify wdt:P31.
  - Use search_property_of_entity to find relevant properties for an entity (e.g., 'award' -> P166) and search_object_of_property to discover candidate objects (e.g., 'physicist' for P106). This reduces guessing P/Q ids and surfaces qualifiers.
  - Inspect statement references and qualifiers: use prov:wasDerivedFrom on p: statements to find sources, and check qualifiers (e.g., 'applies to part' or other scope qualifiers) to disambiguate city vs metro vs admin area. Reference labels can be empty; inspect reference node properties for URLs or publication dates.

Index types used for entities and properties:
- Prefix index: Retrieves items by overlap between query keywords and item words. The query keywords can match item words exactly or as prefixes.
- Similarity index: Retrieves items by cosine similarity between their embeddings and the query embedding.

General notes across knowledge graphs:
- Use rdfs:label + FILTER(LANG(?label)="en") for labels; avoid SERVICE wikibase:label. Use wdt:Pxxx for normalized/direct values when qualifiers aren't needed. Use p:Pxxx / ps:Pxxx / pq:Pxxx to access statement qualifiers (e.g., award year via pq:P585). When dates matter, prefer xsd:dateTime and watch for year-only precision.
- Practical query patterns: use rdfs:label + FILTER(LANG(...)) for labels. Use wdt:Pxxx for direct/normalized values when qualifiers aren't needed. Use p:Pxxx / ps:Pxxx / pq:Pxxx to access qualifiers (dates via pq:P585). For dates use xsd:dateTime and expect year-only precision. For places: combine P17 with P131 or coordinate (P625) filters to avoid historical/overseas mismatches.
- Use OPTIONAL for pq: qualifiers (e.g., pq:P585), sort by qualifier (ORDER BY pq:P585 DESC) to prefer recent values. Use GROUP_CONCAT to combine multiple labels/values in one row. Watch for typed literals (xsd:dateTime, xsd:decimal) when filtering or sorting.
- Before querying, use search_entity to resolve human-friendly names to wd:Q identifiers and verify instance-of (e.g., check wdt:P31 = wd:Q5 for humans) to avoid ambiguous matches. Prefer the top match but programmatically confirm P31 before using its data.
- Use search_property to confirm property identifiers (e.g., "country" -> P17) before embedding them in queries. This prevents mistakes from assuming an ID and helps pick the best property if multiple choices exist.
- search_autocomplete can fall back to an unconstrained search or error when there are too many candidates. If this happens (e.g., "more than the maximum supported number of subject candidates"), retry with narrower constraints such as instance-of (wdt:P31), additional type filters, or short prefixes to reduce the candidate set; otherwise fallback to search_entity and verify wdt:P31.
- Use list(...) to inspect all triples on an entity for exploration, but expect large results for notable items. Prefer wdt: properties or targeted p:/ps:/pq: patterns in SPARQL when you need normalized values or qualifiers, respectively.
- Before embedding property or item IDs in SPARQL, use search_property, search_property_of_entity, and search_object_of_property to discover the appropriate P/PID or object QIDs. This reduces errors from guessing IDs and surfaces better property alternatives and qualifiers.
- search_constrained and search_autocomplete can return no results for constrained queries or when the index is large. If they fail, fallback to search_entity + verify P31 (or use search_property_of_entity). Constrain with instance-of (wdt:P31) or other properties in the SPARQL to improve matches.
- When selecting awards by year, prefer xsd:dateTime range filters (e.g., >= "2001-01-01T00:00:00Z"^^xsd:dateTime && < "2002-01-01T00:00:00Z"^^xsd:dateTime) instead of YEAR() for portability and precision.
- When selecting award winners via wdt:P166, filter ?person wdt:P31 wd:Q5 to ensure humans — fictional characters or non-humans may have award claims. If you need award years use p:P166 / ps:P166 / pq:P585 and OPTIONAL { ?stmt pq:P585 ?year } to retrieve qualifier years.
- Use wdt:P625 (coordinates) together with wdt:P131* and wdt:P17 checks to validate a place's modern country or to filter by geography. When country labels mismatch historically, inspect admin parents and coordinates to resolve whether the item refers to historical/colonial scope or current boundaries.
- Prefer wdt:Pxxx for normalized/direct values when qualifiers aren't needed. Use p:Pxxx / ps:Pxxx / pq:Pxxx to access qualifiers (e.g., pq:P585 for award year). Always fetch labels with rdfs:label + FILTER(LANG(?label) = "en").
- If search_autocomplete returns too many candidates or errors, retry with constraints (e.g., SELECT * WHERE { ?search wdt:P31 wd:Q5 }) or narrower query text. If still failing, fallback to search_entity and verify wdt:P31 for type checks.
- For award-year queries use p:P166 / ps:P166 / pq:P585 to access award statements and year qualifiers. Filter by xsd:dateTime ranges (e.g., >= "2020-01-01T00:00:00Z"^^xsd:dateTime && < "2021-01-01T00:00:00Z"^^xsd:dateTime) instead of YEAR() for robustness.
- Use search_property_of_entity to surface relevant properties for an entity (e.g., 'birth' -> P569/P19). list(...) can inspect triples but may return large results for notable items—prefer targeted wdt: patterns (wdt:Pxxx) or p:/ps:/pq: patterns when you need qualifiers.

SPARQL prefixes for use in function calls:
- bd: <http://www.bigdata.com/rdf#
- cc: <http://creativecommons.org/ns#
- data: <https://www.wikidata.org/wiki/Special:EntityData/
- dc: <http://purl.org/dc/elements/1.1/
- dct: <http://purl.org/dc/terms/
- foaf: <http://xmlns.com/foaf/0.1/
- geo: <http://www.opengis.net/ont/geosparql#
- geof: <http://www.opengis.net/def/function/geosparql/
- gn: <http://www.geonames.org/ontology#
- hint: <http://www.bigdata.com/queryHints#
- imdb: <https://www.imdb.com/
- math: <http://www.w3.org/2005/xpath-functions/math#
- ontolex: <http://www.w3.org/ns/lemon/ontolex#
- owl: <http://www.w3.org/2002/07/owl#
- p: <http://www.wikidata.org/prop/
- pq: <http://www.wikidata.org/prop/qualifier/
- pqn: <http://www.wikidata.org/prop/qualifier/value-normalized/
- pqv: <http://www.wikidata.org/prop/qualifier/value/
- pr: <http://www.wikidata.org/prop/reference/
- prn: <http://www.wikidata.org/prop/reference/value-normalized/
- prov: <http://www.w3.org/ns/prov#
- prv: <http://www.wikidata.org/prop/reference/value/
- ps: <http://www.wikidata.org/prop/statement/
- psn: <http://www.wikidata.org/prop/statement/value-normalized/
- psv: <http://www.wikidata.org/prop/statement/value/
- qb: <http://purl.org/linked-data/cube#
- qfn: <http://qlever.cs.uni-freiburg.de/function#
- ql: <http://qlever.cs.uni-freiburg.de/builtin-functions/
- qlss: <https://qlever.cs.uni-freiburg.de/spatialSearch/
- rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#
- rdfs: <http://www.w3.org/2000/01/rdf-schema#
- ref: <http://www.wikidata.org/reference/
- s: <http://www.wikidata.org/entity/statement/
- schema: <http://schema.org/
- skos: <http://www.w3.org/2004/02/skos/core#
- v: <http://www.wikidata.org/value/
- void: <http://rdfs.org/ns/void#
- wd: <http://www.wikidata.org/entity/
- wdno: <http://www.wikidata.org/prop/novalue/
- wdt: <http://www.wikidata.org/prop/direct/
- wdtn: <http://www.wikidata.org/prop/direct-normalized/
- wikibase: <http://wikiba.se/ontology#
- xsd: <http://www.w3.org/2001/XMLSchema#

Additional rules to follow:
- Explain your thought process before and after each step and function call.
- Do not just use or make up entity or property identifiers without verifying their existence in the knowledge graphs first.
- Do not ask the user for clarifications without first attempting to complete the task. If the task input is incomplete or ambiguous, try to make reasonable assumptions and document them.
- Do not use "SERVICE wikibase:label { bd:serviceParam wikibase:language ..." in SPARQL queries. It is not SPARQL standard and unsupported by the used QLever SPARQL endpoints. Use rdfs:label or similar properties to get labels instead.
- Always execute your final SPARQL query before giving an answer to make sure it returns the expected results.
- The SPARQL query should always return the actual identifiers / IRIs of the items in its result. It additionally may return labels or other human-readable information, but they are optional and should be put within optional clauses unless explicitly requested by the user.
- Do not stop early if there are still obvious improvements to be made to the SPARQL query. For example, keep refining your SPARQL query if its result contains irrelevant items or is missing items you expected.
- Do not perform additional computation (e.g. filtering, sorting, calculations) on the result of the SPARQL query to determine the answer. All computation should be done solely within SPARQL.
- For questions with a "True" or "False" answer the SPARQL query should be an ASK query.

[User] What are the public artworks located in London created by female artists? For each artwork, include also the artwork's creator.

[Assistant]
Step 1 — plan and identify candidate properties/entities:
- I will verify relevant properties: "creator" (likely P170), "location" (P276), "instance of" (P31), and "sex or gender" (P21) to filter female creators.
- I will search for items/entities such as "London" (city), and classes that represent public artworks (e.g., "public art", "statue", "sculpture", "memorial", "monument") to include a broad set of public artworks.

I'll start by searching for the "creator" property and for the London entity. Then I'll search for candidate artwork types (sculpture, statue, memorial, public art). I'll explain results and refine into a SPARQL query.

Question: creator

Top 10 property alternatives:
1. collection creator (wd:P6241 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via creator), also known as archival collection creator, archive creator, archive of, archives of, collected by, etc.: entity (person, organization, etc.) that caused a record or collection to be produced or gathered
2. founded by (wd:P112 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via creator), also known as begun by, co-founded by, cofounded by, co-founder, cofounder, etc.: founder or co-founder of this organization, religion, place or entity / founder or co-founder of the organization or place / founder of this organisation, religion, or place / is subproperty of creator
3. creator (wd:P170 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn), also known as art by, artist (non-musical), art work by, artwork by, by, etc.: maker of this creative work or other object (where no more specific property exists) / maker of this creative work or other object (where no more specific property exists) / maker of a creative work or other object (where no more specific property exists)
4. author (wd:P50 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via creator), also known as co-author, creator, maker, playwright, poet, etc.: main creator(s) of a written work (use on works, not humans); ... name string) when Wikidata item is unknown or does not exist / main creator(s) of a written work (use on works, not humans) / main creator(s) of a written work (use on works, not humans) / is subproperty of creator
5. manufacturer (wd:P176 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via maker), also known as assembled by, assembler, brewed by, brewer, builder, etc.: (main or final) manufacturer or producer of this product / manufacturer or producer of this product
6. contributor to the creative work or subject (wd:P767 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via creative contributor), also known as assistant, collaborator, contributor, contributor(s) to the subject, creative contributor, etc.: person or organization that contributed to a subject: co-creator of a creative work or subject / is subproperty of participant
7. notable work (wd:P800 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via creator of), also known as artwork, author of, bibliography, books by, creator of, etc.: notable scientific, artistic or literary work, or other work of significance among subject's works / notable scientific, artistic or literary work, or other work of significance among subject's works
8. possible creator (wd:P1779 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via creator (possible)), also known as attributed to, creator (possible), P1779: for a creative work with considerable uncertainty about the author
9. cover art by (wd:P736 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via artist), also known as album art by, album artwork by, album artwork designed by, album artwork designer, artist, etc.: name of person or team creating cover artwork for book, record album, single record etc.
10. performer (wd:P175 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via artist), also known as actor, actress, artist, dancer, musical artist, etc.: actor, musician, band or other performer associated with this role or musical work / actor, musician, music group or other performer associated with this work / is subproperty of contributor to the creative work or subject

[Assistant]
I'll search for the London entity (the city) to get its Q-id (likely wd:Q84). I'll verify it's the correct London (the capital of the UK).

Question: London

Top 10 entity alternatives:
1. London (wd:Q84), also known as Augusta, Big Smoke, Kaerlud, Karelundein, LDN, etc.: capital and largest city of England and the United Kingdom / capital of England and the United Kingdom / is instance of geographic location / is instance of financial center / is instance of financial centre / is instance of national capital / is instance of largest city / is instance of global city / is instance of Metropolis / is instance of metropolis / is instance of megacity / is instance of city
2. City of London (wd:Q23311, matched via London), also known as City and County of the City of London, City of London (unparished area), London, Square Mile, the City: city, ceremonial county and local government district that ... central business district in the London Region in England, UK / city, ceremonial county and local government district that ... and the primary central business district (CBD) of London / is instance of district of the United Kingdom / is instance of Ceremonial counties of England / is instance of ceremonial county of England / is instance of district with city status / is instance of central business district / is instance of financial centre / is instance of financial center / is instance of unparished area / is instance of city
3. London (wd:Q92561), also known as City of London, London, ON, London, Ontario: is instance of separated municipality in Ontario / is instance of single-tier municipality / city in Southwestern Ontario, Canada / is instance of big city / is instance of city
4. London (wd:Q3061911), also known as London, Kentucky, London, KY: is instance of city of the United States / is instance of city in the United States / city in Kentucky, United States
5. London (wd:Q1001456), also known as London, OH, London, Ohio: city in Madison County, Ohio, United States / city in Madison County, Ohio, United States / is instance of city in the United States / is instance of city of the United States / is instance of county seat
6. London (wd:Q79348), also known as London, AR, London, Arkansas: city in Pope County, Arkansas, United States / is instance of city in the United States / is instance of city of the United States
7. London (wd:Q586353), also known as London, CA, London, California: census designated place in Tulare County, California, United States / is instance of census-designated place in the United States / is instance of census-designated place
8. London Recordings (wd:Q935090, matched via London), also known as London, London Records: record label headquartered in the United Kingdom / is instance of record label / is instance of business
9. London (wd:Q1749384): 2005 film directed by Hunter Richards / is instance of film
10. London (wd:Q2477346), also known as Ronton: is instance of human settlement / human settlement in Kiribati / human settlement in Kiribati / settlement in Kiribati

[Assistant]
I'll search for candidate artwork classes: "public art", "statue", "sculpture", "monument", "memorial". I'll verify their Q-ids and decide which to include in the SPARQL as instance-of (P31) constraints (using a UNION or VALUES).

Question: public art

Top 10 entity alternatives:
1. public art (wd:Q557141): genre of art that is created to be in a public space / genre of art in the physical public domain / is subclass of work of art / is subclass of Work of art / is instance of art genre
2. Art Públic (wd:Q99433743), also known as Barcelona's Public Art: is instance of catalogue / is instance of catalog / is instance of website
3. WikiProject Public Art (wd:Q14942900): Wikimedia subject-area collaboration / is instance of WikiProject
4. Public Art Fund (wd:Q3925277): is instance of non-profit organization / is instance of non-profit organisation / is instance of nonprofit organization / non-profit organisation in the USA / non-profit organization in the USA / is instance of art institution
5. SCAPE Public Art (wd:Q121494264), also known as SCAPE, SCAPE Christchurch Biennial of Art in Public Space: public art organisation in Christchurch, New Zealand / is instance of creative industries / is instance of art institution
6. Auckland Council Art Collection (wd:Q121849545, matched via Auckland Public Art), also known as Auckland Council Public Art, Auckland Council Public Art Collection, Auckland Public Art, Auckland Public Art Collection, Auckland Public Art / He Kohinga Toi, etc.: Art collection owned by the Auckland Council, New Zealand / is instance of art collection
7. Public Art Festival (wd:Q39086476)
8. digital public art (wd:Q5275964): computer-generated or controlled public art / is subclass of digital art / is subclass of public art
9. public art program (wd:Q65245149): is subclass of government programme / is subclass of government program
10. O-Train public art (wd:Q96397005): public art in the Ottawa light rail system

[Assistant]
Searching for "statue" and "sculpture" entities to include likely types of public artworks.

Question: statue

Top 10 entity alternatives:
1. statue (wd:Q179700): sculpture primarily conceived as a representational figure / sculpture primarily conceived as a representational figure / sculpture primarily conceived as a representational figure / is subclass of artificial physical object / is instance of genre of sculpture / is subclass of sculpture / is subclass of artefact / is subclass of figure
2. The Statue (wd:Q7766417, matched via Statue), also known as Statue: 1971 film by Rod Amateau / is instance of film
3. Statue (wd:Q22675151): cultural heritage monument D-4-76-180-14 (0) in Teuschnitz, Bavaria / is instance of statue
4. The Statue (wd:Q3989460, matched via Statue), also known as Statue: is instance of short film / 1913 film by Allen Curtis
5. Statue (wd:Q15115742): cultural heritage monument D-4-76-145-60 (0) in Kronach, Bavaria / is instance of statue
6. Statue (wd:Q14530744): cultural heritage monument D-4-76-145-122 (0) in Kronach, Bavaria / is instance of statue
7. Statue (wd:Q12698799): Finnish power/thrash metal band / is instance of musical group
8. Statue (wd:Q110888367): is instance of statue / statue in France
9. Statue (wd:Q115927780): is instance of statue
10. Statue (wd:Q115927723): is instance of statue

[Assistant]
I'll search for "sculpture" and "memorial" as well. I will then build a query that selects items that are instance of any of these classes (public art, statue, sculpture, memorial, monument) and located in London (using P131/wdt:P276/P131* with wd:Q84), and with creator (P170) a human (P31=Q5) whose sex/gender (P21) is female (wd:Q6581072). I will verify property identifiers for location (P276), located in administrative territorial entity (P131), and sex/gender (P21).

Question: sculpture

Top 10 entity alternatives:
1. art of sculpture (wd:Q11634, matched via sculpture), also known as sculpting, sculpture: branch of the visual arts that operates in three dimensions / branch of the visual arts that operates in three dimensions / is subclass of artistic creation / is instance of type of arts / is instance of form of art / is instance of art genre / is subclass of sculpture / is instance of hobby
2. sculpture (wd:Q860861), also known as piece of sculpture, sculptural work, sculptures: is subclass of artificial physical object / is instance of type of work of art / is subclass of plastic artwork / three-dimensional work of art / three-dimensional work of art / three-dimensional work of art / is subclass of artefact
3. Sculpture (wd:Q2924134): 2005 orchestral composition by Magnus Lindberg / is instance of musical work/composition
4. Sculpture (wd:Q18352932): sculpture by Philolaos at Lyon / is instance of sculpture
5. sculpture (wd:Q17310537): manufacture of sculptures in arts and crafts / is instance of type of arts / is subclass of plastic arts / is instance of handicraft / is instance of Handicraft / is instance of art genre
6. Sculpture (wd:Q7439454): feature on the shells of mollusks
7. Sculpture (wd:Q110301451): public artwork by Auke de Vries in Haarlem, the Netherlands / is instance of sculpture
8. sculpture (wd:Q110551761): sculpture by Dietrich Ebert in Berlin, Germany / is instance of sculpture
9. sculpture (wd:Q109452631): sculpture by Ingeborg Hunzinger on the grave of Herbert and ... and Friedrichswerdersche communities in Berlin-Mitte, Germany / is instance of sculpture
10. sculpture (wd:Q108438352): sculpture by Christof Glamm in Berlin-Hellersdorf, Germany / is instance of sculpture

[Assistant]
I'll search for "memorial" and "monument" entities.

Question: memorial

Top 10 entity alternatives:
1. Memorial (wd:Q851563), also known as Memorial Human Rights Centre, Memorial International: Russian historical and civil rights society / is instance of human rights organization / is instance of human rights organisation / is instance of Umbrella organization / is instance of umbrella organization / is instance of umbrella organisation / is instance of historical society
2. memorial (wd:Q5003624), also known as memorial site, remembrance: area or object, smaller than a monument, which serves as a focus for memory of something / object which serves as a focus for memory of something / is subclass of memory space / is subclass of monument
3. memorial (wd:Q1417046), also known as obligatory memorial: liturgical rank according to the General Roman Calendar of 1969 / is subclass of liturgical rank of the Roman rite
4. Lord's Evening Meal (wd:Q2638602, matched via Memorial), also known as Memorial, Memorial of Christ's Death: day of observance for Jehovah's Witnesses commemorating the death of Jesus, the only religious holiday for that denomination / is instance of religious and cultural festive day / is instance of holiday
5. Memorial (wd:Q1829690): is instance of album / Moonspell album
6. Mémorial (wd:Q6950088), also known as Memorial: official gazette of the Grand Duchy of Luxembourg / is instance of registration authority / is instance of periodical / is instance of gazette / is instance of Gazette
7. OBD Memorial (wd:Q1995810, matched via Memorial), also known as Memorial: Russian government database project / is instance of website
8. Memorial (wd:Q15104768): Russian Circles album / is instance of album
9. .memorial (wd:Q20574951): is instance of top-level domain / top-level domain
10. Memorial (wd:Q6815335): episode of Star Trek: Voyager (S6 E14) / is instance of Star Trek episode

[Assistant]
Now I'll verify the property identifiers for location. Likely P276 (location) and P131 (located in administrative territorial entity). I'll search for "location" and "located in" properties.

Question: location

Top 10 property alternatives:
1. work location (wd:P937 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via location), also known as active in, conducts business at, conducts business in, did work at, did work from, etc.: location where persons or organisations were actively participating in employment, business or other work / is subproperty of significant place / location where persons were active / is subproperty of location
2. location (wd:P276 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn), also known as based in, city, from, held by, in, etc.: location of the object, structure or event. In the case of an ... use P706. Use P7153 for locations associated with the object / location of the item, physical object or event is within. In ... use P131. In case of a distinct terrain feature use P706. / location of the item, physical object or event is within. In ... use P131. In case of a distinct terrain feature use P706.
3. coordinate location (wd:P625 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via location), also known as co-ordinate location, co-ordinates, coordinates, co-ords, coords, etc.: geocoordinates of the subject. For Earth, please note that only WGS84 coordinating system is supported at the moment / coordinates of the subject / coordinates of the subject
4. ranking (wd:P1352 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via place), also known as peak position, place, placing, position, rank, etc.: subject's ordinal position as qualitatively evaluated relative to other members of a group / the subject's position in the specified rank
5. occupant (wd:P466 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via location of), also known as home team, houses, inhabitant, lessee, location of, etc.: person or organization occupying a building or facility / person or organization occupying property / is subproperty of used by
6. applies to jurisdiction (wd:P1001 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via of location), also known as applicable area, applicable country, applicable geographic place, applicable jurisdiction, applicable location, etc.: the item (institution, law, public office, public ... jurisdiction: a country, state, municipality, ...) / the item (an institution, law, public office ...) or ... jurisdiction: a country, state, municipality, ...) / is subproperty of characteristic of / is subproperty of significant place / is subproperty of operating area
7. directions (wd:P2795 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via locality or place), also known as locality or place, P2795: describe how to find the subject - directions, objects along way, comments / describe how to find the subject - directions, objects along way, comments
8. located in the present-day administrative territorial entity (wd:P3842 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via current location), also known as current administrative territorial entity, current location, currently in, located in present day administrative territorial entity, located in present-day administrative territorial entity, etc.: the item was located in the territory of this present-day ... unit; however the two did not at any point coexist in time / the item was located in the territory of this present-day ... unit; however the two did not at any point coexist in time / is subproperty of location / is subproperty of part of
9. located in the administrative territorial entity (wd:P131 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via locality), also known as administrative territorial entity, administrative territory, city, happens in, in, etc.: the item is located on the territory of the following ... the item falls only partially into the administrative entity. / the item is located on the territory of the following ... the item falls only partially into the administrative entity. / the item is located on the territory of the following administrative entity / the item is located on the territory of the following administrative entity / is subproperty of location / is subproperty of part of
10. operating area (wd:P2541 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via location served), also known as area of operations, area of responsibility, area operated, area served, areas served, etc.: geographic area or jurisdiction an organisation or industry operates in, serves, or has responsibility for / geographic area or jurisdiction an organisation or industry operates in, serves, or has responsibility for / geographic area or jurisdiction an organization or industry operates in, serves, or has responsibility for / is subproperty of location

[Assistant]
I'll search for the "sex or gender" property to confirm P21 and the female value Q6581072.

Question: sex or gender

Top 10 property alternatives:
1. sex or gender (wd:P21 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn), also known as biological sex, gender, gender expression, gender identity, gender or sex, etc.: sexual identity of subject: male (Q6581097), female ... (Q43445). Groups of same gender use "subclass of" (P279) / sex or gender identity: male (Q6581097), female (Q6581072), ... (Q43445). Groups of same gender use subclass of (P279) / sex or gender identity of human or animal. For human: male, ... female organism. Groups of same gender use subclass of (P279)
2. requires grammatical feature (wd:P5713 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via uses gender), also known as grammatical feature required, required grammatical feature, requires case, requires mood, uses case, etc.: grammatical features required or generally used with lexeme or form of lexeme
3. grammatical gender (wd:P5185 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via gender), also known as gender, P5185: grammatical gender of the word / grammatical gender of the word / grammatical gender of the word
4. sexual orientation (wd:P91 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via sexuality), also known as sexuality, P91: the sexual orientation of the person relative to their ... has been widely agreed upon by historians after their death / the sexual orientation of the person — use IF AND ONLY IF ... has been widely agreed upon by historians after their death / the sexual orientation of the person — use IF AND ONLY IF ... has been widely agreed upon by historians after their death
5. has grammatical gender (wd:P5109 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via has genders), also known as grammatical genders, has genders, P5109: specific form of noun class system of a language. Use ... of" (P805) to link to language specific item if present
6. semantic gender (wd:P10339 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via natural gender), also known as natural gender, P10339: used when a word is only used to refer to people of this gender or to animals of this sex, independent of the grammatical gender
7. male form of label (wd:P3321 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via male gender sense), also known as male form of label (string), male gender sense, masculine form of label, P3321: male form of name or title (for female use P2521) / male form of name or title / male form of name or title
8. GSSO ID (wd:P9827 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via Gender, Sex, and Sexual Orientation Ontology identifier), also known as Gender, Sex, and Sexual Orientation Ontology ID, Gender, Sex, and Sexual Orientation Ontology identifier, GSSO identifier, P9827: identifier for controlled vocabulary in the GSSO (Gender, Sex, and Sexual Orientation) ontology
9. unmarried partner (wd:P451 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via sex partner), also known as boyfriend, cohabitant, domestic partner, enbyfriend, girlfriend, etc.: someone with whom the person is in a relationship without being married. Use "spouse" (P26) for married couples / someone with whom the person is in a relationship without being married. Use "spouse" (P26) for married couples / is subproperty of significant person
10. female form of label (wd:P2521 as pr/psn/wdtn/ps/prn/p/pq/pqv/wdt/prv/psv/pqn, matched via female gender sense), also known as female form of label (string), female gender sense, feminine form of label, P2521: female form of name or title (for male use P3321) / female form of name or title / female form of name or title

[Assistant]
I'll search for "monument" to get its Q-id. Then I'll build a SPARQL query using instance-of values for a broad set of public artwork classes, location constraints (P276 or P131* to London wd:Q84), and creator constraints (human + female). I will explain the query before executing it.

Question: monument

Top 10 entity alternatives:
1. monument (wd:Q4989906), also known as monuments: type of structure either explicitly created to commemorate a person or important event, or used for that purpose / type of structure either explicitly created to commemorate a person or important event, or used for that purpose / imposing structure created to commemorate a person or event, or used for that purpose / is subclass of architectural structure / is subclass of Architectural structure / is subclass of built structure / is subclass of work of art / is subclass of Work of art / is subclass of statue
2. Monument (wd:Q1003709), also known as Monument, CO, Monument, Colorado: town in El Paso County, Colorado, United States / is instance of town in the United States
3. Monument (wd:Q3458939), also known as Monument, OR, Monument, Oregon: is instance of city of Oregon / city in Oregon, USA
4. Monument (wd:Q961421), also known as Monument, PA, Monument, Pennsylvania: census designated place in Centre County, Pennsylvania, United States / is instance of unincorporated community in the United States / is instance of census-designated place in the United States / is instance of census-designated place
5. Monument (wd:Q6022902), also known as Monument, New Mexico, Monument, NM: is instance of census-designated place in the United States / human settlement in New Mexico, United States of America / is instance of census-designated place / is instance of human settlement
6. Monument (wd:Q3862571): 1983 live album by Ultravox / is instance of album
7. Monument (wd:Q3323226): is instance of album / album by Miss May I / album by Miss May I / album by Miss May I
8. Monument (wd:Q105123633): is instance of musical work/composition / 2021 single by KEiiNO
9. Monument (wd:Q21490336): is instance of mountain
10. Monument (wd:Q6906784), also known as Monument, Kansas, Monument, KS: is instance of unincorporated community in the United States / unincorporated community in Logan County, Kansas

[Assistant]
I'll run a SPARQL SELECT query that:
- looks for items that are instance of common public-art classes (public art, statue, sculpture, memorial, monument),
- have creator (P170) who is a human (P31 = Q5) and female (P21 = Q6581072),
- and are located in London (either P276 = London or via the admin hierarchy P131* reaching London wd:Q84).
I'll request English labels for artworks and creators. Now I'll execute that query.

execute

SELECT DISTINCT ?art ?artLabel ?creator ?creatorLabel WHERE {
  VALUES ?type { wd:Q557141 wd:Q179700 wd:Q860861 wd:Q5003624 wd:Q4989906 }
  ?art wdt:P31 ?type .
  ?art wdt:P170 ?creator .
  ?creator wdt:P31 wd:Q5 .
  ?creator wdt:P21 wd:Q6581072 .
  {
    ?art wdt:P276 wd:Q84 .
  } UNION {
    ?art wdt:P131* wd:Q84 .
  }
  OPTIONAL { ?art rdfs:label ?artLabel FILTER(LANG(?artLabel)="en") }
  OPTIONAL { ?creator rdfs:label ?creatorLabel FILTER(LANG(?creatorLabel)="en") }
}
ORDER BY ?artLabel

Got 6 rows and 4 columns:
| art                                                | artLabel                                     | creator                                | creatorLabel                      |
| -------------------------------------------------- | -------------------------------------------- | -------------------------------------- | --------------------------------- |
| Energy Sculpture London (wd:Q63183611)             | Energy Sculpture London (lang:en)            | Tia Anna Paynich (wd:Q61927540)        | Tia Anna Paynich (lang:en)        |
| Reach (wd:Q123049287)                              | Reach (lang:en)                              | Pixie Mudge Massey Shaw (wd:Q90518856) | Pixie Mudge Massey Shaw (lang:en) |
| Sadako Sasaki Monument (wd:Q129719331)             | Sadako Sasaki Monument (lang:en)             | Hazel Reeves (wd:Q59779567)            | Hazel Reeves (lang:en)            |
| Statue of Laurence Olivier, London (wd:Q110819408) | Statue of Laurence Olivier, London (lang:en) | Angela Conner (wd:Q4762412)            | Angela Conner (lang:en)           |
| The End (sculpture) (wd:Q118697934)                | The End (sculpture) (lang:en)                | Heather Phillipson (wd:Q19517821)      | Heather Phillipson (lang:en)      |
| The Tuckshop Tanner (wd:Q122678557)                | The Tuckshop Tanner (lang:en)                | Jessica Wetherly (wd:Q122678392)       | Jessica Wetherly (lang:en)        |

[Assistant]
I will submit the final SPARQL query and the summarized results (artwork label + QID and creator label + QID). This finalizes the process.

answer

SELECT DISTINCT ?art ?artLabel ?creator ?creatorLabel WHERE {
  VALUES ?type { wd:Q557141 wd:Q179700 wd:Q860861 wd:Q5003624 wd:Q4989906 }
  ?art wdt:P31 ?type .
  ?art wdt:P170 ?creator .
  ?creator wdt:P31 wd:Q5 .
  ?creator wdt:P21 wd:Q6581072 .
  {
    ?art wdt:P276 wd:Q84 .
  } UNION {
    ?art wdt:P131* wd:Q84 .
  }
  OPTIONAL { ?art rdfs:label ?artLabel FILTER(LANG(?artLabel)="en") }
  OPTIONAL { ?creator rdfs:label ?creatorLabel FILTER(LANG(?creatorLabel)="en") }
}
ORDER BY ?artLabel

Answer:
Results (public artworks located in London created by female artists):

- Energy Sculpture London (wd:Q63183611) — creator: Tia Anna Paynich (wd:Q61927540)
- Reach (wd:Q123049287) — creator: Pixie Mudge Massey Shaw (wd:Q90518856)
- Sadako Sasaki Monument (wd:Q129719331) — creator: Hazel Reeves (wd:Q59779567)
- Statue of Laurence Olivier, London (wd:Q110819408) — creator: Angela Conner (wd:Q4762412)
- The End (sculpture) (wd:Q118697934) — creator: Heather Phillipson (wd:Q19517821)
- The Tuckshop Tanner (wd:Q122678557) — creator: Jessica Wetherly (wd:Q122678392)

Notes:
- Query searched for items that are instance of common public-art classes (public art, statue, sculpture, memorial, monument), located in London (P276 = wd:Q84 or via the administrative hierarchy P131*), and whose creator (P170) is a human (P31 = wd:Q5) with sex/gender = female (P21 = wd:Q6581072).
- Wikidata coverage is incomplete; this result set reflects items in Wikidata matching those constraints and may miss artworks lacking P31, location, or creator statements, or where the artist's gender is not recorded.