From 6e30dd2e7c6226982942429262e7443b68ab2fad Mon Sep 17 00:00:00 2001 From: pwseg Date: Thu, 27 Jun 2024 17:57:50 -0500 Subject: [PATCH 01/11] Add new page --- src/connections/functions/copilot.md | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/connections/functions/copilot.md diff --git a/src/connections/functions/copilot.md b/src/connections/functions/copilot.md new file mode 100644 index 0000000000..20455bbc03 --- /dev/null +++ b/src/connections/functions/copilot.md @@ -0,0 +1,44 @@ +--- +title: Functions Copilot +--- + +Powered by OpenAI, Functions Copilot helps you generate JavaScript code for Functions using natural language prompts. + +Functions Copilot improves efficiency and productivity by streamlining the process of creating and managing custom functions, freeing up time and engineering resources. + +## Using Functions Copilot + +Functions Copilot helps you: + +- Generate JavaScript code for custom integrations and data transformations. +- Analyze existing code and provide optimization suggestions. +- Secure sensitive data with minimal effort. +- Simplify code testing and maintenance. + +## Example prompts + +This table lists examples of prompts you can use with Functions Copilot: + +| Function Type | Example Prompts | +| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| **Source Functions** | "Transform incoming data into a track event."
"Enrich user data with additional demographic details using an external API." | +| **Destination Functions** | "Create a function that enriches an identify event using the Profile API."
"Remove PII data and hash email addresses in an Identify event." | +| **Destination Insert Functions** | "Enrich an Identify event using an external API."
"Tokenize PII data before sending it downstream." | +| | | + + +## Best practices + +Follow this guidance when you use Functions Copilot: + +- Avoid using customer personally identifiable information (PII) or sensitive data. +- Write specific prompts. Specificity leads to more accurate CustomerAI function generation. Use the names of existing events, related attributes, and properties. +- Iterate on your prompts. If you don't get the result you're looking for, try rewriting the prompt. + +## Limitations + +Keep the following limitations in mind as you work with Functions Copilot: + +- **Context limitations**: Functions Copilot generates code based on Segment-specific terminology and the prompts you write. As a result, the generated output may not always be accurate. If the function doesn't initially meet your needs, try to refine or rewrite your prompt. +- **Language support**: Functions Copilot only supports English prompts. Using other languages may impact the accurancy of the generated output. +- **Regional support**: Functions Copilot is only available for US region workspaces. From e596a271b2044f56066a303c2c7047feb88fa172 Mon Sep 17 00:00:00 2001 From: pwseg Date: Thu, 27 Jun 2024 19:21:54 -0500 Subject: [PATCH 02/11] Add nutrition facts label --- .../functions-copilot-nutrition-facts.html | 151 ++++++++++++++++++ src/connections/functions/copilot.md | 25 ++- .../functions-copilot-nutrition-facts.md | 7 + 3 files changed, 176 insertions(+), 7 deletions(-) create mode 100644 src/_includes/content/functions-copilot-nutrition-facts.html create mode 100644 src/connections/functions/functions-copilot-nutrition-facts.md diff --git a/src/_includes/content/functions-copilot-nutrition-facts.html b/src/_includes/content/functions-copilot-nutrition-facts.html new file mode 100644 index 0000000000..e94bcebf54 --- /dev/null +++ b/src/_includes/content/functions-copilot-nutrition-facts.html @@ -0,0 +1,151 @@ + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

AI Nutrition Facts +
+
+ Customer AI Functions Copilot

+
+

Description +
+
+ Functions Copilot is an AI-powered coding assistant, designed to streamline the development of custom integrations, and enrich and transform Segment Functions.

+

Privacy Ladder Level + 1

+

+ Feature is Optional + Yes

+

Model Type + Generative

+

Base Model + OpenAI - GPT-4

+

Trust Ingredients

+
+

Base Model Trained with Customer Data + No +
+
+

+

Customer Data Shared with Model Vendor + No +
+
+

+

Training Data Anonymized   + N/A

+

Data Deletion + Yes

+

Human in the Loop + Yes

+

Data Retention + N/A

+
Compliance    
+ Logging & Auditing + N/A
+ Guardrails + N/A +

Input/Output Consistency + Yes

+

Other Resources +
+
+ Learn more at: https://twilio.com/en-us/customer-ai

