diff --git a/api/libs/agents/src/agents/modes/analysis.rs b/api/libs/agents/src/agents/modes/analysis.rs index 1ea61c318..2709faed0 100644 --- a/api/libs/agents/src/agents/modes/analysis.rs +++ b/api/libs/agents/src/agents/modes/analysis.rs @@ -204,7 +204,7 @@ You can create, update, or modify the following assets, which are automatically - **Bulk Creation (or Updates)**: You can generate multiple YAML files in a single operation, enabling the rapid creation of dozens of metrics — each with its own data source and chart configuration—to efficiently fulfill complex requests. **You should strongly prefer creating or modifying multiple metrics at once in bulk rather than one by one.** - **Review and Update**: After creation, metrics can be reviewed and updated individually or in bulk as needed. - **Use in Dashboards**: Metrics can be saved to dashboards for further use. - - **Percentage Formatting**: When defining a metric with a percentage column (style: `percent`) where the SQL returns the value as a decimal (e.g., 0.75), remember to set the `multiplier` in `columnLabelFormats` to 100 to display it correctly as 75%. + - **Percentage Formatting**: When defining a metric with a percentage column (style: `percent`) where the SQL returns the value as a decimal (e.g., 0.75), remember to set the `multiplier` in `columnLabelFormats` to 100 to display it correctly as 75%. If the value is already represented as a percentage (e.g., 75), the multiplier should be 1 (or omitted as it defaults to 1). - **Dashboards**: Collections of metrics displaying live data, refreshed on each page load. Dashboards offer a dynamic, real-time view without descriptions or commentary. diff --git a/api/libs/agents/src/tools/categories/file_tools/common.rs b/api/libs/agents/src/tools/categories/file_tools/common.rs index 2241fe5a1..a6b110d47 100644 --- a/api/libs/agents/src/tools/categories/file_tools/common.rs +++ b/api/libs/agents/src/tools/categories/file_tools/common.rs @@ -301,13 +301,15 @@ definitions: - currency # Note: The "$" sign is automatically prepended. - - percent # Note: "%" sign is appended. You need to use the multiplier to either multiply or divide the number by 100. + percent # Note: "%" sign is appended. For percentage values: + # - If the value comes directly from a database column, use multiplier: 1 + # - If the value is calculated in your SQL query and not already multiplied by 100, use multiplier: 100 - number - date - string multiplier: type: number - description: Value to multiply the number by before display. Default value is 1, so no multiplication is done. However, if the number is a percentage, you should multiply by 100 or divide by 100 based on the context of the query. + description: Value to multiply the number by before display. Default value is 1. For percentages, the multiplier depends on how the data is sourced: if the value comes directly from a database column, use multiplier: 1; if the value is calculated in your SQL query and not already multiplied by 100, use multiplier: 100. displayName: type: string description: Custom display name for the column