Skip to main content

Working with Expansion Queries in SPARQL View

26/09/2025

Semantic expansion in the Workbench is done with a SPARQL query that expands the concepts extracted from the input. The Workbench comes with one sample expansion query, which makes use of narrower and sibling concepts of extracted concepts and can be loaded from the application's database.

This section explains how to work with expansion queries in SPARQL View. For in-depth guides and examples of how to use the Expansion Query Builder, refer to An Introduction to Inference Tagging and Configuring the Recommender using the Workbench.

Moreover, the Workbench supports subject matter experts in constructing their own SPARQL queries by validating those queries and giving them the option to test them with manually selected concepts and save them for future use.

Loading an Expansion Query

You can load a sample query the Workbench comes with or any queries you have previously saved.

  1. Navigate to the Expansion tab (1) of the Workbench Settings Sdialog.

    workbench_expansion1.png
  2. Open the SPARQL View sub-tab (2).

  3. Select Load query (3).

  4. Select the query (4).

  5. Confirm with Load (5).

    workbench_expansion2.png
Testing an Expansion Query

The Workbench supports subject matter experts in constructing their own SPARQL queries by giving them the option to test them with manually selected concepts.

  1. Start typing the concept to be used for testing the expansion query into the search field (1) underneath the command line.

  2. Select the concept from the list of suggestions (2).

  3. Repeat steps 1 and 2 for as many concepts as you wish.

  4. Click Test (4).

    test-expansion-query.png

    You can see a list of expanded concepts together with their URIs and concept scores.

Saving an Expansion Query

You can save an expansion query for future use.

  1. In the Settings dialog, on the Expansion tab, open the SPARQL View sub-tab and select Save query (1).

    workbench_expansion3.png

    The Save expansion query dialog box opens.

  2. Enter a name and description for the expansion query (2).

  3. Confirm with Save (3).

    save-query2.png

    The query has been saved into the application's database.

    Note

    The expansion queries you save are only accessible to you. Other users of the Workbench cannot see them.

Deleting an Expansion Query

You can permanently delete any saved expansion query except for the original sample query.

  1. In the Settings dialog, on the Expansion tab, open the SPARQL View sub-tab and select Load query (1).

    workbench_expansion4.png
  2. Click the bin icon next to the query you want to delete (2).

    delete-query.png

    The query is permanently deleted from the application.