Skip to content

Commit 304a268

Browse files
authored
Merge pull request #6776 from segmentio/master
`master` into `develop` after release
2 parents b3acea1 + 83248e0 commit 304a268

File tree

5 files changed

+225
-1
lines changed

5 files changed

+225
-1
lines changed

src/_data/sidenav/main.yml

+4
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,10 @@ sections:
210210
title: Destination Functions
211211
- path: /connections/functions/insert-functions
212212
title: Destination Insert Functions
213+
- path: /connections/functions/copilot
214+
title: Functions Copilot
215+
- path: /connections/functions/functions-copilot-nutrition-facts
216+
title: Functions Copilot Nutrition Facts Label
213217
- path: /connections/functions/environment
214218
title: Functions Environment
215219
- path: /connections/functions/usage
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
<style type="text/css">
2+
@font-face {
3+
font-family: 'SF Pro Text';
4+
src: url('fonts/sf-pro/SFProText-Regular.eot');
5+
src: url('fonts/sf-pro/SFProText-Regular.eot?#iefix') format('embedded-opentype');
6+
font-style: normal;
7+
}
8+
doc-content.ol{margin:0;padding:0}
9+
doc-content.table td,table th{padding:0}
10+
.c9{border-right-style:solid;padding:5pt 5pt 5pt 5pt;border-bottom-color:#000000;border-top-width:1pt;border-right-width:3pt;border-left-color:#000000;vertical-align:top;border-right-color:#000000;border-left-width:3pt;border-top-style:solid;border-left-style:solid;border-bottom-width:3pt;width:468pt;border-top-color:#000000;border-bottom-style:solid}
11+
.c28{border-right-style:solid;padding:5pt 5pt 5pt 5pt;border-bottom-color:#000000;border-top-width:3pt;border-right-width:3pt;border-left-color:#000000;vertical-align:top;border-right-color:#000000;border-left-width:3pt;border-top-style:solid;border-left-style:solid;border-bottom-width:6pt;width:468pt;border-top-color:#000000;border-bottom-style:solid}
12+
.c6{border-right-style:solid;padding:5pt 5pt 5pt 5pt;border-bottom-color:#000000;border-top-width:1pt;border-right-width:3pt;border-left-color:#000000;vertical-align:top;border-right-color:#000000;border-left-width:3pt;border-top-style:solid;border-left-style:solid;border-bottom-width:1pt;width:468pt;border-top-color:#000000;border-bottom-style:solid}
13+
.c26{border-right-style:solid;padding:5pt 5pt 5pt 5pt;border-bottom-color:#000000;border-top-width:6pt;border-right-width:3pt;border-left-color:#000000;vertical-align:top;border-right-color:#000000;border-left-width:3pt;border-top-style:solid;border-left-style:solid;border-bottom-width:1pt;width:468pt;border-top-color:#000000;border-bottom-style:solid}
14+
.c0{color:#000000;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:12pt;font-family:"SF Pro Text";font-style:normal}
15+
.c7{color:#000000;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:11pt;font-family:"SF Pro Text";font-style:normal}
16+
.c8{color:#000000;font-weight:700;text-decoration:none;vertical-align:baseline;font-size:12pt;font-family:"SF Pro Text";font-style:normal}
17+
.c11{padding-top:0pt;padding-bottom:10pt;line-height:1.0;orphans:2;widows:2;text-align:left;height:11pt}
18+
.c20{margin-left:216pt;padding-top:0pt;padding-bottom:10pt;line-height:1.0;orphans:2;widows:2;text-align:left}
19+
.c3{margin-left:13.5pt;padding-top:0pt;padding-bottom:0pt;line-height:1.15;text-align:left}
20+
.c12{color:#000000;text-decoration:none;vertical-align:baseline;font-style:normal}
21+
.c10{padding-top:0pt;padding-bottom:0pt;line-height:1.0;text-align:left}
22+
.c2{border-spacing:0;border-collapse:collapse;margin-right:auto}
23+
.c14{padding-top:0pt;padding-bottom:0pt;line-height:1.15;text-align:left}
24+
.c27{color:#ffffff;text-decoration:none;vertical-align:baseline;font-style:normal}
25+
.c23{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}
26+
.c15{font-weight:400;font-size:11pt;font-family:"SF Pro Text"}
27+
.c25{font-size:25pt;font-family:"SF Pro Text";font-weight:700}
28+
.c18{orphans:2;widows:2;height:11pt}
29+
.c21{font-size:10pt;font-family:"SF Pro Text";font-weight:700}
30+
.c24{font-weight:400;font-size:11pt;font-family:"SF Pro Text"}
31+
.c13{font-size:12pt;font-family:"SF Pro Text";font-weight:700}
32+
.c22{font-size:12pt;font-family:"SF Pro Text";font-weight:400}
33+
.c1{font-size:9pt;font-family:"SF Pro Text";font-weight:400}
34+
.c17{font-weight:400;font-size:18pt;font-family:"SF Pro Text"}
35+
.c29{font-weight:400;font-size:10pt;font-family:"SF Pro Text"}
36+
.c16{font-weight:400;font-size:10pt;font-family:"SF Pro Text"}
37+
.c19{background-color:#000000}
38+
.c5{height:63.5pt}.c4{height:0pt}
39+
.c4{height:0pt}
40+
doc-content.title{padding-top:0pt;color:#000000;font-size:26pt;padding-bottom:3pt;font-family:"SF Pro Text";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}
41+
doc-content.subtitle{padding-top:0pt;color:#666666;font-size:15pt;padding-bottom:16pt;font-family:"SF Pro Text";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}
42+
doc-content.li{color:#000000;font-size:11pt;font-family:"SF Pro Text"}
43+
doc-content.p{margin:0;color:#000000;font-size:11pt;font-family:"SF Pro Text"}
44+
doc-content.h1{padding-top:20pt;color:#000000;font-size:20pt;padding-bottom:6pt;font-family:"SF Pro Text";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}
45+
doc-content.h2{padding-top:18pt;color:#000000;font-size:16pt;padding-bottom:6pt;font-family:"SF Pro Text";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}
46+
doc-content.h3{padding-top:16pt;color:#434343;font-size:14pt;padding-bottom:4pt;font-family:"SF Pro Text";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}
47+
doc-content.h4{padding-top:14pt;color:#666666;font-size:12pt;padding-bottom:4pt;font-family:"SF Pro Text";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}
48+
doc-content.h5{padding-top:12pt;color:#666666;font-size:11pt;padding-bottom:4pt;font-family:"SF Pro Text";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}
49+
doc-content.h6{padding-top:12pt;color:#666666;font-size:11pt;padding-bottom:4pt;font-family:"SF Pro Text";line-height:1.15;page-break-after:avoid;font-style:italic;orphans:2;widows:2;text-align:left}
50+
.nf-right-align{float:right;width:50%;text-align:right;}
51+
.nf-indent{padding-left:1.5em}
52+
</style>
53+
54+
<p class="c11"><span class="c7"></span></p><a id="t.454197d3f7d8252a28377abc8231c14367b7f8e7"></a><a id="t.0"></a>
55+
<table class="c2"><tr class="c5">
56+
<td class="c28" colspan="1" rowspan="1">
57+
<p class="c14"><span class="c25">AI Nutrition Facts</span>
58+
<br />
59+
<br />
60+
<span class="c0">Customer AI Functions Copilot</span></p>
61+
</td>
62+
</tr><tr class="c4">
63+
<td class="c26" colspan="1" rowspan="1">
64+
<p class="c10"><span class="c8">Description</span>
65+
<br />
66+
<br />
67+
<span class="c1"> Functions Copilot is an AI-powered coding assistant designed to streamline the development of custom integrations, and enrich and transform Segment Functions.</span></p>
68+
</td>
69+
</tr>
70+
<tr class="c4">
71+
<td class="c6" colspan="1" rowspan="1"><p class="c10"><span class="c13">Privacy Ladder Level </span>
72+
<span class="c0 nf-right-align">1</span></p>
73+
</td>
74+
</tr>
75+
<tr class="c4">
76+
<td class="c6" colspan="1" rowspan="1"><p class="c10">
77+
<span class="c13">Feature is Optional</span>
78+
<span class="c0 nf-right-align">Yes</span></p>
79+
</td>
80+
</tr><tr class="c4">
81+
<td class="c6" colspan="1" rowspan="1"><p class="c10"><span class="c13">Model Type </span>
82+
<span class="c12 c15 nf-right-align">Generative</span></p>
83+
</td>
84+
</tr>
85+
<tr class="c4">
86+
<td class="c6" colspan="1" rowspan="1"><p class="c10"><span class="c13">Base Model </span>
87+
<span class="c12 c15 nf-right-align">OpenAI - GPT-4</span></p>
88+
</td>
89+
</tr>
90+
<tr class="c4">
91+
<td class="c6 c19" colspan="1" rowspan="1"><p class="c10"><span class="c13 c27">Trust Ingredients</span></p>
92+
</td>
93+
</tr>
94+
<tr class="c4">
95+
<td class="c6" colspan="1" rowspan="1">
96+
<p class="c10"><span class="c13">Base Model Trained with Customer Data</span>
97+
<span class="c0 nf-right-align">No</span>
98+
<br />
99+
<br />
100+
<span class="c1 c12"></span></p>
101+
</td>
102+
</tr>
103+
<tr class="c4">
104+
<td class="c6" colspan="1" rowspan="1"><p class="c10"><span class="c13">Customer Data Shared with Model Vendor</span>
105+
<span class="c0 nf-right-align">No</span>
106+
<br />
107+
<br />
108+
<span class="c12 c1"></span></p>
109+
</td>
110+
</tr>
111+
<tr class="c4">
112+
<td class="c6" colspan="1" rowspan="1"><p class="c10"><span class="c13">Training Data Anonymized &nbsp; </span>
113+
<span class="c0 nf-right-align">N/A</span></p>
114+
</td>
115+
</tr>
116+
<tr class="c4">
117+
<td class="c6" colspan="1" rowspan="1"><p class="c10"><span class="c13">Data Deletion</span>
118+
<span class="c0 nf-right-align">Yes</span></p>
119+
</td>
120+
</tr>
121+
<tr class="c4">
122+
<td class="c6" colspan="1" rowspan="1"><p class="c14"><span class="c13">Human in the Loop </span>
123+
<span class="c0 nf-right-align">Yes</span></p>
124+
</td>
125+
</tr>
126+
<tr class="c4">
127+
<td class="c6" colspan="1" rowspan="1"><p class="c10"><span class="c13">Data Retention </span>
128+
<span class="c22 nf-right-align">N/A</span></p>
129+
</td>
130+
</tr>
131+
<tr class="c4">
132+
<td class="c6" colspan="1" rowspan="1"><span class="c8">Compliance &nbsp; &nbsp; </span><br />
133+
<span class="c13 nf-indent">Logging &amp; Auditing </span>
134+
<span class="c0 nf-right-align">N/A</span><br />
135+
<span class="c13 nf-indent">Guardrails</span>
136+
<span class="c0 nf-right-align">N/A</span>
137+
</td>
138+
</tr>
139+
<tr class="c4">
140+
<td class="c6" colspan="1" rowspan="1"><p class="c10"><span class="c13">Input/Output Consistency</span>
141+
<span class="c0 nf-right-align">Yes</span></p>
142+
</td>
143+
</tr>
144+
<tr class="c4">
145+
<td class="c9" colspan="1" rowspan="1"><p class="c10"><span class="c8">Other Resources</span>
146+
<br />
147+
<br />
148+
<span class="c12 c1">Learn more at: <a href="https://twilio.com/en-us/customer-ai" target="_blank">https://twilio.com/en-us/customer-ai</a> </span></p>
149+
</td>
150+
</tr>
151+
</table>

src/connections/functions/copilot.md

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: Functions Copilot
3+
---
4+
5+
Functions Copilot helps you generate JavaScript code for functions using natural language prompts.
6+
7+
> info "Functions Copilot Public Beta"
8+
> Functions Copilot is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.
9+
10+
## Functions Copilot benefits
11+
12+
Powered by OpenAI, Functions Copilot improves efficiency and productivity by streamlining the process of creating and managing custom functions.
13+
14+
Functions Copilot can help you:
15+
16+
- Generate JavaScript code for custom integrations and data transformations.
17+
- Analyze existing code and provide optimization suggestions.
18+
- Secure sensitive data with minimal effort.
19+
- Simplify code testing and maintenance.
20+
21+
## Example prompts
22+
23+
This table lists example prompts you can use with Functions Copilot:
24+
25+
| Function Type | Example Prompts |
26+
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
27+
| **Source Functions** | "Transform incoming data into a track event."<br><br>"Enrich user data with additional demographic details using an external API." |
28+
| **Destination Functions** | "Create a function that enriches an Identify event using the Profile API."<br><br>"Remove PII data and hash email addresses in an Identify event." |
29+
| **Destination Insert Functions** | "Enrich an Identify event using an external API."<br><br>"Tokenize PII data before sending it downstream." |
30+
31+
## Best practices and limitations
32+
33+
Follow this guidance when you use Functions Copilot:
34+
35+
- Avoid using personally identifiable information (PII) or sensitive data.
36+
- Write specific prompts. Specificity leads to more accurate CustomerAI function generation. Use the names of existing events, related attributes, and properties.
37+
- Iterate on your prompts. If you don't get the result you're looking for, try rewriting the prompt.
38+
39+
### Limitations
40+
41+
Keep the following limitations in mind as you work with Functions Copilot:
42+
43+
- **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.
44+
- **Language support**: Functions Copilot only supports English prompts. Using other languages may impact the accurancy of the generated output.
45+
- **Regional support**: Functions Copilot is only available for US region Segment workspaces.
46+
47+
## Segment's generative AI service
48+
49+
<!-- PW/June 2024: Stealing this from Generative Audiences, but we should probably centralize this info at some point -->
50+
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.
51+
52+
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.
53+
54+
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.
55+
56+
For more information, see the [Functions Copilot Nutrition Facts Label](/docs/connections/functions/functions-copilot-nutrition-facts/).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Functions Copilot Nutrition Facts Label
3+
---
4+
5+
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.
6+
7+
{% include content/functions-copilot-nutrition-facts.html %}

src/connections/functions/index.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,10 @@ Use cases:
4040
- Transform outgoing data with advanced filtration and computation
4141
- Ensure data compliance by performing tokenisation, encryption, or decryption before sending data downstream
4242

43-
To learn more, visit [destination insert functions](/docs/connections/functions/insert-functions).
43+
To learn more, visit [destination insert functions](/docs/connections/functions/insert-functions).
44+
45+
#### Functions Copilot
46+
47+
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.
48+
49+
To learn more, visit the [Functions Copilot documentation](//docs/connections/functions/functions-copilot).

0 commit comments

Comments
 (0)