Selecting Parameters for Intent Resolvers

Objects declared as intent resolvers in K2BTools can accept multiple parameters, enabling users to interact with them using natural language queries. For instance, if a user asks, "Show me all courses taught by Richard," the language model will interpret "Richard" as a parameter value. In GeneXus terms, this parameter could be an object parameter, a filter variable in a WorkWith, or any element that influences the WebPanel.

Consider another query: "Show me the first 50 courses taught by Richard, ordered by course name." Here, additional parameters such as sorting orders and rows per page are involved.

Queries can also set default values for attributes. For example, consider the query: "Enroll Emma Smith in Literature and Analysis." In this case, the parameter values related to "Emma Smith" and "Literature and Analysis" should be used as the default values of the attributes in the Enrollment transaction.

Parameter Configuration in K2BTools

In K2BTools, developers can specify which elements are included as parameters for the object:

  • Filters: Specify which filters to include by setting the "Include As Intent Resolver Parameter" property in the filter node. To include it the "SaveGridState" of the filter must be set to true.
    FiltersIncludeAsIntentResolverParameter
    Include As Intent Resolver Parameter in filters

  • Orders: Determine if orders should be included by configuring the "Include Orders as Intent Resolver Parameter" property in the general settings.
  • Rows Per Page: Decide if rows per page should be included by setting the "Include Rows per Page as Intent Resolver" property in the general settings.
    FilterIncludeOrdersRowsPerPageAsIntentResolverParameters
    General settings properties to include OrderBy and RowsPerPage as IntentResolver parameter

  • Attribute´s Contextual default: if attributes in a transaction have a Contextual default property set to true, they will be included as a parameter of the EntityManagerInsert intent resolver. For example, in the Enrollment transaction, if both StudentId and CourseId have the contextual default property set to true, they will be included as parameters of the EntityManagerEnrollmentInsert intention.
    EnrollmentTransactionIn
    Include As Intent Resolver Parameter in filters

Availability