Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions notebooks/generative_ai/ai_functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"id": "aee05821",
"metadata": {},
"source": [
"This notebook provides a brief introduction to how to use BigFrames AI functions"
"This notebook provides a brief introduction to AI functions in BigQuery Dataframes."
]
},
{
Expand Down Expand Up @@ -145,7 +145,7 @@
"id": "b606c51f",
"metadata": {},
"source": [
"You can also include additional model parameters into your function call, as long as they satisfy the structure of `generateContent` [request body format](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints/generateContent#request-body). In the next example, you use `maxOutputTokens` to limite the length of the generated content."
"You can also include additional model parameters into your function call, as long as they conform to the structure of `generateContent` [request body format](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints/generateContent#request-body). In the next example, you use `maxOutputTokens` to limit the length of the generated content."
]
},
{
Expand Down Expand Up @@ -186,7 +186,7 @@
"source": [
"The answers are cut short as expected.\n",
"\n",
"In addition to `ai.generate`, you can use `ai.generate_bool`, `ai.generate_int`, and `ai.generate_double` for other type of outputs."
"In addition to `ai.generate`, you can use `ai.generate_bool`, `ai.generate_int`, and `ai.generate_double` for other output types."
]
},
{
Expand All @@ -196,7 +196,7 @@
"source": [
"## ai.if_\n",
"\n",
"`ai.if_` generates a series of booleans, unlike `ai.generate_bool` where you get a series of structs. It's a handy tool for filtering your data. not only because it directly returns a boolean, but also because it provides more optimization during data processing. Here is an example of using `ai.if_`:"
"`ai.if_` generates a series of booleans. It's a handy tool for joining and filtering your data, not only because it directly returns boolean values, but also because it provides more optimization during data processing. Here is an example of using `ai.if_`:"
]
},
{
Expand Down Expand Up @@ -284,7 +284,7 @@
"id": "63b5a59f",
"metadata": {},
"source": [
"`ai.score` ranks your input based on the prompt. You can then sort your data based on their ranks. For example:"
"`ai.score` ranks your input based on the prompt and assigns a double value (i.e. a score) to each item. You can then sort your data based on their scores. For example:"
]
},
{
Expand Down Expand Up @@ -460,7 +460,7 @@
"id": "9e4037bc",
"metadata": {},
"source": [
"Note that this function can only return the values that are present in your provided categories. If your categories do not cover all cases, your will get wrong answers:"
"Note that this function can only return the values that are provided in the `categories` argument. If your categories do not cover all cases, your may get wrong answers:"
]
},
{
Expand Down