Skip to content

Upgrade notebook to gemini 3.6 flash - #165

Open
diogonando wants to merge 1 commit into
mainfrom
update-contract-review-gemini-3-6
Open

Upgrade notebook to gemini 3.6 flash#165
diogonando wants to merge 1 commit into
mainfrom
update-contract-review-gemini-3-6

Conversation

@diogonando

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Jupyter notebook for automated contract risk and compliance review to utilize newer Gemini models, while refining the BigQuery SQL queries and Plotly visualizations. The review feedback identifies a critical bug where querying the data column directly on an Object Table with SIMPLE metadata will fail, suggesting the use of READ_FILE(uri) instead. Additionally, the feedback points out an inconsistency in the configured Gemini model version compared to the markdown documentation, and recommends fully qualifying the connection_id with the PROJECT_ID in the AI.GENERATE function for better robustness.

Comment on lines +183 to +185
"MODEL_ID = \"gemini_3_6_flash\" # @param {type:\"string\"}\n",
"MODEL_VERSION = \"gemini-3.6-flash\" # @param {type:\"string\"}\n",
"CONNECTION_CLOUD_RESOURCE_ID = \"cloud-resource-connection\" # @param {type:\"string\"}\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is an inconsistency between the model version specified in the configuration parameters (gemini-3.6-flash) and the model version mentioned in the markdown cells (which refer to gemini-3.7-flash in sections 2, 3, and the setup instructions). Please ensure the model version is consistent throughout the notebook.

" '- Risk Rating: ', COALESCE(CAST(t.RiskScore AS STRING), 'N/A'), '/10\\\\n\\\\n',\n",
" '**Full Contract Text:**\\\\n', COALESCE(CAST(t.data AS STRING), 'N/A')\n",
" ),\n",
" connection_id => '{REGION}.{CONNECTION_CLOUD_RESOURCE_ID}',\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To ensure robust execution across different projects and environments, it is recommended to fully qualify the connection_id in AI.GENERATE with the PROJECT_ID, similar to how it is done in the CREATE MODEL statement.

      connection_id => '{PROJECT_ID}.{REGION}.{CONNECTION_CLOUD_RESOURCE_ID}',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant