Tag Hierarchies

Tag hierarchies are a way of grouping related tag types together. The main use of tag hierarchies is to configure the drill-down behaviour for tag based reports. The following sections describe how to design, create and use your tag hierarchies.

A common use case in reporting is to provide a summarised view of data with the ability to drill down into specific areas of interest. In learning and assessment, it can be useful to see a summary of a student’s performance across broad subject areas, with the option of drilling into a specific study unit to identify gaps in the student’s knowledge.

This kind of analytical reporting can be achieved easily with Reports API and tag hierarchies. A tag hierarchy defines how Reports API will summarise and group the assessment results in a drill-down report.

Tag hierarchies group two or more tag types into a hierarchical structure. The hierarchy defines the order of the tag types, from the broad summary level to the detailed granular level. For items to be detected and reported as part of a tag hierarchy, the item needs to be tagged with a value for each tag type in the hierarchy.

Here are two examples showing different tag hierarchies and how they might be used.

A set of school subjects can each be divided into a granular set of topic areas. This tag hierarchy would be defined as:

  • Level 1: Subject
  • Level 2: Topic

For this tag hierarchy, items would need to be tagged with the Subject and the Topic they relate to:

  • An item about the properties of right-angled triangles could be tagged Subject:Math, Topic:Geometry.
  • An item about the probability of dice rolls could be tagged Subject:Math, Topic:Statistics.
  • An item about single-celled organisms could be tagged Subject:Science, Topic:Biology.

An online course is divided into units and chapters. Each chapter has some test exercises. Each exercise question has a difficulty rating of basic, intermediate or advanced. This tag hierarchy could be defined as:

  • Level 1: Unit
  • Level 2: Chapter
  • Level 3: Exercise
  • Level 4: Difficulty

For this tag hierarchy, items would need to be tagged with the Unit, Chapter, Exercise and Difficulty rating:

  • An introductory item about the Amazon rainforest could be tagged Unit:1-ecosystems, Chapter:1.1-biomes, Exercise:1.1a, Difficulty:Basic.
  • A chapter-review item about greenhouse gases could be tagged Unit:1-ecosystems, Chapter:1.2-climate-science, Exercise:1.2d, Difficulty:Intermediate.
  • A complex word problem involving mass and acceleration could be tagged Unit:2-physics, Chapter:2.2-motion, Exercise:2.2b, Difficulty:Advanced.

Hierarchies are created and maintained by Learnosity. If you are interested in creating Hierarchies please contact us for more information.

Note the following properties of tag hierarchies:

  • Two or more tag types can be structured into a hierarchy.
  • Any tag type can be grouped in a tag hierarchy.
  • A single tag type can be reused in any number of hierarchies, and can be used at different levels in each hierarchy.

Reports API uses tag hierarchies to summarise and display assessment results in drill-down reports. The relevant report types accept a tag hierarchy reference. Those reports will aggregate assessment scores according to the tags applied to each item.

Taking the subject-topic hierarchy as an example:

  • The Sessions Summary by Tag report will display a percentage score for English, which is the percentage score achieved across all items in the assessment tagged Subject:English. If the assessment also contains items tagged Subject:Math, the report will show a separate percentage for Math.
  • The report also provides drill down functionality, which provides a breakdown of percentage scores for each tag from the second level of the hierarchy - in this case, the Topic areas. If each English item is also tagged with Topic:Comprehension, Topic:Writing or Topic:Grammar, the English score will be broken down by those Topics. The score for each Topic is calculated as the percentage score for the set of items associated with that Topic tag. Similarly, the score for Math items will be reported by Algebra, Geometry and Statistics scores.

This example demonstrates the interplay between tag hierarchies and the tag values applied to an item. The tag hierarchy dictates which tag type to use for the high level summary, and which to use for lower level breakdown. The actual category names that appear in the report are taken from the tag values applied to the items in an assessment.

For tag hierarchies that have many levels, it may be desirable to view the score breakdown for a specific branch of the hierarchy. Some reports can accept a tag hierarchy path parameter, which is used to render the report starting from that point in the hierarchy.

Taking the unit-chapter-exercise-difficulty hierarchy as an example, we might want to see the score for exercise 2.2a, broken down by question difficulty. We could use the Progress by Tag by User report as follows:

{
    "id":    "report-1",
    "type":  "progress-by-tag-by-user",
    "users": [
        {"id": "12345678", "name": "Walter White"}
    ],
    "hierarchy_reference": "unit-chapter-exercise-difficulty",
    "tag_hierarchy_path":  [
        {
            "type": "unit",
            "name": "2-physics"
        },
        {
            "type": "chapter",
            "name": "2.2-motion"
        },
        {
            "type": "exercise",
            "name": "2.2a"
        }
    ]
}