This metadata is loaded from the knowledge base with information about the intentions.
This metadata is configured based on the Work withs and entity managers and the WebPanelDesigners panels set up as intent resolvers, and the parameters selected in Selecting Parameters for Intent Resolvers. Once the developer selects the web panels to act as intent resolvers, they need to run the Generate Intent-Based Navigation Metadata and execute the generated procedure as detailed in Intent Based Navigation development cycle. This process loads the intent-based navigation metadata into a database structure, which can be configured and accessed using a backend.
We will examine the structure of the intent-based navigation metadata and what can be configured in the backend.
This allows the developer to view all the loaded intentions. Let's explore the attributes:
 |
| WWIntentResolver |
- Name: The name of the intent resolver, typically the qualified object name.
- Title: The title of the intention.
- In WorkWiths, it is the title of the WorkWith.
- In EntityManager, it is the description of the transaction related to the entity manager.
- In WebPanelDesigner, it is the title of the WebPanel, or if not set, the description of the GeneXus object.
- Description: The description of the intent, used by the LLM to determine the best panel to answer the "user question."
- In WorkWith, it is the value of the WorkWithIntentResolverDescription property, with additional visible columns, actions, and filters added to the description.
- In intentions generated by the Entity Manager, the property EntityManager<Operation>ResolverDescription is used. Note that an EntityManager generates four intent resolvers for each operation (Insert, Update, Delete, Display).
- In intentions generated by WebPanelDesigner, the description is taken from the Intent Resolver Description property.
- Program: A GeneXus program responsible for processing the intent parameters and calling the object that implements the intention based on the parameters. There is a generic procedure for all WorkWiths, another for all EntityManagers, and another for panels generated by WebPanelDesigner. For more information, read Customizing an intent resolver program
- ObjectName: The name of the object that resolves the intent. This object will be called by the Program.
- Security: Security information about this object, specifying which permissions must be checked before calling it. It includes properties like EntityName, Transaction Name, StandardActivityType, and ActivityName. For more information, read K2BTools Security Model.
- Parameters: A list of parameters, their data types, and where to obtain their values. Each parameter includes:
 |
| Intent Resolver Parameters |
- Name: For filters, the name of the filter, identifying the parameter.
- Description: The description of the parameter, used by the LLM model to infer the relationship between parameters and the user question.
- ParameterType: The type of parameter, used by the intent resolver program to match parameters when calling the intention. Possible types include:
- Object Parameter: Direct parameters of the object as stated in the parm rule.
- Filter: If the parameter is a filter.
- AttributeDefault: If it's a default of an attribute in a transaction or other panel that supports it.
- OrderedBy: If there is an order by parameter.
- RowsPerPage: If there is a Rows per page parameter.
- DataType: The data type of the parameter, such as numeric, character, or others.
- Is Collection: Indicates if the parameter accepts one value or multiple values (as in the case of collection filters).
- RealmName: The name of the realm, representing possible values the parameter can have.
- Constants:
- Fixed values used by the intent but not related to the user query. For example, in the Entity Manager Intent intention, the TrnMode is a parameter with the fixed value K2BTrnMode.Update. In WebPanels generated by WebPanelDesigner, the name of the grid is another constant.
For the definitions of the intentions used by the LLM, the "Reindex Resolvers" action must be executed. This is necessary when there are changes to the name, title, or description of any intention, or if a new intention is added or deleted. There is no need to run this action if changes are made to other fields, such as parameters or security settings.
The reindexing process utilizes a search profile, as detailed in the Intent based navigation - General Runtime Configuration.
In the context of Basic Concepts - Parameter Realm, each intent resolver parameter is linked to a specific realm. The realm metadata can be configured using the K2BTools.IntentBasedNavigation.WWParameterRealm interface. A parameter realm can derive its values from several sources:
- Related Table: In this scenario, a Description Mapper program must be defined. A Description Mapper is a program that is in charge of map descriptons with keys.
- Fixed Domain of Values: The realm must have known values. Examples include realms with predefined values.
- Enumerated Domains: K2BTools populates the metadata with the values and descriptions of the enumerated domains
- OrderedBy: K2BTools populates the metadata with possible order values.
- RowsPerPage: K2BTools populates the metadata with the rows per page domains, inferred from the page options property
Let's explore the attributes of a parameter realm:
 |
| WWParameterRealm |
- Name: This is the identifier of the realm. Typically, the naming conventions are:
- att:<attname> for realms associated with a foreign key.
- dom:<domname> for realms associated with an enumerated domain.
- OrderedBy:<ObjectName><GridName> for realms associated with an order by.
- PageOptions:PageOptions_(<PageOption>_)* for realms associated with possible rows per page values
- Instructions (optional): For some enumerated domains, instructions may be provided to give further context about the domain descriptions.
- Description Mapper: When the realm is associated with a table, this is the name of a K2BTools-generated program responsible for mapping the user input description with the primary key. For more information, refer to Description Mappers in Intent-Based Navigation.
- Feedback Message: When the LLM attempts to infer parameters, feedback is provided to the user as the value of each parameter. This feedback can be configured in the following ways:
- Mapped Description: . The developer will see the real description as the parameter value, which is obtained from the database. Please take account the security considerations regarding this value explained in Protecting description information
- Extracted Description: The developer will see the user input extracted from the LLM as the parameter value.
- Mapped Value: The actual database value of the parameter is shown. Use this option with caution as it exposes key values of the database.
- Examples:Consider a scenario with an intention called EnrollmentInsert. This intention has two possible parameters: Student (att:StudentId) and Course (att:CourseId). If a user enters the query "Enroll Emma Smith in Literature...", and the real name of the course is "Literature and Analysis", the feedback message regarding the output parameters will vary based on the configuration of the att:CourseId parameter:
- Extracted description:
- CourseId: Literature (the user input)
 |
| Extracted description feedback message |
- Mapped Description:
- CourseId: Literature and Analysis (the real description)
 |
| Mapped description of the feedback message |
- Mapped Value: Course Id= 4 (the real value of the parameter)
 |
| Mapped value of the feedback message |
- Known values:
- When a parameter value is related to an enumerated domain or fixed values, these are the values and descriptions that the parameter can take.
|