+
\ No newline at end of file diff --git a/src/connections/functions/copilot.md b/src/connections/functions/copilot.md index 20455bbc03..f7da0f6144 100644 --- a/src/connections/functions/copilot.md +++ b/src/connections/functions/copilot.md @@ -2,13 +2,13 @@ title: Functions Copilot --- -Powered by OpenAI, Functions Copilot helps you generate JavaScript code for Functions using natural language prompts. +Functions Copilot helps you generate JavaScript code for Functions using natural language prompts. -Functions Copilot improves efficiency and productivity by streamlining the process of creating and managing custom functions, freeing up time and engineering resources. +## Functions Copilot Benefits -## Using Functions Copilot +Powered by OpenAI, Functions Copilot improves efficiency and productivity by streamlining the process of creating and managing custom functions, freeing up time and engineering resources. -Functions Copilot helps you: +Functions Copilot can help you: - Generate JavaScript code for custom integrations and data transformations. - Analyze existing code and provide optimization suggestions. @@ -26,8 +26,7 @@ This table lists examples of prompts you can use with Functions Copilot: | **Destination Insert Functions** | "Enrich an Identify event using an external API."
"Tokenize PII data before sending it downstream." | | | | - -## Best practices +## Best practices and limitations Follow this guidance when you use Functions Copilot: @@ -35,10 +34,22 @@ Follow this guidance when you use Functions Copilot: - Write specific prompts. Specificity leads to more accurate CustomerAI function generation. Use the names of existing events, related attributes, and properties. - Iterate on your prompts. If you don't get the result you're looking for, try rewriting the prompt. -## Limitations +### Limitations Keep the following limitations in mind as you work with Functions Copilot: - **Context limitations**: Functions Copilot generates code based on Segment-specific terminology and the prompts you write. As a result, the generated output may not always be accurate. If the function doesn't initially meet your needs, try to refine or rewrite your prompt. - **Language support**: Functions Copilot only supports English prompts. Using other languages may impact the accurancy of the generated output. - **Regional support**: Functions Copilot is only available for US region workspaces. + +## Segment's generative AI service + + + +For copilot to generate a function, Segment sends your query to OpenAI, Segment’s 3rd party AI service. All queries sent to OpenAI from Segment are anonymized, meaning that OpenAI won’t be able to identify from whom the query was sent unless you include uniquely identifiable information in the input. + +GPT is OpenAI’s state-of-the-art natural language generation tool powered by artificial intelligence. It can perform a variety of natural language tasks like text generation, completion, and classification. CustomerAI uses the service to help generate functions, audiences, and inspire segmentation. + +According to OpenAI’s policy, OpenAI will not use data sent from Segment to train or improve their models, and they will delete it after 30 days. Any content generated using GPT belongs to you. Segment will not claim copyright ownership of such content and makes no warranty regarding any AI generated content. + +For more information, see the [Functions Copilot Nutrition Facts Label](/docs/connections/functions/functions-copilot-nutrition-facts/). \ No newline at end of file diff --git a/src/connections/functions/functions-copilot-nutrition-facts.md b/src/connections/functions/functions-copilot-nutrition-facts.md new file mode 100644 index 0000000000..1201439bf8 --- /dev/null +++ b/src/connections/functions/functions-copilot-nutrition-facts.md @@ -0,0 +1,7 @@ +--- +title: Functions Copilot Nutrition Facts Label +--- + +Twilio’s [AI Nutrition Facts](https://nutrition-facts.ai/){:target="_blank"} provide an overview of the AI feature you’re using, so you can better understand how the AI is working with your data. Function Copilot's AI qualities are outlined in the following Nutrition Facts label. For more information, including the glossary regarding the AI Nutrition Facts label, refer to the [AI Nutrition Facts](https://nutrition-facts.ai/){:target="_blank"} page. + +{% include content/functions-copilot-nutrition-facts.html %} From 3d296a5b5f294bdceec8fcb3fc959bfff6fc6730 Mon Sep 17 00:00:00 2001 From: pwseg Date: Thu, 27 Jun 2024 19:23:28 -0500 Subject: [PATCH 03/11] Add public beta callout --- src/connections/functions/copilot.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/connections/functions/copilot.md b/src/connections/functions/copilot.md index f7da0f6144..77d9fbb8a0 100644 --- a/src/connections/functions/copilot.md +++ b/src/connections/functions/copilot.md @@ -4,6 +4,9 @@ title: Functions Copilot Functions Copilot helps you generate JavaScript code for Functions using natural language prompts. +> info "Functions Copilot Public Beta" +> Linked Audiences is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available. + ## Functions Copilot Benefits Powered by OpenAI, Functions Copilot improves efficiency and productivity by streamlining the process of creating and managing custom functions, freeing up time and engineering resources. From af7c27f495f29eac332f498be00fae691b60fd53 Mon Sep 17 00:00:00 2001 From: pwseg Date: Thu, 27 Jun 2024 19:28:40 -0500 Subject: [PATCH 04/11] include section on functions overview page --- src/connections/functions/copilot.md | 11 +++++------ src/connections/functions/index.md | 8 +++++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/connections/functions/copilot.md b/src/connections/functions/copilot.md index 77d9fbb8a0..ebef22bb36 100644 --- a/src/connections/functions/copilot.md +++ b/src/connections/functions/copilot.md @@ -5,9 +5,9 @@ title: Functions Copilot Functions Copilot helps you generate JavaScript code for Functions using natural language prompts. > info "Functions Copilot Public Beta" -> Linked Audiences is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available. +> Functions Copilot is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available. -## Functions Copilot Benefits +## Functions Copilot benefits Powered by OpenAI, Functions Copilot improves efficiency and productivity by streamlining the process of creating and managing custom functions, freeing up time and engineering resources. @@ -20,7 +20,7 @@ Functions Copilot can help you: ## Example prompts -This table lists examples of prompts you can use with Functions Copilot: +This table lists examples prompts you can use with Functions Copilot: | Function Type | Example Prompts | | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | @@ -33,7 +33,7 @@ This table lists examples of prompts you can use with Functions Copilot: Follow this guidance when you use Functions Copilot: -- Avoid using customer personally identifiable information (PII) or sensitive data. +- Avoid using personally identifiable information (PII) or sensitive data. - Write specific prompts. Specificity leads to more accurate CustomerAI function generation. Use the names of existing events, related attributes, and properties. - Iterate on your prompts. If you don't get the result you're looking for, try rewriting the prompt. @@ -48,8 +48,7 @@ Keep the following limitations in mind as you work with Functions Copilot: ## Segment's generative AI service - -For copilot to generate a function, Segment sends your query to OpenAI, Segment’s 3rd party AI service. All queries sent to OpenAI from Segment are anonymized, meaning that OpenAI won’t be able to identify from whom the query was sent unless you include uniquely identifiable information in the input. +For Copilot to generate a function, Segment sends your query to OpenAI, Segment’s 3rd party AI service. All queries sent to OpenAI from Segment are anonymized, meaning that OpenAI won’t be able to identify from whom the query was sent unless you include uniquely identifiable information in the input. GPT is OpenAI’s state-of-the-art natural language generation tool powered by artificial intelligence. It can perform a variety of natural language tasks like text generation, completion, and classification. CustomerAI uses the service to help generate functions, audiences, and inspire segmentation. diff --git a/src/connections/functions/index.md b/src/connections/functions/index.md index 21505848a4..e8af169cd8 100644 --- a/src/connections/functions/index.md +++ b/src/connections/functions/index.md @@ -40,4 +40,10 @@ Use cases: - Transform outgoing data with advanced filtration and computation - Ensure data compliance by performing tokenisation, encryption, or decryption before sending data downstream -To learn more, visit [destination insert functions](/docs/connections/functions/insert-functions). \ No newline at end of file +To learn more, visit [destination insert functions](/docs/connections/functions/insert-functions). + +#### Functions Copilot + +With Functions Copilot, you can instrument custom integrations, enrich and transform data, and even secure sensitive data nearly instantaneously without writing a line of code. + +To learn more, visit the [Functions Copilot documentation](//docs/connections/functions/functions-copilot). \ No newline at end of file From ebcfcd2e7bbcae58ca50f98fd8b844a0fb1eb8f6 Mon Sep 17 00:00:00 2001 From: pwseg Date: Thu, 27 Jun 2024 19:29:11 -0500 Subject: [PATCH 05/11] Fix nutrition label --- src/_includes/content/functions-copilot-nutrition-facts.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_includes/content/functions-copilot-nutrition-facts.html b/src/_includes/content/functions-copilot-nutrition-facts.html index e94bcebf54..f4a109fb4d 100644 --- a/src/_includes/content/functions-copilot-nutrition-facts.html +++ b/src/_includes/content/functions-copilot-nutrition-facts.html @@ -64,7 +64,7 @@

