|
56 | 56 | "id": "aee05821", |
57 | 57 | "metadata": {}, |
58 | 58 | "source": [ |
59 | | - "This notebook provides a brief introduction to how to use BigFrames AI functions" |
| 59 | + "This notebook provides a brief introduction to AI functions in BigQuery Dataframes." |
60 | 60 | ] |
61 | 61 | }, |
62 | 62 | { |
|
145 | 145 | "id": "b606c51f", |
146 | 146 | "metadata": {}, |
147 | 147 | "source": [ |
148 | | - "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." |
| 148 | + "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." |
149 | 149 | ] |
150 | 150 | }, |
151 | 151 | { |
|
186 | 186 | "source": [ |
187 | 187 | "The answers are cut short as expected.\n", |
188 | 188 | "\n", |
189 | | - "In addition to `ai.generate`, you can use `ai.generate_bool`, `ai.generate_int`, and `ai.generate_double` for other type of outputs." |
| 189 | + "In addition to `ai.generate`, you can use `ai.generate_bool`, `ai.generate_int`, and `ai.generate_double` for other output types." |
190 | 190 | ] |
191 | 191 | }, |
192 | 192 | { |
|
196 | 196 | "source": [ |
197 | 197 | "## ai.if_\n", |
198 | 198 | "\n", |
199 | | - "`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_`:" |
| 199 | + "`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_`:" |
200 | 200 | ] |
201 | 201 | }, |
202 | 202 | { |
|
284 | 284 | "id": "63b5a59f", |
285 | 285 | "metadata": {}, |
286 | 286 | "source": [ |
287 | | - "`ai.score` ranks your input based on the prompt. You can then sort your data based on their ranks. For example:" |
| 287 | + "`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:" |
288 | 288 | ] |
289 | 289 | }, |
290 | 290 | { |
|
460 | 460 | "id": "9e4037bc", |
461 | 461 | "metadata": {}, |
462 | 462 | "source": [ |
463 | | - "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:" |
| 463 | + "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:" |
464 | 464 | ] |
465 | 465 | }, |
466 | 466 | { |
|
0 commit comments