{ "cells": [ { "cell_type": "markdown", "id": "e5270bcc", "metadata": {}, "source": [ "# Final project of Agents course: An Agent that response the GAIA benchmark\n", "\n", "In this notebook, **we're going to read the GAIA questions from metadata and we'll store in a chroma database to use as retriever**.\n", "\n", "This notebook is part of the Hugging Face Agents Course, a free course from beginner to expert, where you learn to build Agents.\n", "\n", "## What we'll do\n", "\n", "In this notebook, we'll do:\n", "\n", "1. Reading json metadata with GAIA questions\n", "2. Creating chroma vector store\n", "3. Querying the database and converting to a retriever to search using\n" ] }, { "cell_type": "code", "execution_count": null, "id": "1e1d8e79", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import os\n", "import json\n", "from dotenv import load_dotenv\n", "from langchain_huggingface import HuggingFaceEmbeddings\n", "from langchain_chroma import Chroma\n", "import random\n", "\n", "# from langchain.schema import Document\n", "from langchain_core.documents import Document\n", "from uuid import uuid4\n", "\n", "load_dotenv()\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "bf2a78a5", "metadata": {}, "outputs": [], "source": [ "os.chdir(os.path.abspath(\"..\"))" ] }, { "cell_type": "markdown", "id": "c0513724", "metadata": {}, "source": [ "