Description

- Functions Copilot is an AI-powered coding assistant, designed to streamline the development of custom integrations, and enrich and transform Segment Functions.

+ Functions Copilot is an AI-powered coding assistant designed to streamline the development of custom integrations, and enrich and transform Segment Functions.

From e378806274b6e6cbd994259faf7d9ab239d9ae05 Mon Sep 17 00:00:00 2001 From: pwseg Date: Thu, 27 Jun 2024 19:32:38 -0500 Subject: [PATCH 06/11] Update sidenav [netlify-build] --- src/_data/sidenav/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/_data/sidenav/main.yml b/src/_data/sidenav/main.yml index 13bb77e364..e005b99eae 100644 --- a/src/_data/sidenav/main.yml +++ b/src/_data/sidenav/main.yml @@ -210,6 +210,10 @@ sections: title: Destination Functions - path: /connections/functions/insert-functions title: Destination Insert Functions + - path: /connections/functions/copilot + title: Functions Copilot + - path: /connections/functions/functions-copilot-nutrition-facts + title: Functions Copilot Nutrition Facts Label - path: /connections/functions/environment title: Functions Environment - path: /connections/functions/usage From 10ea9210e942717ccb43fc3faba8a71926890b0f Mon Sep 17 00:00:00 2001 From: pwseg Date: Thu, 27 Jun 2024 19:37:27 -0500 Subject: [PATCH 07/11] fix some stuff I didn't like [netlify-build] --- src/connections/functions/copilot.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/connections/functions/copilot.md b/src/connections/functions/copilot.md index ebef22bb36..6d92e411c4 100644 --- a/src/connections/functions/copilot.md +++ b/src/connections/functions/copilot.md @@ -2,14 +2,14 @@ title: Functions Copilot --- -Functions Copilot helps you generate JavaScript code for Functions using natural language prompts. +Functions Copilot helps you generate JavaScript code for functions using natural language prompts. > info "Functions Copilot Public Beta" > Functions Copilot is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available. ## Functions Copilot benefits -Powered by OpenAI, Functions Copilot improves efficiency and productivity by streamlining the process of creating and managing custom functions, freeing up time and engineering resources. +Powered by OpenAI, Functions Copilot improves efficiency and productivity by streamlining the process of creating and managing custom functions. Functions Copilot can help you: @@ -20,12 +20,12 @@ Functions Copilot can help you: ## Example prompts -This table lists examples prompts you can use with Functions Copilot: +This table lists example prompts you can use with Functions Copilot: | Function Type | Example Prompts | | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | **Source Functions** | "Transform incoming data into a track event."
"Enrich user data with additional demographic details using an external API." | -| **Destination Functions** | "Create a function that enriches an identify event using the Profile API."
"Remove PII data and hash email addresses in an Identify event." | +| **Destination Functions** | "Create a function that enriches an Identify event using the Profile API."
"Remove PII data and hash email addresses in an Identify event." | | **Destination Insert Functions** | "Enrich an Identify event using an external API."
"Tokenize PII data before sending it downstream." | | | | @@ -41,9 +41,9 @@ Follow this guidance when you use Functions Copilot: Keep the following limitations in mind as you work with Functions Copilot: -- **Context limitations**: Functions Copilot generates code based on Segment-specific terminology and the prompts you write. As a result, the generated output may not always be accurate. If the function doesn't initially meet your needs, try to refine or rewrite your prompt. +- **Context limitations**: Functions Copilot generates code based on Segment-specific terminology and the prompts you write. As a result, the generated output may not always be accurate. If the function doesn't initially meet your needs, try to refine or rewrite your prompt. - **Language support**: Functions Copilot only supports English prompts. Using other languages may impact the accurancy of the generated output. -- **Regional support**: Functions Copilot is only available for US region workspaces. +- **Regional support**: Functions Copilot is only available for US region Segment workspaces. ## Segment's generative AI service From e9da150627fdde3a3468126be464ed2e61c32bf5 Mon Sep 17 00:00:00 2001 From: pwseg Date: Thu, 27 Jun 2024 19:39:00 -0500 Subject: [PATCH 08/11] More fixes [netlify-build] --- src/connections/functions/copilot.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/connections/functions/copilot.md b/src/connections/functions/copilot.md index 6d92e411c4..93b306e174 100644 --- a/src/connections/functions/copilot.md +++ b/src/connections/functions/copilot.md @@ -50,8 +50,8 @@ Keep the following limitations in mind as you work with Functions Copilot: For Copilot to generate a function, Segment sends your query to OpenAI, Segment’s 3rd party AI service. All queries sent to OpenAI from Segment are anonymized, meaning that OpenAI won’t be able to identify from whom the query was sent unless you include uniquely identifiable information in the input. -GPT is OpenAI’s state-of-the-art natural language generation tool powered by artificial intelligence. It can perform a variety of natural language tasks like text generation, completion, and classification. CustomerAI uses the service to help generate functions, audiences, and inspire segmentation. +GPT is OpenAI’s state-of-the-art natural language generation tool powered by artificial intelligence. It can perform a variety of natural language tasks like text generation, completion, and classification. CustomerAI uses the service to inspire segmentation and build functions and audiences. -According to OpenAI’s policy, OpenAI will not use data sent from Segment to train or improve their models, and they will delete it after 30 days. Any content generated using GPT belongs to you. Segment will not claim copyright ownership of such content and makes no warranty regarding any AI generated content. +According to OpenAI’s policy, OpenAI will not use data sent from Segment to train or improve their models, and they will delete the data after 30 days. Any content generated using GPT belongs to you. Segment will not claim copyright ownership of such content and makes no warranty regarding any AI generated content. For more information, see the [Functions Copilot Nutrition Facts Label](/docs/connections/functions/functions-copilot-nutrition-facts/). \ No newline at end of file From d7eed066662d963ff9fc780085745566f4d257e0 Mon Sep 17 00:00:00 2001 From: pwseg Date: Thu, 27 Jun 2024 19:40:28 -0500 Subject: [PATCH 09/11] build pretty please [netlify-build] --- src/connections/functions/copilot.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/functions/copilot.md b/src/connections/functions/copilot.md index 93b306e174..49dc2dc1a1 100644 --- a/src/connections/functions/copilot.md +++ b/src/connections/functions/copilot.md @@ -43,7 +43,7 @@ Keep the following limitations in mind as you work with Functions Copilot: - **Context limitations**: Functions Copilot generates code based on Segment-specific terminology and the prompts you write. As a result, the generated output may not always be accurate. If the function doesn't initially meet your needs, try to refine or rewrite your prompt. - **Language support**: Functions Copilot only supports English prompts. Using other languages may impact the accurancy of the generated output. -- **Regional support**: Functions Copilot is only available for US region Segment workspaces. +- **Regional support**: Functions Copilot is only available for US region Segment workspaces. ## Segment's generative AI service From f6f95eef5ec119465b3ab99ff0c0d7392b63f12a Mon Sep 17 00:00:00 2001 From: pwseg Date: Thu, 27 Jun 2024 19:58:19 -0500 Subject: [PATCH 10/11] Fix tables [netlify-build] --- src/connections/functions/copilot.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/connections/functions/copilot.md b/src/connections/functions/copilot.md index 49dc2dc1a1..d8afddbeb5 100644 --- a/src/connections/functions/copilot.md +++ b/src/connections/functions/copilot.md @@ -24,10 +24,9 @@ This table lists example prompts you can use with Functions Copilot: | Function Type | Example Prompts | | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| **Source Functions** | "Transform incoming data into a track event."
"Enrich user data with additional demographic details using an external API." | -| **Destination Functions** | "Create a function that enriches an Identify event using the Profile API."
"Remove PII data and hash email addresses in an Identify event." | -| **Destination Insert Functions** | "Enrich an Identify event using an external API."
"Tokenize PII data before sending it downstream." | -| | | +| **Source Functions** | "Transform incoming data into a track event."

