{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "3ef714cf", "metadata": { "id": "J1SweFJ3-7mP" }, "outputs": [], "source": [ "# Copyright 2023 Google LLC\n", "#\n", "# Licensed under the Apache License, Version 2.0 (the \"License\");\n", "# you may not use this file except in compliance with the License.\n", "# You may obtain a copy of the License at\n", "#\n", "# https://www.apache.org/licenses/LICENSE-2.0\n", "#\n", "# Unless required by applicable law or agreed to in writing, software\n", "# distributed under the License is distributed on an \"AS IS\" BASIS,\n", "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", "# See the License for the specific language governing permissions and\n", "# limitations under the License." ] }, { "cell_type": "markdown", "id": "932e4eb3", "metadata": { "id": "MoVeavGR2Shf" }, "source": [ "# Gen AI and LLM Security - ReAct and RAG attacks & mitigations\n", "This is tutorial simplified Lab to demonstrate the potential security issue on Agent and RAG implementations.\n", "\n", "We recommend that you use ready Agents and RAG libries, like:\n", "- [Agent Development Kit](https://adk.dev)\n", "- [LangChain Agents](https://python.langchain.com/v0.1/docs/modules/agents/)\n", "- [Agent Search](https://cloud.google.com/enterprise-search)\n", "- [LangChain RAG](https://python.langchain.com/v0.2/docs/tutorials/rag)\n", "\n", "This is only learning and demonstration material and should not be used in production. **This is NOT production code**\n", "\n", "Authors: Ves vesselin@google.com, Alex alexmeissner@google.com\n", "\n", "Version: 1.1 - 06.2026" ] }, { "cell_type": "markdown", "id": "67418a70", "metadata": { "id": "f4fd8ca0" }, "source": [ "
| \n",
" \n",
" Open in Colab\n", " \n", " | \n",
" \n",
" \n",
" Open in Colab Enterprise\n", " \n", " | \n",
" \n",
" \n",
" Open in Workbench\n", " \n", " | \n",
" \n",
" \n",
" View on GitHub\n", " \n", " | \n",
"
\n",
"Share to:\n",
"\n",
"\n",
" \n",
"\n",
"\n",
"\n",
"
\n",
"\n",
"\n",
"\n",
"
\n",
"\n",
"\n",
"\n",
"
\n",
"\n",
"\n",
"\n",
" \n",
"\n",
"