Skip to content

Commit c670190

Browse files
committed
TW Review
1 parent e8f4e31 commit c670190

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

content/en/docs/marketplace/genai/reference-guide/genai-commons.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,27 @@ Although GenAI Commons technically defines additional capabilities typically fou
4141

4242
### Token Usage
4343

44-
GenAI Commons can help store usage data which allows admins to understand the token usage. Usage data is only persisted if the constant `StoreUsageMetrics` is set to `true` (exception: if [StoreTraces](#traceability) is set to `true`, Usages data is stored as well). In general, this is only supported for chat completions and embedding operations.
44+
GenAI Commons can help store usage data which allows admins to understand the token usage. Usage data is persisted only if the constant `StoreUsageMetrics` is set to *true* (exception: if [StoreTraces](#traceability) is set to *true*, Usages data is stored as well). In general, this is only supported for chat completions and embedding operations.
4545

4646
To clean up usage data in a deployed app, you can enable the daily scheduled event `ScE_Usage_Cleanup` in the Mendix Cloud Portal. Use the `Usage_CleanUpAfterDays` constant to control for how long token usage data should be persisted.
4747

4848
Lastly, the [Conversational UI module](/appstore/modules/genai/conversational-ui/) provides pages, snippets, and logic to display and export token usage information. For this to work, the module roles `UsageMonitoring` from both Conversational UI as well as GenAI Commons need to be assigned to the applicable project roles.
4949

5050
### Traceability {#traceability}
5151

52-
The chat completions operations of GenAI Commons store data for traceability reasons in your application's database by default. This helps to understand the usage of GenAI in your app and why the model behaved in certain ways, for example by reviewing the usage of tools. Trace data is only persisted if the constant `StoreTraces` is set to `true`.
52+
By default, the chat completions operations of GenAI Commons store data in your application's database for traceability reasons. This makes it easier understand the usage of GenAI in your app and why the model behaved in certain way, for example, by reviewing tool usage. Trace data is only persisted if the constant `StoreTraces` is set to *true*.
5353

54-
As traces may contain sensitive and personally-identifiable information, it should be decided per use case whether it is compliant to store such data.
54+
As traces may contain sensitive and personally identifiable information, you should decide per use case whether storing this data is compliant.
5555

56-
To clean up traces data in a deployed app, you can enable the daily scheduled event `ScE_Trace_Cleanup` in the Mendix Cloud Portal. Use the `Trace_CleanUpAfterDays` constant to control for how long trace data should be persisted.
56+
To clean up trace data in a deployed app, you can enable the daily scheduled event `ScE_Trace_Cleanup` in the [Mendix Cloud Portal](https://genai.home.mendix.com/). Use the `Trace_CleanUpAfterDays` constant to control the retention period of the trace data.
5757

58-
There are currently no out of the box UI snippets or building blocks available. In a future release those will be covered. For now, you can just add a data grid to a page of your choice to display them. To enable read-access to a user (typically an admin user), the module role `TraceMonitoring` needs to be granted to the applicable project roles.
58+
Currently, there are no out of the box UI snippets or building blocks available to view the traces. A future release will include them. For now, you can just add a data grid to any page to display the data. To enable read-access to a user (typically an admin user), grant the module role `TraceMonitoring` to the applicable project roles.
5959

6060
## Technical Reference {#technical-reference}
6161

6262
The technical purpose of the GenAI Commons module is to define a common domain model for generative AI use cases in Mendix applications. To help you work with the **GenAI Commons** module, the following sections list the available [entities](#domain-model), [enumerations](#enumerations), and [microflows](#microflows) to use in your application.
6363

64-
### Domain Model {#domain-model}
64+
### Domain Model {#domain-model}
6565

6666
The domain model in Mendix is a data model that describes the information in your application domain in an abstract way. For more general information, see the [Data in the Domain Model](/refguide/domain-model/) documentation. To learn about where the entities from the domain model are used and relevant during implementation, see the [Microflows](#microflows) section below.
6767

@@ -111,7 +111,7 @@ Accepted input modality of the associated deployed model.
111111

112112
This entity represents usage statistics of a call to an LLM. It refers to a complete LLM interaction; in case there are several iterations (e.g. recursive processing of function calls), everything should be aggregated into one Usage record.
113113

114-
Following the principles of GenAI Commons, it must be stored based on the response for every successful call to a system of an LLM provider. This is only applicable to text & file operations and embedding operations.
114+
Following the principles of GenAI Commons, it must be stored based on the response for every successful call to a system of an LLM provider. This is only applicable to text and file operations and embedding operations.
115115

116116
The data stored in this entity is to be used later on for token consumption monitoring.
117117

@@ -143,7 +143,7 @@ The data stored in this entity is to be used later on for traceability use cases
143143

144144
#### `Span` {#span}
145145

146-
A span is created for each interaction between Mendix and the LLM (chat completions, tool calling, ...). The generalized object is usually not used, but only it's specializations.
146+
A span is created for each interaction between Mendix and the LLM (such as chat completions, tool calling, etc.). The generalized object is typically not used instead, its specializations are used.
147147

148148
| Attribute | Description |
149149
| --- | --- |
@@ -155,13 +155,13 @@ A span is created for each interaction between Mendix and the LLM (chat completi
155155

156156
#### `ModelSpan` {#model-span}
157157

158-
A model span is created for each interaction between Mendix and the LLM where content is generated (sent as the assistant's message). Typically, this is requests for text generation. In addition to the [Span's](#span) attributes, it also contains the following:
158+
A model span is created for each interaction between Mendix and the LLM where content is generated (sent as the assistant's message). Typically, this is request for text generation. In addition to the [Span's](#span) attributes, it also contains the following:
159159

160160
| Attribute | Description |
161161
| --- | --- |
162162
| `InputTokens` | Number of tokens in the request. |
163163
| `OutputTokens` | Number of tokens in the generated response. |
164-
| `_DeploymentIdentifier` | Internal object used to identify the DeployedModel that was used. |
164+
| `_DeploymentIdentifier` | Internal object used to identify the `DeployedModel` that was used. |
165165

166166
#### `ToolSpan` {#tool-span}
167167

@@ -170,7 +170,7 @@ A tool span is created for each tool call requested by the LLM. The tool call is
170170
| Attribute | Description |
171171
| --- | --- |
172172
| `ToolName` | The name of the tool that was called. |
173-
| `_ToolCallId` | The id of the tool call used by the model to map an assistant message containing a tool call with the output of the tool call (tool message). |
173+
| `_ToolCallId` | The ID of the tool call used by the model to map an assistant message containing a tool call with the output of the tool call (tool message). |
174174
| `Input` | The input of the tool call as passed by the LLM. |
175175
| `IsError` | Indicates if the tool call failed. If so, the span's output will contain the error message that was also logged and sent to the LLM as tool result. |
176176

@@ -197,7 +197,7 @@ The `Request` is an input object for the chat completions operations defined in
197197
| `Temperature` | `Temperature` controls the randomness of the model response. Low values generate a more predictable output, while higher values allow creativity and diversity. It is recommended to steer either the temperature or `TopP`, but not both. |
198198
| `TopP` | `TopP` is an alternative to temperature for controlling the randomness of the model response. `TopP` defines a probability threshold so that only words with probabilities greater than or equal to the threshold will be included in the response. It is recommended to steer either the temperature or `TopP`, but not both. |
199199
| `ToolChoice` | Controls which (if any) tool is called by the model. For more information, see the [ENUM_ToolChoice](#enum-toolchoice) section containing a description of the possible values. |
200-
| `_AgentVersionId` | The AgentVersionId is set if the execution of the request was called from an Agent. |
200+
| `_AgentVersionId` | The `AgentVersionId` is set if the execution of the request was called from an Agent. |
201201

202202
#### `Message` {#message}
203203

0 commit comments

Comments
 (0)