Skip to content

Commit

Permalink
feat: updated tutorials for embeddings with RAGAS (GoogleCloudPlatfor…
Browse files Browse the repository at this point in the history
…m#877)

# Description

1. updated tutorials for Vertex embeddings with RAGAS
2. Added author details for both notebooks

---------

Co-authored-by: adityarane@google.com <adityarane@google.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Holt Skinner <13262395+holtskinner@users.noreply.github.com>
  • Loading branch information
4 people authored Jul 19, 2024
1 parent 7bdd6d7 commit 97c381f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
" <img src=\"https://cloud.google.com/ml-engine/images/colab-logo-32px.png\" alt=\"Google Colaboratory logo\"><br> Run in Colab\n",
" </a>\n",
" </td>\n",
" <td style=\"text-align: center\">\n",
" <a href=\"https://console.cloud.google.com/vertex-ai/colab/import/https:%2F%2Fraw.githubusercontent.com%2FGoogleCloudPlatform%2Fgenerative-ai%2Fmain%2Fgemini%2Fuse-cases%2Fretrieval-augmented-generation%2Frag_evaluation%2Fdeepeval_with_gemini.ipynb\">\n",
" <img width=\"32px\" src=\"https://lh3.googleusercontent.com/JmcxdQi-qOpctIvWKgPtrzZdJJK-J3sWE1RsfjZNwshCFgE_9fULcNpuXYTilIR2hjwN\" alt=\"Google Cloud Colab Enterprise logo\"><br> Run in Colab Enterprise\n",
" </a>\n",
" </td>\n",
" <td style=\"text-align: center\">\n",
" <a href=\"https://github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/use-cases/retrieval-augmented-generation/rag_evaluation/deepeval_with_gemini.ipynb\">\n",
" <img src=\"https://cloud.google.com/ml-engine/images/github-logo-32px.png\" alt=\"GitHub logo\"><br> View on GitHub\n",
Expand All @@ -58,7 +63,16 @@
" <img src=\"https://lh3.googleusercontent.com/UiNooY4LUgW_oTvpsNhPpQzsstV5W8F7rYgxgGBD85cWJoLmrOzhVs_ksK_vgx40SHs7jCqkTkCk=e14-rj-sc0xffffff-h130-w32\" alt=\"Vertex AI logo\"><br> Open in Vertex AI Workbench\n",
" </a>\n",
" </td>\n",
"</table>\n"
"</table>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"| | |\n",
"|-|-|\n",
"| Author(s) | [Aditya Rane](https://github.com/Adi8885) |"
]
},
{
Expand Down Expand Up @@ -298,7 +312,7 @@
"\n",
"# Base LLM for DeepEval\n",
"from deepeval.models.base_model import DeepEvalBaseLLM\n",
"from deepeval import assert_test, evaluate\n",
"from deepeval import evaluate\n",
"from deepeval.metrics import AnswerRelevancyMetric\n",
"from deepeval.test_case import LLMTestCase"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
" </a>\n",
" </td>\n",
" <td style=\"text-align: center\">\n",
" <a href=\"https://console.cloud.google.com/vertex-ai/colab/import/https:%2F%2Fraw.githubusercontent.com%2FGoogleCloudPlatform%2Fgenerative-ai%2Fmain%2Fgemini%2Fuse-cases%2Fretrieval-augmented-generation%2Frag_evaluation%2Fragas_with_gemini.ipynb\">\n",
" <img width=\"32px\" src=\"https://lh3.googleusercontent.com/JmcxdQi-qOpctIvWKgPtrzZdJJK-J3sWE1RsfjZNwshCFgE_9fULcNpuXYTilIR2hjwN\" alt=\"Google Cloud Colab Enterprise logo\"><br> Run in Colab Enterprise\n",
" </a>\n",
" </td>\n",
" <td style=\"text-align: center\">\n",
" <a href=\"https://github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/use-cases/retrieval-augmented-generation/rag_evaluation/ragas_with_gemini.ipynb\">\n",
" <img src=\"https://cloud.google.com/ml-engine/images/github-logo-32px.png\" alt=\"GitHub logo\"><br> View on GitHub\n",
" </a>\n",
Expand All @@ -61,6 +66,15 @@
"</table>\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"| | |\n",
"|-|-|\n",
"| Author(s) | [Aditya Rane](https://github.com/Adi8885) |"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down Expand Up @@ -290,6 +304,7 @@
" answer_relevancy,\n",
" context_recall,\n",
" context_precision,\n",
" answer_similarity,\n",
")\n",
"from ragas.metrics.critique import harmfulness\n",
"\n",
Expand Down Expand Up @@ -550,6 +565,7 @@
" context_recall,\n",
" context_precision,\n",
" harmfulness,\n",
" answer_similarity,\n",
"]"
]
},
Expand Down

0 comments on commit 97c381f

Please sign in to comment.