"Enrich user data with additional demographic details using an external API." | +| **Destination Functions** | "Create a function that enriches an Identify event using the Profile API."

"Remove PII data and hash email addresses in an Identify event." | +| **Destination Insert Functions** | "Enrich an Identify event using an external API."

"Tokenize PII data before sending it downstream." | ## Best practices and limitations From bed7f5abca689b99c86dfca5007ed2987b4edbb0 Mon Sep 17 00:00:00 2001 From: pwseg <86626706+pwseg@users.noreply.github.com> Date: Fri, 28 Jun 2024 11:52:16 -0500 Subject: [PATCH 11/11] Update src/connections/functions/copilot.md Co-authored-by: forstisabella <92472883+forstisabella@users.noreply.github.com> --- src/connections/functions/copilot.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/functions/copilot.md b/src/connections/functions/copilot.md index d8afddbeb5..ef36e95de6 100644 --- a/src/connections/functions/copilot.md +++ b/src/connections/functions/copilot.md @@ -47,7 +47,7 @@ Keep the following limitations in mind as you work with Functions Copilot: ## Segment's generative AI service -For Copilot to generate a function, Segment sends your query to OpenAI, Segment’s 3rd party AI service. All queries sent to OpenAI from Segment are anonymized, meaning that OpenAI won’t be able to identify from whom the query was sent unless you include uniquely identifiable information in the input. +For Copilot to generate a function, Segment sends your query to OpenAI, Segment’s third-party AI service. All queries sent to OpenAI from Segment are anonymized, meaning that OpenAI won’t be able to identify from whom the query was sent unless you include uniquely identifiable information in the input. GPT is OpenAI’s state-of-the-art natural language generation tool powered by artificial intelligence. It can perform a variety of natural language tasks like text generation, completion, and classification. CustomerAI uses the service to inspire segmentation and build functions and audiences.