diff --git a/docs/advanced-ai/evaluations/light-evaluations.md b/docs/advanced-ai/evaluations/light-evaluations.md index 07210e11c..a9aac7aba 100644 --- a/docs/advanced-ai/evaluations/light-evaluations.md +++ b/docs/advanced-ai/evaluations/light-evaluations.md @@ -20,8 +20,8 @@ Light evaluation allows you to run the examples in a test dataset through your w ## How it works -/// note | Requires Google Sheets -Evaluations use Google Sheets to store the test dataset. To use evaluations, you must configure a [Google Sheets credential](/integrations/builtin/credentials/google/index.md). +/// note | Credentials for Google Sheets +Evaluations use data tables or Google Sheets to store the test dataset. To use Google Sheets as a dataset source, configure a [Google Sheets credential](/integrations/builtin/credentials/google/index.md). /// Light evaluations take place in the 'Editor' tab of your workflow, although you’ll find instructions on how to set it up in the 'Evaluations' tab. @@ -39,7 +39,7 @@ The following explanation will use a sample workflow that assigns a category and ### 1. Create a dataset -Create a Google Sheet with a handful of examples for your workflow. Your sheet should contain column(s) for: +Create a data table or Google Sheet with a handful of examples for your workflow. Your dataset should contain columns for: - The workflow input - (Optional) The expected or correct workflow output @@ -95,6 +95,6 @@ Click on the **Execute workflow** button to the left of the evaluation trigger. ![Execute workflow button](/_images/advanced-ai/evaluations/execute-workflow-button.png) -Review the outputs of each execution in the Google Sheet, and examine the execution details using the workflow's 'executions' tab if you need to. +Review the outputs of each execution in the data table or Google Sheet, and examine the execution details using the workflow's 'executions' tab if you need to. Once your dataset grows past a handful of examples, consider [metric-based evaluation](/advanced-ai/evaluations/metric-based-evaluations.md) to get a numerical view of performance. See also [tips and common issues](/advanced-ai/evaluations/tips-and-common-issues.md). diff --git a/docs/advanced-ai/evaluations/metric-based-evaluations.md b/docs/advanced-ai/evaluations/metric-based-evaluations.md index 1a7c3ccc0..293f10bb6 100644 --- a/docs/advanced-ai/evaluations/metric-based-evaluations.md +++ b/docs/advanced-ai/evaluations/metric-based-evaluations.md @@ -25,8 +25,8 @@ Metrics can be deterministic functions (such as the distance between two strings ## How it works -/// note | Requires Google Sheets -Evaluations use Google Sheets to store the test dataset. To use evaluations, you must configure a [Google Sheets credential](/integrations/builtin/credentials/google/index.md). +/// note | Credentials for Google Sheets +Evaluations use data tables or Google Sheets to store the test dataset. To use Google Sheets as a dataset source, configure a [Google Sheets credential](/integrations/builtin/credentials/google/index.md). /// 1. Set up [light evaluation](/advanced-ai/evaluations/light-evaluations.md) diff --git a/docs/data/data-tables.md b/docs/data/data-tables.md index 7ffdd2c76..340cdb18d 100644 --- a/docs/data/data-tables.md +++ b/docs/data/data-tables.md @@ -15,11 +15,11 @@ status: beta Data tables integrate data storage within your n8n environment. Using data tables, you can save, manage, and interact with data directly inside your workflows without relying on external database systems for scenarios such as: -- Storing data generated from workflow executions -- Persisting data aross workflows in the same project +- Persisting data across workflows in the same project - Storing markers to prevent duplicate runs or control workflow triggers - Reusing prompts or messages across workflows - Storing evaluation data for AI workflows +- Storing data generated from workflow executions - Combining data from different sources to enrich your datasets - Creating lookup tables as quick reference points within workflows diff --git a/docs/integrations/builtin/core-nodes/n8n-nodes-base.datatable/index.md b/docs/integrations/builtin/core-nodes/n8n-nodes-base.datatable/index.md index f6482e56f..31937caaa 100644 --- a/docs/integrations/builtin/core-nodes/n8n-nodes-base.datatable/index.md +++ b/docs/integrations/builtin/core-nodes/n8n-nodes-base.datatable/index.md @@ -15,13 +15,14 @@ status: beta # Data table -Use the Data Table node to permanently save data across workflow executions in a table format. It provides functionality to perform various data operations on stored data. +Use the Data Table node to permanently save data across workflow executions in a table format. It provides functionality to perform various data operations on stored data. See [Data tables](/data/data-tables.md). + ## Node parameters ### Resource -Select the resource on which you want to operate +Select the resource on which you want to operate. - Rows @@ -29,13 +30,18 @@ Select the resource on which you want to operate Select the operation you want to run on the resource: -| Operation | Description | Options | -|---|---|---| -| **Get** | Get one or more rows from your table based on defined filters. | **Limit**: The number of rows you want to return, specified as a number. Default value is 50. | -| **Update** | Update one or more rows. | | -| **Insert** | Insert rows into an existing table. | **Optimize Bulk**: Optimize the speed of insertions when working with many rows. If you switch on this option, n8n won't return the data that was inserted. Default state is `off`. | -| **Upsert** | Upsert one or more rows. If the row exists, it's updated; otherwise, a new row is created. | | -| **Delete** | Delete one or more rows. | **Dry Run:** Simulate a deletion before finalizing it. If you switch on this option, n8n returns the rows that will be deleted by the operation. Default state is `off`. | +* **Delete:** Delete one or more rows. + * **Dry Run:** Simulate a deletion before finalizing it. If you switch on this option, n8n returns the rows that will be deleted by the operation. Default state is `off`. +* **Get:** Get one or more rows from your table based on defined filters. + * **Limit**: The number of rows you want to return, specified as a number. Default value is 50. + * **Return all:** Switch on to return all data. Default value is `off`. +* **If Row Exists:** Specify a set of conditions to match input items that exist in the data table. +* **If Row Does Not Exist:** Specify a set of conditions to match input items that don't exist in the data table. +* **Insert:** Insert rows into an existing table. + * **Optimize Bulk**: Optimize the speed of insertions when working with many rows. If you switch on this option, n8n won't return the data that was inserted. Default state is `off`. +* **Update:** Update one or more rows. +* **Upsert:** Upsert one or more rows. If the row exists, it's updated; otherwise, a new row is created. + ## Related resources diff --git a/docs/integrations/builtin/core-nodes/n8n-nodes-base.evaluation.md b/docs/integrations/builtin/core-nodes/n8n-nodes-base.evaluation.md index fd7563959..1293fa2fa 100644 --- a/docs/integrations/builtin/core-nodes/n8n-nodes-base.evaluation.md +++ b/docs/integrations/builtin/core-nodes/n8n-nodes-base.evaluation.md @@ -6,17 +6,23 @@ contentType: [integration, reference] # Evaluation node -The Evaluation node performs various operations related to [evaluations](/advanced-ai/evaluations/overview.md) to validate your AI workflow reliability. You can use the Evaluation node to conditionally execute logic based on whether the workflow is under evaluation, to write evaluation outcomes back to a Google Sheet dataset, or to log scoring metrics for your evaluation performance to n8n's evaluations tab. +The Evaluation node performs various operations related to [evaluations](/advanced-ai/evaluations/overview.md) to validate your AI workflow reliability. -/// note | Credentials -The Evaluation node's **Set Outputs** operation uses Google Sheets to record evaluation outcomes. To use that operation, you must configure a [Google Sheets credential](/integrations/builtin/credentials/google/index.md). +Use the Evaluation node in these scenarios: + +* To conditionally execute logic based on whether the workflow is under evaluation +* To write evaluation outcomes back to a Google Sheet datasetor +* To log scoring metrics for your evaluation performance to n8n's evaluations tab + +/// note | Credentials for Google Sheets +The Evaluation node's **Set Outputs** operation records evaluation results to data tables or Google Sheets. To use Google Sheets as a recording location, configure a [Google Sheets credential](/integrations/builtin/credentials/google/index.md). /// ## Operations The Evaluation node offers the following operations: -* [**Set Outputs**](#set-outputs): Write the results of an evaluation back to a Google Sheet dataset. +* [**Set Outputs**](#set-outputs): Write the results of an evaluation back to a data table or Google Sheet dataset. * [**Set Metrics**](#set-metrics): Record metrics scoring the evaluation performance to n8n's **Evaluations** tab. * [**Check If Evaluating**](#check-if-evaluating): Branches the workflow execution logic depending on whether the current execution is an evaluation. @@ -26,15 +32,22 @@ The parameters and options available depend on the operation you select. The **Set Outputs** operation has the following parameters: -- **Credential to connect with**: Create or select an existing [Google Sheets credentials](/integrations/builtin/credentials/google/index.md). -* **Document Containing Dataset**: Choose the spreadsheet document you want to write the evaluation results to. Usually this is the same document you select in the [Evaluation Trigger](/integrations/builtin/core-nodes/n8n-nodes-base.evaluationtrigger.md) node. - * Select **From list** to choose the spreadsheet title from the dropdown list, **By URL** to enter the url of the spreadsheet, or **By ID** to enter the `spreadsheetId`. - * You can find the `spreadsheetId` in a Google Sheets URL: `https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0`. -* **Sheet Containing Dataset**: Choose the sheet you want to write the evaluation results to. Usually this is the same sheet you select in the [Evaluation Trigger](/integrations/builtin/core-nodes/n8n-nodes-base.evaluationtrigger.md) node. - * Select **From list** to choose the sheet title from the dropdown list, **By URL** to enter the url of the sheet, **By ID** to enter the `sheetId`, or **By Name** to enter the sheet title. - * You can find the `sheetId` in a Google Sheets URL: `https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId`. +- **Source:** Select the location to which you want to output the evaluation results. Default value is **Data table**. -You define the items to write to the Google Sheet in the **Outputs** section. For each output, you set the following: + Source settings differ depending on **Source** selection. + + * When **Source** is **Data table**: + * **Data table:** Select a data table by name or ID + * When **Source** is **Google Sheets**: + * **Credential to connect with**: Create or select an existing [Google Sheets credentials](/integrations/builtin/credentials/google/index.md). + * **Document Containing Dataset**: Choose the spreadsheet document you want to write the evaluation results to. Usually this is the same document you select in the [Evaluation Trigger](/integrations/builtin/core-nodes/n8n-nodes-base.evaluationtrigger.md) node. + * Select **From list** to choose the spreadsheet title from the dropdown list, **By URL** to enter the url of the spreadsheet, or **By ID** to enter the `spreadsheetId`. + * You can find the `spreadsheetId` in a Google Sheets URL: `https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0`. + * **Sheet Containing Dataset**: Choose the sheet you want to write the evaluation results to. Usually this is the same sheet you select in the [Evaluation Trigger](/integrations/builtin/core-nodes/n8n-nodes-base.evaluationtrigger.md) node. + * Select **From list** to choose the sheet title from the dropdown list, **By URL** to enter the url of the sheet, **By ID** to enter the `sheetId`, or **By Name** to enter the sheet title. + * You can find the `sheetId` in a Google Sheets URL: `https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId`. + +You define the items to write to the data table or Google Sheet in the **Outputs** section. For each output, you set the following: * **Name**: The Google Sheet column name to write the evaluation results to. * **Value**: The value to write to the Google Sheet. @@ -50,7 +63,7 @@ For each metric you wish to record, you set the following details: ### Check If Evaluating -The **Check If Evaluating** operation does not have any parameters. This operation provides branching output connectors so that you can conditionally execute logic depending on whether the current execution is an evaluation or not. +The **Check If Evaluating** operation doesn't have any parameters. This operation provides branching output connectors so that you can conditionally execute logic depending on whether the current execution is an evaluation or not. ## Templates and examples diff --git a/docs/integrations/builtin/core-nodes/n8n-nodes-base.evaluationtrigger.md b/docs/integrations/builtin/core-nodes/n8n-nodes-base.evaluationtrigger.md index 3f500ecec..04055ec69 100644 --- a/docs/integrations/builtin/core-nodes/n8n-nodes-base.evaluationtrigger.md +++ b/docs/integrations/builtin/core-nodes/n8n-nodes-base.evaluationtrigger.md @@ -8,30 +8,36 @@ contentType: [integration, reference] Use the Evaluation Trigger node when setting up [evaluations](/advanced-ai/evaluations/overview.md) to validate your AI workflow reliability. During evaluation, the Evaluation Trigger node reads your evaluation dataset from Google Sheets, sending the items through the workflow one at a time, in sequence. -On this page, you'll find the Evaluation Trigger node parameters and +On this page, you'll find the Evaluation Trigger node parameters and options. -/// note | Requires Google Sheets -The Evaluation Trigger node uses Google Sheets to store the test dataset. To use evaluations, you must configure a [Google Sheets credential](/integrations/builtin/credentials/google/index.md). +/// note | Credentials for Google Sheets +The Evaluation Trigger node uses data tables or Google Sheets to store the test dataset. To use Google Sheets as a dataset source, configure a [Google Sheets credential](/integrations/builtin/credentials/google/index.md). /// ## Parameters -- **Credential to connect with**: Create or select an existing [Google Sheets credentials](/integrations/builtin/credentials/google/index.md). -* **Document Containing Dataset**: Choose the spreadsheet document with the sheet containing your test dataset. - - Select **From list** to choose the spreadsheet title from the dropdown list, **By URL** to enter the url of the spreadsheet, or **By ID** to enter the `spreadsheetId`. - - You can find the `spreadsheetId` in a Google Sheets URL: `https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0`. -* **Sheet Containing Dataset**: Choose the sheet containing your test dataset. - - Select **From list** to choose the sheet title from the dropdown list, **By URL** to enter the url of the sheet, **By ID** to enter the `sheetId`, or **By Name** to enter the sheet title. - - You can find the `sheetId` in a Google Sheets URL: `https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId`. -* **Limit Rows**: Whether to limit the number of rows in the sheet to process. - * **Max Rows to Process**: When **Limit Rows** is enabled, the maximum number of rows to read and process during the evaluation. +- **Source:** Select the location to which you want to output the evaluation results. Default value is **Data table**. -## Filters + Source settings differ depending on **Source** selection. -Optionally filter the evaluation dataset based on column values. - -* **Column**: Choose a sheet column you want to filter by. Select **From list** to choose the column name from the dropdown list, or **By ID** to specify an ID using an [expression](/code/expressions.md). -* **Value**: The column value you want to filter by. The evaluation will only process rows with the given value for the selected column. + * When **Source** is **Data table**: + * **Data table:** Select a data table by name or ID. + * **Limit Rows**: Whether to limit the number of rows in the data table to process. Default state is `off`. + * **Max Rows to Process**: When **Limit Rows** is enabled, the maximum number of rows to read and process during the evaluation. Default value is 10. + * **Filter Rows:** Whether to filter rows in the data table to process. Default state is `off`. + * When **Source** is **Google Sheets**: + - **Credential to connect with**: Create or select an existing [Google Sheets credentials](/integrations/builtin/credentials/google/index.md). + * **Document Containing Dataset**: Choose the spreadsheet document with the sheet containing your test dataset. + - Select **From list** to choose the spreadsheet title from the dropdown list, **By URL** to enter the url of the spreadsheet, or **By ID** to enter the `spreadsheetId`. + - You can find the `spreadsheetId` in a Google Sheets URL: `https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0`. + * **Sheet Containing Dataset**: Choose the sheet containing your test dataset. + - Select **From list** to choose the sheet title from the dropdown list, **By URL** to enter the url of the sheet, **By ID** to enter the `sheetId`, or **By Name** to enter the sheet title. + - You can find the `sheetId` in a Google Sheets URL: `https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId`. + * **Limit Rows**: Whether to limit the number of rows in the sheet to process. + * **Max Rows to Process**: When **Limit Rows** is enabled, the maximum number of rows to read and process during the evaluation. + * **Filters:** Filter the evaluation dataset based on column values. + * **Column**: Choose a sheet column you want to filter by. Select **From list** to choose the column name from the dropdown list, or **By ID** to specify an ID using an [expression](/code/expressions.md). + * **Value**: The column value you want to filter by. The evaluation will only process rows with the given value for the selected column. ## Templates and examples