Skip to content

Commit 3e7441c

Browse files
committed
Note version introduced
1 parent 6583d33 commit 3e7441c

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

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

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

4242
### Token Usage
4343

44-
GenAI Commons can help store usage data, allowing admins to understand token usage. Usage data is persisted only if the constant `StoreUsageMetrics` is set to *true* (exception: if [StoreTraces](#traceability) is set to *true*, Usage 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, allowing admins to understand token usage. Usage data is persisted only if the constant `StoreUsageMetrics` is set to *true* (exception in version 5.3.0 and above: if [StoreTraces](#traceability) is set to *true*, Usage 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-
By default, the chat completions operations of GenAI Commons store data in your application's database for traceability reasons. This makes it easier to understand the usage of GenAI in your app and why the model behaved in a certain way, for example, by reviewing tool usage. 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 to understand the usage of GenAI in your app and why the model behaved in a certain way, for example, by reviewing tool usage. In version 5.3.0 and above, trace data is only persisted if the constant `StoreTraces` is set to *true*.
5353

5454
As traces may contain sensitive and personally identifiable information, you should determine, on a case-by-case basis, whether storing this data is compliant.
5555

@@ -130,6 +130,8 @@ The data stored in this entity is to be used later on for token consumption moni
130130
A trace represents the whole LLM interaction from the first user message until the final assistant's response was returned, including tool calls.
131131
The data stored in this entity is to be used later on for traceability use cases.
132132

133+
`Trace` was introduced in version 5.3.0.
134+
133135
| Attribute | Description |
134136
| --- | --- |
135137
| `TraceId` | The trace ID is set internally to identify a trace. |
@@ -146,6 +148,8 @@ The data stored in this entity is to be used later on for traceability use cases
146148

147149
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.
148150

151+
`Span` was introduced in version 5.3.0.
152+
149153
| Attribute | Description |
150154
| --- | --- |
151155
| `SpanId` | The span ID is set internally to identify a span. |
@@ -159,6 +163,8 @@ A span is created for each interaction between Mendix and the LLM (such as chat
159163

160164
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 a request for text generation. In addition to the [Span's](#span) attributes, it also contains the following:
161165

166+
`ModelSpan` was introduced in version 5.3.0.
167+
162168
| Attribute | Description |
163169
| --- | --- |
164170
| `InputTokens` | Number of tokens in the request. |
@@ -169,6 +175,8 @@ A model span is created for each interaction between Mendix and the LLM where co
169175

170176
A tool span is created for each tool call requested by the LLM. The tool call is processed in GenAI Commons, and the result is sent back to the model. In addition to the [Span's](#span) attributes, it also contains the following:
171177

178+
`ToolSpan` was introduced in version 5.3.0.
179+
172180
| Attribute | Description |
173181
| --- | --- |
174182
| `ToolName` | The name of the tool that was called. |
@@ -177,7 +185,9 @@ A tool span is created for each tool call requested by the LLM. The tool call is
177185

178186
#### `KnowledgeBaseSpan` {#knowledge-base-span}
179187

180-
A knowledge base span is created for each knowledge base retrieval tool call requested by the LLM. The tool call is processed in GenAI Commons, and the result is sent back to the model. It does not contain any additional attributes compared to [ToolSpan](#tool-span).
188+
A knowledge base span is created for each knowledge base retrieval tool call requested by the LLM. The tool call is processed in GenAI Commons, and the result is sent back to the model. It does not contain any additional attributes compared to [ToolSpan](#tool-span).
189+
190+
`KnowledgebaseSpan` was introduced in version 5.3.0.
181191

182192
| Attribute | Description |
183193
| --- | --- |

0 commit comments

Comments
 (0)