{ "cells": [ { "cell_type": "markdown", "id": "984169ca", "metadata": {}, "source": [ "# Agent VectorDB Question Answering Benchmarking\n", "\n", "Here we go over how to benchmark performance on a question answering task using an agent to route between multiple vectordatabases.\n", "\n", "It is highly reccomended that you do any evaluation/benchmarking with tracing enabled. See [here](https://langchain.readthedocs.io/en/latest/tracing.html) for an explanation of what tracing is and how to set it up." ] }, { "cell_type": "code", "execution_count": 1, "id": "7b57a50f", "metadata": {}, "outputs": [], "source": [ "# Comment this out if you are NOT using tracing\n", "import os\n", "os.environ[\"LANGCHAIN_HANDLER\"] = \"langchain\"" ] }, { "cell_type": "markdown", "id": "8a16b75d", "metadata": {}, "source": [ "## Loading the data\n", "First, let's load the data." ] }, { "cell_type": "code", "execution_count": 2, "id": "5b2d5e98", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Found cached dataset json (/Users/harrisonchase/.cache/huggingface/datasets/LangChainDatasets___json/LangChainDatasets--agent-vectordb-qa-sota-pg-d3ae24016b514f92/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51)\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "4c389519842e4b65afc33006a531dcbc", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/1 [00:00