{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Use BigQuery DataFrames to run Anthropic LLM at scale\n", "\n", "
\n",
" \n",
" Run in Colab\n",
" \n",
" | \n",
" \n",
" \n",
" \n",
" View on GitHub\n",
" \n",
" | \n",
" \n",
" \n",
" | \n",
"
| \n", " | questions | \n", "
|---|---|
| 0 | \n", "What is the capital of France? | \n", "
| 1 | \n", "Explain the concept of photosynthesis in simpl... | \n", "
| 2 | \n", "Write a haiku about artificial intelligence. | \n", "
3 rows × 1 columns
\n", "SELECT\n",
"`bfuid_col_3` AS `bfuid_col_3`,\n",
"`bfuid_col_4` AS `bfuid_col_4`,\n",
"`bfuid_col_5` AS `bfuid_col_5`\n",
"FROM\n",
"(SELECT\n",
" `t1`.`bfuid_col_3`,\n",
" `t1`.`bfuid_col_4`,\n",
" `t1`.`bfuid_col_5`,\n",
" `t1`.`bfuid_col_6` AS `bfuid_col_7`\n",
"FROM (\n",
" SELECT\n",
" `t0`.`level_0`,\n",
" `t0`.`column_0`,\n",
" `t0`.`bfuid_col_6`,\n",
" `t0`.`level_0` AS `bfuid_col_3`,\n",
" `t0`.`column_0` AS `bfuid_col_4`,\n",
" `bigframes-dev._e9a5162ae4daa9f50fda3f95febaa9781131f3b8.bigframes_sessionc10c73_49262141176cbf70037559ae84e834d3`(`t0`.`column_0`) AS `bfuid_col_5`\n",
" FROM (\n",
" SELECT\n",
" *\n",
" FROM UNNEST(ARRAY<STRUCT<`level_0` INT64, `column_0` STRING, `bfuid_col_6` INT64>>[STRUCT(0, 'What is the capital of France?', 0), STRUCT(1, 'Explain the concept of photosynthesis in simple terms.', 1), STRUCT(2, 'Write a haiku about artificial intelligence.', 2)]) AS `level_0`\n",
" ) AS `t0`\n",
") AS `t1`)\n",
"ORDER BY `bfuid_col_7` ASC NULLS LAST\n",
"LIMIT 10| \n", " | questions | \n", "answers | \n", "
|---|---|---|
| 0 | \n", "What is the capital of France? | \n", "The capital of France is Paris. | \n", "
| 1 | \n", "Explain the concept of photosynthesis in simpl... | \n", "Photosynthesis is the process by which plants ... | \n", "
| 2 | \n", "Write a haiku about artificial intelligence. | \n", "Here is a haiku about artificial intelligence:... | \n", "
3 rows × 2 columns
\n", "