Skip to content

Commit 6fa104c

Browse files
committed
Proofreading
1 parent c670190 commit 6fa104c

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ 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 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.
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.
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 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*.
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*.
5353

54-
As traces may contain sensitive and personally identifiable information, you should decide per use case whether storing this data is compliant.
54+
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

5656
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

@@ -109,7 +109,7 @@ Accepted input modality of the associated deployed model.
109109

110110
#### `Usage` {#Usage}
111111

112-
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.
112+
This entity represents usage statistics of a call to an LLM. It refers to a complete LLM interaction; in case there are several iterations (for example, recursive processing of function calls), everything should be aggregated into one Usage record.
113113

114114
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

@@ -132,30 +132,30 @@ The data stored in this entity is to be used later on for traceability use cases
132132

133133
| Attribute | Description |
134134
| --- | --- |
135-
| `TraceId` | The trace id is set internally to identify a trace. |
135+
| `TraceId` | The trace ID is set internally to identify a trace. |
136136
| `StartTime` | The start time of the initial model invocation. |
137137
| `EndTime` | The end time after the final model invocation is completed. |
138-
| `DurationMilliseconds` | The duration between start and end of the whole model invocation. |
138+
| `DurationMilliseconds` | The duration between the start and end of the whole model invocation. |
139139
| `Input` | The initial input of the model invocation (usually a user prompt). |
140140
| `Output` | The response of the final message sent by the model (usually an assistant message). |
141141
| `_AgentVersionId` | The id of the agent version (if applicable) as sent via the request. |
142-
| `_ConversationId` | The id of the conversation (if applicable) as sent via the request. This usually is created by the model provider. |
142+
| `_ConversationId` | The id of the conversation (if applicable) as sent via the request. This is usually created by the model provider. |
143143

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

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.
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
| --- | --- |
150-
| `SpanId` | The span id is set internally to identify a span. |
150+
| `SpanId` | The span ID is set internally to identify a span. |
151151
| `StartTime` | The start time of the model invocation. |
152152
| `EndTime` | The end time after the model invocation is completed. |
153-
| `DurationMilliseconds` | The duration between start and end of the whole model invocation. |
153+
| `DurationMilliseconds` | The duration between the start and end of the whole model invocation. |
154154
| `Output` | The output of the span. |
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 request 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 a request for text generation. In addition to the [Span's](#span) attributes, it also contains the following:
159159

160160
| Attribute | Description |
161161
| --- | --- |
@@ -165,25 +165,25 @@ A model span is created for each interaction between Mendix and the LLM where co
165165

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

168-
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:
168+
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:
169169

170170
| Attribute | Description |
171171
| --- | --- |
172172
| `ToolName` | The name of the tool that was called. |
173173
| `_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. |
175-
| `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. |
175+
| `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 a tool result. |
176176

177177
#### `KnowledgeBaseSpan` {#knowledge-base-span}
178178

179-
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)
179+
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).
180180

181181
| Attribute | Description |
182182
| --- | --- |
183183
| `ToolName` | The name of the tool that was called. |
184-
| `_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). |
184+
| `_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). |
185185
| `Input` | The input of the tool call as passed by the LLM. |
186-
| `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. |
186+
| `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 a tool result. |
187187

188188
#### `Request` {#request}
189189

0 commit comments

Comments
 (0)