Skip to content

Commit

Permalink
Update search grounding example given the new (yet similar) search to…
Browse files Browse the repository at this point in the history
…ol example
  • Loading branch information
windmaple committed Dec 19, 2024
1 parent 3468417 commit ecbe9a1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This is a collection of fun examples for the Gemini API.
* [Translate a public domain](./Translate_a_Public_Domain_Book.ipynb): In this notebook, you will explore Gemini model as a translation tool, demonstrating how to prepare data, create effective prompts, and save results into a `.txt` file.
* [Working with Charts, Graphs, and Slide Decks](./Working_with_Charts_Graphs_and_Slide_Decks.ipynb): Gemini models are powerful multimodal LLMs that can process both text and image inputs. This notebook shows how Gemini 1.5 Flash model is capable of extracting data from various images.
* [Entity extraction](./Entity_Extraction.ipynb): Use Gemini API to speed up some of your tasks, such as searching through text to extract needed information. Entity extraction with a Gemini model is a simple query, and you can ask it to retrieve its answer in the form that you prefer.
* [Generate a company research report using search grounding](./search_grounding_for_research_report.ipynb): Use search grounding to write a company research report with Gemini 1.5 Flash.
* [Generate a company research report using search grounding](./Search_grounding_for_research_report.ipynb): Use search grounding to write a company research report with Gemini 1.5 Flash.

### Integrations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"source": [
"In this tutorial you are going to leverage the [grounding-with-Google-Search](https://ai.google.dev/gemini-api/docs/grounding) capability of the Gemini 1.5 model to write a company report. Note that search grounding is a paid ony feature and this tutorial does not work with a free tier API key.\n",
"\n",
"You may be asking, why does one need to use the search tool for this purpose? Well, as you may be aware, today's business world evolves very fast and LLMs generally are not trained frequently enough to capture the latest updates. Luckily Google search comes to the rescue. Google search is built to provide accurate and nearly realtime information and can help us fulfill this task nicely.\n",
"You may be asking, why does one need to use search grounding for this purpose? Well, as you may be aware, today's business world evolves very fast and LLMs generally are not trained frequently enough to capture the latest updates. Luckily Google search comes to the rescue. Google search is built to provide accurate and nearly realtime information and can help us fulfill this task nicely.\n",
"\n",
"Note that the latest [search tool](https://ai.google.dev/gemini-api/docs/models/gemini-v2#search-tool) that comes with Gemini 2.0 is much easier to use and should be prioritized over search grounding in Gemini 1.5 models."
]
Expand Down Expand Up @@ -341,7 +341,7 @@
"\n",
"Next you define a couple of helper functions to better display the final report.\n",
"\n",
"Note that You must enable Google Search Suggestions, which help users find search results corresponding to a grounded response, and [display the search queries](https://ai.google.dev/gemini-api/docs/grounding/search-suggestions#display-requirements) that are included in the grounded response's metadata. You can find [more details](https://ai.google.dev/gemini-api/terms#grounding-with-google-search) about this requirement."
"Note that you must enable Google Search Suggestions, which help users find search results corresponding to a grounded response, and [display the search queries](https://ai.google.dev/gemini-api/docs/grounding/search-suggestions#display-requirements) that are included in the grounded response's metadata. You can find [more details](https://ai.google.dev/gemini-api/terms#grounding-with-google-search) about this requirement."
]
},
{
Expand Down Expand Up @@ -1149,7 +1149,9 @@
"id": "leOZmicAwTSn"
},
"source": [
"As you can see, the Gemini 1.5 model is able to write an accurate and well-structured research report for us. All the information in the report is factual and up-to-date."
"As you can see, the Gemini 1.5 model is able to write an accurate and well-structured research report for us. All the information in the report is factual and up-to-date.\n",
"\n",
"Note that while this works quite nicely, it still requires multiple steps for the job. With Gemini 2.0, it is much easier and you can accomplish the same with only a single step using the new [search tool](../gemini-2/search_tool_for_research_report.ipynb). "
]
},
{
Expand All @@ -1160,15 +1162,15 @@
"source": [
"## Next Steps\n",
"\n",
"* To learn more about search grounding, check out the [Grounding with Google Search](https://ai.google.dev/gemini-api/docs/grounding?lang=python) documentation\n",
"* To get started with search grounding, check out the [Search grounding quickstart](../quickstarts/Search_Grounding.ipynb).",
"* Also check the [Gemini 2.0 search tool](../gemini-2/search_tool.ipynb) notebook for a more recent example."
"* To learn more about search grounding, check out the [Grounding with Google Search](https://ai.google.dev/gemini-api/docs/grounding?lang=python) documentation.\n",
"* To get started with search grounding, check out the [Search grounding quickstart](../quickstarts/Search_Grounding.ipynb).\n",
"* Also check the [search tool for research report](../gemini-2/search_tool_for_research_report.ipynb) notebook for a more recent example using Gemini 2.0."
]
}
],
"metadata": {
"colab": {
"name": "search_grounding_for_research_report.ipynb",
"name": "Search_grounding_for_research_report.ipynb",
"toc_visible": true
},
"kernelspec": {
Expand Down

0 comments on commit ecbe9a1

Please sign in to comment.