Universal Learning Framework

The Universal Learning Framework (ULF) is the core of Starmind, which represents and learns who knows what. Using the Universal Learning API endpoints, it is possible to connect users with expertise regardless of the source.

Learn more

A more detailed description of the Universal Learning Framework can be found on the Concept page.

Universal Learning API usage

All Universal Learning Framework endpoints require the super_admin user role. The reason is that these endpoints allow you to modify the expertise of any user in the network.

User management

It is not possible to create new users on-the-fly when using the ULF endpoints. Users can be created and managed using the user API endpoints and/or user synchronization.

High-level usage

The simplest way to feed data into the ULF is by using the integrated endpoint /learning/integrated-endpoint. With this endpoint, it is possible to extract tags from text, create an entity and a single corresponding action with one API call.

One call to the integrated endpoint is roughly equivalent to calling these three endpoints in succession:

  • The tag suggestions endpoint.
  • The create entity endpoint (including the tags obtained from the tag suggestions response).
  • The create action endpoint (including the entity_id obtained from the create entity response).

The response of the integrated endpoint contains the ids of the created entity and action. These ids can be used in the low-level endpoints that are described below.

Low-level usage

Entities can be created, updated and deleted using the /learning/entities endpoints.

Actions can be created, updated and deleted using the /learning/actions endpoints.

These endpoints offer the following additional functionality compared to the integrated endpoint documented above:

  • Linking multiple actions to the same entity
  • Modifying or deleting entities/actions after they have been created

Supported text formats and descriptors

The tag suggestions endpoint and integrated-endpoint support text with the following formats:

  • Plain text, by passing "text_format": "plain". This should be used for plain text (i.e. with no markup).
  • HTML, by passing "text_format": "html". This should be used for text containing HTML elements.
  • HTML with mentioning, by passing "text_format": "html_with_mention". This should be used for text containing HTML elements as well as mentions (mainly valid for text from the Q&A app).

If no value is passed, the endpoints will take the text as "plain" by default. Each format will appropriately preprocess the text value.

Text descriptors help the user with consistency over defining factors for the text field. It may be burdensome to keep track of the different factors the user has used across different scripts, so for consistency sake, we decided to implement text descriptors which will take care of defining a factor for a given text. Currently, both endpoints mentioned above support following descriptors:

  • Default, by passing "descriptor": "default". This corresponds to a factor of 1.0.
  • Primary, by passing "descriptor": "primary". This corresponds to a factor of 1.2. This should be used for text titles.
  • Secondary, by passing "descriptor": "secondary". This corresponds to a factor of 0.6. This should be used for text descriptions.

It is important to note that both descriptor and factor cannot be defined at the same time for a single text. This will reject user's request. Only one of them can be defined at a given time, which in the end determines the factor. If both are omitted in the request, the factor we use is 1.0, the equivalent of a default descriptor.