diff --git a/examples/rag_eval_harness.ipynb b/examples/rag_eval_harness.ipynb
new file mode 100644
index 00000000..b7c18ef6
--- /dev/null
+++ b/examples/rag_eval_harness.ipynb
@@ -0,0 +1,1594 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "%%bash\n",
+ "\n",
+ "# We assume that the haystack-experimental package is already installed.\n",
+ "pip install datasets\n",
+ "pip install sentence-transformers"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# Let's set the OpenAI API key environment variable to ensure that\n",
+ "# LLM-based evaluators can query the OpenAI API.\n",
+ "import os\n",
+ "from getpass import getpass\n",
+ "if \"OPENAI_API_KEY\" not in os.environ:\n",
+ " os.environ[\"OPENAI_API_KEY\"] = getpass(\"Enter OpenAI API key:\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "'NoneType' object has no attribute 'cadam32bit_grad_fp32'\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/Users/mkannan/.pyenv/versions/3.10.13/envs/dev/lib/python3.10/site-packages/bitsandbytes/cextension.py:34: UserWarning: The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable.\n",
+ " warn(\"The installed version of bitsandbytes was compiled without GPU support. \"\n"
+ ]
+ }
+ ],
+ "source": [
+ "# All the imports that we'll need to create the following:\n",
+ "# - An indexing pipeline that stores documents from our chosen dataset in a document store.\n",
+ "# - A retrieval pipeline that uses a query to retrieve relevant documents from the document store.\n",
+ "import json\n",
+ "from typing import List, Dict\n",
+ "from collections import defaultdict\n",
+ "from pathlib import Path\n",
+ "import random\n",
+ "from datasets import load_dataset, Dataset\n",
+ "from tqdm import tqdm\n",
+ "\n",
+ "from haystack import Document, Pipeline\n",
+ "from haystack.components.builders import AnswerBuilder, PromptBuilder\n",
+ "from haystack.components.embedders import (\n",
+ " SentenceTransformersDocumentEmbedder,\n",
+ " SentenceTransformersTextEmbedder,\n",
+ ")\n",
+ "from haystack.components.generators import OpenAIGenerator\n",
+ "from haystack.components.retrievers import (\n",
+ " InMemoryEmbeddingRetriever,\n",
+ " InMemoryBM25Retriever,\n",
+ ")\n",
+ "from haystack.components.writers import DocumentWriter\n",
+ "\n",
+ "from haystack.document_stores.in_memory import InMemoryDocumentStore\n",
+ "from haystack.document_stores.types import DuplicatePolicy, DocumentStore\n",
+ "from haystack_experimental.evaluation.harness.rag import (\n",
+ " RAGEvaluationHarness,\n",
+ " RAGEvaluationMetric,\n",
+ " RAGEvaluationInput,\n",
+ " RAGEvaluationOutput,\n",
+ " RAGEvaluationOverrides,\n",
+ ")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Dataset preparation\n",
+ "\n",
+ "The following steps will load the SQUAD dataset, preprocess them for the indexing pipeline and store them to a local folder in the current working directory."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# Helper functions to load the SQUAD dataset.\n",
+ "def aggregate_wiki_title(data: Dataset, agg_wiki_title: Dict[str, Dict[str, List[str]]]):\n",
+ " for idx, x in enumerate(data.iter(batch_size=1)):\n",
+ " if x[\"context\"] not in agg_wiki_title[x[\"title\"][0]][\"context\"]:\n",
+ " agg_wiki_title[x[\"title\"][0]][\"context\"].append(x[\"context\"])\n",
+ " agg_wiki_title[x[\"title\"][0]][\"question_answers\"].append(\n",
+ " {\"question\": x[\"question\"], \"answers\": x[\"answers\"]}\n",
+ " )\n",
+ "\n",
+ "def load_transformed_squad():\n",
+ " with open(\"transformed_squad/questions.jsonl\", \"r\") as f:\n",
+ " questions = [json.loads(x) for x in f.readlines()]\n",
+ " for idx, question in enumerate(questions):\n",
+ " question[\"query_id\"] = f\"query_{idx}\"\n",
+ "\n",
+ " def create_document(text: str, name: str):\n",
+ " return Document(content=text, meta={\"name\": name})\n",
+ "\n",
+ " # walk through the files in the directory and transform each text file into a Document\n",
+ " documents = []\n",
+ " for root, dirs, files in os.walk(\"transformed_squad/articles/\"):\n",
+ " for article in files:\n",
+ " with open(f\"{root}/{article}\", \"r\") as f:\n",
+ " raw_texts = f.read().split(\"\\n\")\n",
+ " for text in raw_texts:\n",
+ " documents.append(\n",
+ " create_document(text, article.replace(\".txt\", \"\"))\n",
+ " )\n",
+ "\n",
+ " return questions, documents"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "100%|██████████| 490/490 [00:00<00:00, 66949.28it/s]\n"
+ ]
+ }
+ ],
+ "source": [
+ "data_train = load_dataset(\"squad\", split=\"train\")\n",
+ "data_validation = load_dataset(\"squad\", split=\"validation\")\n",
+ "agg_wiki_title = defaultdict(\n",
+ " lambda: {\"context\": [], \"question_answers\": [], \"text\": \"\"}\n",
+ ")\n",
+ "aggregate_wiki_title(data_train, agg_wiki_title)\n",
+ "aggregate_wiki_title(data_validation, agg_wiki_title)\n",
+ "\n",
+ "# merge the context into a single document\n",
+ "for article in tqdm(agg_wiki_title.keys()):\n",
+ " agg_wiki_title[article][\"text\"] = \"\\n\".join(\n",
+ " [x[0] for x in agg_wiki_title[article][\"context\"]]\n",
+ " )\n",
+ "\n",
+ "# create documents\n",
+ "for article in agg_wiki_title.keys():\n",
+ " out_path = Path(\"transformed_squad/articles/\")\n",
+ " out_path.mkdir(parents=True, exist_ok=True)\n",
+ " with open(f\"{str(out_path)}/{article}.txt\", \"w\") as f:\n",
+ " f.write(agg_wiki_title[article][\"text\"])\n",
+ "\n",
+ "# create question/answers\n",
+ "questions = Path(\"transformed_squad/\")\n",
+ "questions.mkdir(parents=True, exist_ok=True)\n",
+ "with open(f\"{str(questions)}/questions.jsonl\", \"w\") as f:\n",
+ " for article in agg_wiki_title.keys():\n",
+ " for entry in agg_wiki_title[article][\"question_answers\"]:\n",
+ " f.write(\n",
+ " json.dumps(\n",
+ " {\n",
+ " \"question\": entry[\"question\"][0],\n",
+ " \"document\": article,\n",
+ " \"answers\": entry[\"answers\"][0],\n",
+ " }\n",
+ " )\n",
+ " + \"\\n\"\n",
+ " )\n",
+ "\n",
+ "questions, documents = load_transformed_squad()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Indexing pipeline"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# Helper function to create a pipeline that indexes the documents in the document store.\n",
+ "def indexing(documents: List[Document]) -> InMemoryDocumentStore:\n",
+ " document_store = InMemoryDocumentStore()\n",
+ "\n",
+ " doc_writer = DocumentWriter(\n",
+ " document_store=document_store, policy=DuplicatePolicy.SKIP\n",
+ " )\n",
+ " doc_embedder = SentenceTransformersDocumentEmbedder(\n",
+ " model=\"sentence-transformers/all-MiniLM-L6-v2\"\n",
+ " )\n",
+ "\n",
+ " ingestion_pipe = Pipeline()\n",
+ " ingestion_pipe.add_component(instance=doc_embedder, name=\"doc_embedder\")\n",
+ " ingestion_pipe.add_component(instance=doc_writer, name=\"doc_writer\")\n",
+ "\n",
+ " ingestion_pipe.connect(\"doc_embedder.documents\", \"doc_writer.documents\")\n",
+ " ingestion_pipe.run({\"doc_embedder\": {\"documents\": documents}})\n",
+ "\n",
+ " return document_store"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/Users/mkannan/.pyenv/versions/3.10.13/envs/dev/lib/python3.10/site-packages/huggingface_hub/file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.\n",
+ " warnings.warn(\n"
+ ]
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "20fe295da31045df9d92f63762587064",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/662 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "ID '30fa23c3869483ff28c01e6b82ff83b2bba892e2f0805f907b15f7cac4ea6d39' already exists\n",
+ "ID '30fa23c3869483ff28c01e6b82ff83b2bba892e2f0805f907b15f7cac4ea6d39' already exists\n",
+ "ID '2ed2b9d255372bddd91cee3856f43ee0730d8494c960d7ec3c5ab72d1a2b9817' already exists\n",
+ "ID '2ed2b9d255372bddd91cee3856f43ee0730d8494c960d7ec3c5ab72d1a2b9817' already exists\n",
+ "ID '4899256109be91b0cf3e9c9c59020795ad450302840e41882277c0aff619c00e' already exists\n",
+ "ID '09b0f049b862ece73b82870fc4513c3f38cd200f96aba7f437a62dcf1fa62241' already exists\n",
+ "ID 'c87db560490e592c8d0461ebcd8d5fe91c5bec2a5287d5790df812ea02e05362' already exists\n",
+ "ID 'c87db560490e592c8d0461ebcd8d5fe91c5bec2a5287d5790df812ea02e05362' already exists\n",
+ "ID 'c87db560490e592c8d0461ebcd8d5fe91c5bec2a5287d5790df812ea02e05362' already exists\n",
+ "ID 'c87db560490e592c8d0461ebcd8d5fe91c5bec2a5287d5790df812ea02e05362' already exists\n",
+ "ID 'c87db560490e592c8d0461ebcd8d5fe91c5bec2a5287d5790df812ea02e05362' already exists\n",
+ "ID 'c87db560490e592c8d0461ebcd8d5fe91c5bec2a5287d5790df812ea02e05362' already exists\n",
+ "ID 'c87db560490e592c8d0461ebcd8d5fe91c5bec2a5287d5790df812ea02e05362' already exists\n",
+ "ID 'c87db560490e592c8d0461ebcd8d5fe91c5bec2a5287d5790df812ea02e05362' already exists\n",
+ "ID 'c87db560490e592c8d0461ebcd8d5fe91c5bec2a5287d5790df812ea02e05362' already exists\n",
+ "ID 'c87db560490e592c8d0461ebcd8d5fe91c5bec2a5287d5790df812ea02e05362' already exists\n",
+ "ID 'c87db560490e592c8d0461ebcd8d5fe91c5bec2a5287d5790df812ea02e05362' already exists\n",
+ "ID 'c87db560490e592c8d0461ebcd8d5fe91c5bec2a5287d5790df812ea02e05362' already exists\n",
+ "ID 'c87db560490e592c8d0461ebcd8d5fe91c5bec2a5287d5790df812ea02e05362' already exists\n",
+ "ID 'c87db560490e592c8d0461ebcd8d5fe91c5bec2a5287d5790df812ea02e05362' already exists\n"
+ ]
+ }
+ ],
+ "source": [
+ "document_store = indexing(documents)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Retrieval pipeline\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# Helper function to create an embedding-based RAG pipeline.\n",
+ "def build_emb_rag_pipeline(document_store: InMemoryDocumentStore, top_k: int = 2) -> Pipeline:\n",
+ " template = \"\"\"\n",
+ " You have to answer the following question based on the given context information only.\n",
+ "\n",
+ " Context:\n",
+ " {% for document in documents %}\n",
+ " {{ document.content }}\n",
+ " {% endfor %}\n",
+ "\n",
+ " Question: {{question}}\n",
+ " Answer:\n",
+ " \"\"\"\n",
+ "\n",
+ " pipeline = Pipeline()\n",
+ " pipeline.add_component(\n",
+ " \"query_embedder\",\n",
+ " SentenceTransformersTextEmbedder(\n",
+ " model=\"sentence-transformers/all-MiniLM-L6-v2\"\n",
+ " ),\n",
+ " )\n",
+ " pipeline.add_component(\n",
+ " \"retriever\", InMemoryEmbeddingRetriever(document_store, top_k=top_k)\n",
+ " )\n",
+ " pipeline.add_component(\"prompt_builder\", PromptBuilder(template=template))\n",
+ " pipeline.add_component(\n",
+ " \"generator\", OpenAIGenerator(model=\"gpt-3.5-turbo\")\n",
+ " )\n",
+ " pipeline.add_component(\"answer_builder\", AnswerBuilder())\n",
+ "\n",
+ " pipeline.connect(\"query_embedder\", \"retriever.query_embedding\")\n",
+ " pipeline.connect(\"retriever\", \"prompt_builder.documents\")\n",
+ " pipeline.connect(\"prompt_builder\", \"generator\")\n",
+ " pipeline.connect(\"generator.replies\", \"answer_builder.replies\")\n",
+ " pipeline.connect(\"generator.meta\", \"answer_builder.meta\")\n",
+ " pipeline.connect(\"retriever\", \"answer_builder.documents\")\n",
+ "\n",
+ " return pipeline"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# Helper function to create an keyword-based RAG pipeline.\n",
+ "def build_keyword_rag_pipeline(document_store: InMemoryDocumentStore, top_k: int = 2) -> Pipeline:\n",
+ " template = \"\"\"\n",
+ " You have to answer the following question based on the given context information only.\n",
+ "\n",
+ " Context:\n",
+ " {% for document in documents %}\n",
+ " {{ document.content }}\n",
+ " {% endfor %}\n",
+ "\n",
+ " Question: {{question}}\n",
+ " Answer:\n",
+ " \"\"\"\n",
+ "\n",
+ " pipeline = Pipeline()\n",
+ " pipeline.add_component(\n",
+ " \"retriever\", InMemoryBM25Retriever(document_store, top_k=top_k)\n",
+ " )\n",
+ " pipeline.add_component(\"prompt_builder\", PromptBuilder(template=template))\n",
+ " pipeline.add_component(\n",
+ " \"generator\", OpenAIGenerator(model=\"gpt-3.5-turbo\")\n",
+ " )\n",
+ " pipeline.add_component(\"answer_builder\", AnswerBuilder())\n",
+ "\n",
+ " pipeline.connect(\"retriever\", \"prompt_builder.documents\")\n",
+ " pipeline.connect(\"prompt_builder\", \"generator\")\n",
+ " pipeline.connect(\"generator.replies\", \"answer_builder.replies\")\n",
+ " pipeline.connect(\"generator.meta\", \"answer_builder.meta\")\n",
+ " pipeline.connect(\"retriever\", \"answer_builder.documents\")\n",
+ "\n",
+ " return pipeline"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "emb_rag_pipeline = build_emb_rag_pipeline(document_store, top_k=2)\n",
+ "keyword_rag_pipeline = build_keyword_rag_pipeline(document_store, top_k=2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Evaluation harness\n",
+ "\n",
+ "The RAG evaluation harness comes with a predefined set of evaluation metrics, which are enumerated in the `RAGEvaluationMetric` enum. \n",
+ "\n",
+ "The `RAGEvaluationHarness` class comes with default initialization functions that can be used with RAG pipelines that use typical names/identifiers for their components."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# Create a harness to evalaute the embedding-based RAG pipeline.\n",
+ "emb_eval_harness = RAGEvaluationHarness.default_with_embedding_retriever(emb_rag_pipeline, metrics={\n",
+ " RAGEvaluationMetric.DOCUMENT_MAP,\n",
+ " RAGEvaluationMetric.DOCUMENT_RECALL_SINGLE_HIT,\n",
+ " RAGEvaluationMetric.ANSWER_FAITHFULNESS\n",
+ " })\n",
+ "keyword_eval_harness = RAGEvaluationHarness.default_with_keyword_retriever(keyword_rag_pipeline, metrics={\n",
+ " RAGEvaluationMetric.DOCUMENT_MAP,\n",
+ " RAGEvaluationMetric.DOCUMENT_RECALL_SINGLE_HIT,\n",
+ " RAGEvaluationMetric.ANSWER_FAITHFULNESS\n",
+ " })"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# Initialize the inputs to the evaluation harness.\n",
+ "# These inputs will be automatically passed to RAG pipeline \n",
+ "# and the evaluation pipeline that the harness internally uses.\n",
+ "\n",
+ "input_questions = random.sample(questions, 10)\n",
+ "\n",
+ "eval_harness_input = RAGEvaluationInput(\n",
+ " queries=[q[\"question\"] for q in input_questions],\n",
+ " ground_truth_answers=[q[\"answers\"][\"text\"][0] for q in input_questions],\n",
+ " ground_truth_documents=[\n",
+ " [\n",
+ " doc\n",
+ " for doc in document_store.storage.values()\n",
+ " if doc.meta[\"name\"] == q[\"document\"]\n",
+ " ]\n",
+ " for q in input_questions\n",
+ " ],\n",
+ " additional_rag_inputs={\n",
+ " \"prompt_builder\": {\"question\": [q[\"question\"] for q in input_questions]},\n",
+ " \"answer_builder\": {\"query\": [q[\"question\"] for q in input_questions]},\n",
+ " },\n",
+ ")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "ba7fddb6f307443cbef45f91f38d3e3f",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\n",
+ "To disable this warning, you can either:\n",
+ "\t- Avoid using `tokenizers` before the fork if possible\n",
+ "\t- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)\n"
+ ]
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "eea29f8d6bdc4e30ab22d6b55683b8eb",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "41e53999aeda4016bf6e5ff74d22a719",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "6a71e3d52d0c44cea5662ba12e0f0089",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "ab54bfb1166d4b6fa64ae153da8f216d",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "4f4b65a50bc1488f8f431900abad003f",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "450e90bd0496462d8dfd9a5908245301",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "116a2bf4d72e4666a804711c2b9affd6",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "c8c1cf5d42ce44c6ad1c9a7973aaeed9",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "2658a3bed56247438180a509934d2c2b",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "100%|██████████| 10/10 [00:12<00:00, 1.24s/it]\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Launch an evaluation run with the above inputs.\n",
+ "emb_eval_run = emb_eval_harness.run(inputs=eval_harness_input, run_name=\"emb_eval_run\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Results of the evaluation run: emb_eval_run\n",
+ "Serialized RAG pipeline: components:\n",
+ " answer_builder:\n",
+ " init_parameters:\n",
+ " pattern: null\n",
+ " reference_pattern: null\n",
+ " type: haystack.components.builders.answer_builder.AnswerBuilder\n",
+ " generator:\n",
+ " init_parameters:\n",
+ " api_base_url: null\n",
+ " api_key:\n",
+ " env_vars:\n",
+ " - OPENAI_API_KEY\n",
+ " strict: true\n",
+ " type: env_var\n",
+ " generation_kwargs: {}\n",
+ " model: gpt-3.5-turbo\n",
+ " streaming_callback: null\n",
+ " system_prompt: null\n",
+ " type: haystack.components.generators.openai.OpenAIGenerator\n",
+ " prompt_builder:\n",
+ " init_parameters:\n",
+ " required_variables: null\n",
+ " template: \"\\n You have to answer the following question based on the\\\n",
+ " \\ given context information only.\\n\\n Context:\\n {% for document\\\n",
+ " \\ in documents %}\\n {{ document.content }}\\n {% endfor %}\\n\\\n",
+ " \\n Question: {{question}}\\n Answer:\\n \"\n",
+ " variables: null\n",
+ " type: haystack.components.builders.prompt_builder.PromptBuilder\n",
+ " query_embedder:\n",
+ " init_parameters:\n",
+ " batch_size: 32\n",
+ " device:\n",
+ " device: mps\n",
+ " type: single\n",
+ " model: sentence-transformers/all-MiniLM-L6-v2\n",
+ " normalize_embeddings: false\n",
+ " prefix: ''\n",
+ " progress_bar: true\n",
+ " suffix: ''\n",
+ " token:\n",
+ " env_vars:\n",
+ " - HF_API_TOKEN\n",
+ " strict: false\n",
+ " type: env_var\n",
+ " trust_remote_code: false\n",
+ " type: haystack.components.embedders.sentence_transformers_text_embedder.SentenceTransformersTextEmbedder\n",
+ " retriever:\n",
+ " init_parameters:\n",
+ " document_store:\n",
+ " init_parameters:\n",
+ " bm25_algorithm: BM25L\n",
+ " bm25_parameters: {}\n",
+ " bm25_tokenization_regex: (?u)\\b\\w\\w+\\b\n",
+ " embedding_similarity_function: dot_product\n",
+ " index: 49bbc936-3069-4cd9-966d-10282cc81ac1\n",
+ " type: haystack.document_stores.in_memory.document_store.InMemoryDocumentStore\n",
+ " filter_policy: replace\n",
+ " filters: null\n",
+ " return_embedding: false\n",
+ " scale_score: false\n",
+ " top_k: 2\n",
+ " type: haystack.components.retrievers.in_memory.embedding_retriever.InMemoryEmbeddingRetriever\n",
+ "connections:\n",
+ "- receiver: retriever.query_embedding\n",
+ " sender: query_embedder.embedding\n",
+ "- receiver: prompt_builder.documents\n",
+ " sender: retriever.documents\n",
+ "- receiver: answer_builder.documents\n",
+ " sender: retriever.documents\n",
+ "- receiver: generator.prompt\n",
+ " sender: prompt_builder.prompt\n",
+ "- receiver: answer_builder.replies\n",
+ " sender: generator.replies\n",
+ "- receiver: answer_builder.meta\n",
+ " sender: generator.meta\n",
+ "max_loops_allowed: 100\n",
+ "metadata: {}\n",
+ "\n",
+ "Serialized evaluation pipeline: components:\n",
+ " metric_answer_faithfulness:\n",
+ " init_parameters:\n",
+ " api: openai\n",
+ " api_key:\n",
+ " env_vars:\n",
+ " - OPENAI_API_KEY\n",
+ " strict: true\n",
+ " type: env_var\n",
+ " examples:\n",
+ " - inputs:\n",
+ " contexts:\n",
+ " - Berlin is the capital of Germany and was founded in 1244.\n",
+ " predicted_answers: The capital of Germany, Berlin, was founded in the 13th\n",
+ " century.\n",
+ " questions: What is the capital of Germany and when was it founded?\n",
+ " outputs:\n",
+ " statement_scores:\n",
+ " - 1\n",
+ " - 1\n",
+ " statements:\n",
+ " - Berlin is the capital of Germany.\n",
+ " - Berlin was founded in 1244.\n",
+ " - inputs:\n",
+ " contexts:\n",
+ " - Berlin is the capital of Germany.\n",
+ " predicted_answers: Paris\n",
+ " questions: What is the capital of France?\n",
+ " outputs:\n",
+ " statement_scores:\n",
+ " - 0\n",
+ " statements:\n",
+ " - Paris is the capital of France.\n",
+ " - inputs:\n",
+ " contexts:\n",
+ " - Rome is the capital of Italy.\n",
+ " predicted_answers: Rome is the capital of Italy with more than 4 million\n",
+ " inhabitants.\n",
+ " questions: What is the capital of Italy?\n",
+ " outputs:\n",
+ " statement_scores:\n",
+ " - 1\n",
+ " - 0\n",
+ " statements:\n",
+ " - Rome is the capital of Italy.\n",
+ " - Rome has more than 4 million inhabitants.\n",
+ " inputs:\n",
+ " - - questions\n",
+ " - typing.List[str]\n",
+ " - - contexts\n",
+ " - typing.List[typing.List[str]]\n",
+ " - - predicted_answers\n",
+ " - typing.List[str]\n",
+ " instructions: Your task is to judge the faithfulness or groundedness of statements\n",
+ " based on context information. First, please extract statements from a provided\n",
+ " predicted answer to a question. Second, calculate a faithfulness score for\n",
+ " each statement made in the predicted answer. The score is 1 if the statement\n",
+ " can be inferred from the provided context or 0 if it cannot be inferred.\n",
+ " outputs:\n",
+ " - statements\n",
+ " - statement_scores\n",
+ " progress_bar: true\n",
+ " type: haystack.components.evaluators.faithfulness.FaithfulnessEvaluator\n",
+ " metric_doc_map:\n",
+ " init_parameters: {}\n",
+ " type: haystack.components.evaluators.document_map.DocumentMAPEvaluator\n",
+ " metric_doc_recall_single:\n",
+ " init_parameters:\n",
+ " mode: single_hit\n",
+ " type: haystack.components.evaluators.document_recall.DocumentRecallEvaluator\n",
+ "connections: []\n",
+ "max_loops_allowed: 100\n",
+ "metadata: {}\n",
+ "\n",
+ "Inputs: RAGEvaluationInput(queries=['Upon what are kings of Scots coronated?', 'Where is the energy stored by a capacitor located?', 'What did these gardeners do about unwanted species?', 'What is one type of Benedictine order that was common in France?', 'When did work on the ASCII standard begin? ', 'Where did Africans escape and mate with naitves?', 'What direction has Europe moved towards?', 'What was the Office of Special Operations initial budget?', 'What is the large art school in Mexico City?', 'When did the Hounslow Heath Aerodrome begin to operate scheduled international commercial services?'], ground_truth_documents=[[Document(id=3b76cd5bfcd9790d1d912209f77e6c5c2d80f2e0c6fa7d2375be84e6ae298195, content: 'Westminster Abbey, formally titled the Collegiate Church of St Peter at Westminster, is a large, mai...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=fc044b365897d01d69c22cfef5c40f02192afa5d398b578e50815397713ab782, content: 'According to a tradition first reported by Sulcard in about 1080, a church was founded at the site (...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=82182ae8ae2af24e7af740145d81a481db0765ce38c8892cd47c25e8fe59ad18, content: 'The first reports of the abbey are based on a late tradition claiming that a young fisherman called ...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=a01cb34bc086801af1200738354c40f48c42321af85a3e75193c55601ac72763, content: 'Between 1042 and 1052 King Edward the Confessor began rebuilding St Peter's Abbey to provide himself...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=8c497e5c4898558590a1ff723964d89c6bde4577198d096fcb6bcde552d9ff49, content: 'Since 1066, when Harold Godwinson and William the Conqueror were crowned, the coronations of English...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=1ed828c5d715df8949aecab79349aa575bcecc10c5562e9b37cc86c073293109, content: 'The only extant depiction of Edward's abbey, together with the adjacent Palace of Westminster, is in...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=536c4e52cc4267a61897360af04f2ab99c32ab4f4e26213aed68bdde41a2813f, content: 'The abbot and monks, in proximity to the royal Palace of Westminster, the seat of government from th...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=23321f355f5369b6146414aa10a95b923a0973d2a9eb59ec0567dc6c7baa7182, content: 'The proximity of the Palace of Westminster did not extend to providing monks or abbots with high roy...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=da388a32a32f3abfe55927aa8aeda28f6dc5e0d316fd5a56360bd79900925b71, content: 'The abbey became the coronation site of Norman kings. None were buried there until Henry III, intens...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=2603d2e62227e1a0a4250064606fbca76a3d20622f3eca8bf2e2f0778c4b48c5, content: 'Henry VII added a Perpendicular style chapel dedicated to the Blessed Virgin Mary in 1503 (known as ...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=bbfb779ee32e3441d8114038a97b8989822b25c9d9b07867e6addab882581e9d, content: 'In 1535, the abbey's annual income of £2400–2800[citation needed] (£1,310,000 to £1,530,000 as of 20...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=b518832dc8682db0968cf2a1717161e5e513b8e83163bba7b456d65d2a127648, content: 'Henry VIII assumed direct royal control in 1539 and granted the abbey the status of a cathedral by c...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=2fb6626af86809a503d195b5b73750c2f23bd98f5a284eb21a5f645766a762e7, content: 'Westminster diocese was dissolved in 1550, but the abbey was recognised (in 1552, retroactively to 1...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=61608c3f5b9aba43f84d5043b620062177f77f924bc5de7e5a3166310c2a7348, content: 'The abbey was restored to the Benedictines under the Catholic Mary I of England, but they were again...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=49b733ade25b4329e238ee34724631e8d864a01cb688a3e1a7f77b63abf4bcf6, content: 'It suffered damage during the turbulent 1640s, when it was attacked by Puritan iconoclasts, but was ...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=346d951c5fb6219a4dfad14b4352e12ec32e5c7ebb264ce3004c0e58f2a0f728, content: 'The abbey's two western towers were built between 1722 and 1745 by Nicholas Hawksmoor, constructed f...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=4222dd916066762183a58c724a05d5d560c87ca6901ff96eb314dd5e3246cec9, content: 'A narthex (a portico or entrance hall) for the west front was designed by Sir Edwin Lutyens in the m...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=6be8070e7a50f5fe7e8b058508662b6c3a52376d373f681111ea680d5bbe2220, content: 'Until the 19th century, Westminster was the third seat of learning in England, after Oxford and Camb...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=ed6d31a32d1b3b6229c16ef8023346ec778ea4eaeca427351c7bc8ab34b00878, content: 'In the 1990s two icons by the Russian icon painter Sergei Fyodorov were hung in the abbey. On 6 Sept...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=8d78a52e7fe9809060e870bcb72954d2416f22680b1d01477dc9a791e534b28f, content: 'Since the coronations in 1066 of both King Harold and William the Conqueror, coronations of English ...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=ba7efc3b7a78945368e240fc3a36857911bb025d2be5c0893a9a1bfe687b7abd, content: 'King Edward's Chair (or St Edward's Chair), the throne on which English and British sovereigns have ...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=306cc95d9113697670df025c4aa3dd0323b0674281fec25980610e9e9c8c4347, content: 'Westminster Abbey is a collegiate church governed by the Dean and Chapter of Westminster, as establi...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=ea90e2d51ca5e166cf784343cc1f9c3ca31a22af4449401f7640f62d5416ed8f, content: 'In addition to the Dean and canons, there are at present two full-time minor canons, one is precento...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=a06373b29a06b2c815c3e218a41114934424d41ca9c6d9642b1ad4f4309c0cfe, content: 'Henry III rebuilt the abbey in honour of a royal saint, Edward the Confessor, whose relics were plac...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=0c2713b2cc623d1e55b90bc57005726f6d724a1ae6db4876707eba0104d9ab59, content: 'From the Middle Ages, aristocrats were buried inside chapels, while monks and other people associate...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=9c119e063c306a0c93c3193e63b1c98da9fec2a16675bcec0c1b75eb6e7a3f3e, content: 'Subsequently, it became one of Britain's most significant honours to be buried or commemorated in th...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=e5e8cbb0feb61ec93842fcbe41a313b8b210d87069364b70cd07e6be5786ebe7, content: 'During the early 20th century it became increasingly common to bury cremated remains rather than cof...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=5e5a0ad7d2dcfd171e2d33d9eca5db0034b82d8118034c7a77087c8b93e5a9c3, content: 'In the floor, just inside the great west door, in the centre of the nave, is the tomb of The Unknown...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=4a573678ff518f511374b98393f6b4fc38e748c5e77de24e4b1c37194e074d92, content: 'At the east end of the Lady Chapel is a memorial chapel to the airmen of the RAF who were killed in ...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=b2f39b4b87d3b76f22dfc72ced94342665af7e3cf0c3d5366fdf9a2a206da566, content: 'On Saturday September 6, 1997 the formal, though not \"state\" Funeral of Diana, Princess of Wales, wa...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=aa5a8ea3987e5a0824df662586a9626651007820bb67ed38e372d0f8e02df0b1, content: 'Westminster School and Westminster Abbey Choir School are also in the precincts of the abbey. It was...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=dc255681da411dff36639c7f8cfe50ae94c4d4ad15fdf73fcf19593055d2fc48, content: 'The organ was built by Harrison & Harrison in 1937, then with four manuals and 84 speaking stops, an...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=b3f8ee55d700d931f0642452262c6ab1ac67a987a893f2c2c5bd641ff4b29c51, content: 'In 1982 and 1987, Harrison and Harrison enlarged the organ under the direction of the then abbey org...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=6c2d5363805c1f5442cde4cbbe2ac1d5ca41931179c8dfa010601922ab65af3c, content: 'The bells at the abbey were overhauled in 1971. The ring is now made up of ten bells, hung for chang...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=7221413a830df48baac6b0e7068227852daae0036fd5bd727a298d64a29d5167, content: 'In addition there are two service bells, cast by Robert Mot, in 1585 and 1598 respectively, a Sanctu...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=362500091a3cfcec47e2b0b28f92fb9ee6fd66882e22f4350b9610fbb7995559, content: 'The chapter house was built concurrently with the east parts of the abbey under Henry III, between a...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=d9e46be51de3af8787aeaf101305d3408a9dbef20577f158ceedfa07b679fa89, content: 'Inner and outer vestibules lead to the octagonal chapter house, which is of exceptional architectura...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=961e47a8c76afdf8d5e87c88763ecb4f37d20366832122ac449e97296571f7c6, content: 'The chapter house has an original mid-13th-century tiled pavement. A door within the vestibule dates...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=59aa1003952752235f970ff8769325aabba542852dfec3c274cc8b05e36b9a87, content: 'The Pyx Chamber formed the undercroft of the monks' dormitory. It dates to the late 11th century and...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=9c8a1c88ecd34998a6f14ccabe13c3aa35f32e71a375d47c46875d7d5aaa15b2, content: 'The chapter house and Pyx Chamber at Westminster Abbey are in the guardianship of English Heritage, ...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=2e54ac03958949a3bf352e34fb6f0dfd9e7d5547b9b6e0cead3c7d5eedd47b8e, content: 'The Westminster Abbey Museum is located in the 11th-century vaulted undercroft beneath the former mo...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=1ba82100b3899b44e920e193eaa49d3639a1e071d1e07b9b0e9368042b54d7f8, content: 'The exhibits include a collection of royal and other funeral effigies (funeral saddle, helm and shie...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=4997b77f5b46ad25410984aea72e7446fe142e72973b5b180307a5dc47218d1c, content: 'Later wax effigies include a likeness of Horatio, Viscount Nelson, wearing some of his own clothes a...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=5a08d7180a25ec358a4e73393b4487aa0fc0924190c0abd9d1ac1f3d5d884ceb, content: 'A recent addition to the exhibition is the late 13th-century Westminster Retable, England's oldest a...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=3f0bb704303a93996b6f6fc6f217176457ac155628f051bfbe76799e10b5627c, content: 'In June 2009 the first major building work at the abbey for 250 years was proposed. A corona—a crown...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384), Document(id=bd89e27b2bf34a5d387bcd6af70b2386ba401a54172457ef58d030eb50bb13e4, content: 'A project that is proceeding is the creation of The Queen's Diamond Jubilee Galleries in the medieva...', meta: {'name': 'Westminster_Abbey'}, embedding: vector of size 384)], [Document(id=d920839dc867c08a29b7fce2711f7b008243f7ba32040b64345b7099b2a93c94, content: 'A capacitor (originally known as a condenser) is a passive two-terminal electrical component used to...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=da81fa9661a49674dc5b84b372eeb83e0514dca95e98ca6dfdfa6d5b2b781b5b, content: 'When there is a potential difference across the conductors (e.g., when a capacitor is attached acros...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=48395d2f5ac3adeb8b280240d021f5a974b52eda10a42302d9a4cfe00e998a14, content: 'In October 1745, Ewald Georg von Kleist of Pomerania, Germany, found that charge could be stored by ...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=bc5b06074e6f91c4a2ed6860814b3616a4048c111f017b6b4617a0192c47630c, content: 'Daniel Gralath was the first to combine several jars in parallel into a \"battery\" to increase the ch...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=465a501cfef2fa7b1fb617b21da7cf2def2db6fe83a3e7df8518e193fca927bf, content: 'Since the beginning of the study of electricity non conductive materials like glass, porcelain, pape...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=bc25140fc6091d13791d2310eddabf36e200ee1fc62d15e0d30a6d5fd9e39038, content: 'Charles Pollak (born Karol Pollak), the inventor of the first electrolytic capacitors, found out tha...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=ab4ac4350b281ea27dc918e9b1284506d32693d5c717bb601cefb29610076765, content: 'Last but not least the electric double-layer capacitor (now Supercapacitors) were invented. In 1957 ...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=2ea4c536b1a029ff296bccb0ce443c9d612a48d9388b1bfca5b070efffca423c, content: 'A capacitor consists of two conductors separated by a non-conductive region. The non-conductive regi...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=443eb257f9f8f786fc1ec700dd2dc62af0e9917763aa2c87a104b15b5b78aa81, content: 'The current I(t) through any component in an electric circuit is defined as the rate of flow of a ch...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=99ade9a42bf2cdbff39f19dd7397c6ca3d807f1af14e71c4e2d01ceddd11b78a, content: 'The simplest model capacitor consists of two thin parallel conductive plates separated by a dielectr...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=c1cef6f1e94e058f43a550509c5b672b01b8291709469897e3953b6c98650a88, content: 'The maximum energy is a function of dielectric volume, permittivity, and dielectric strength. Changi...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=b937a0953dc9bb291b1a8b1247143277927336bcc428cae3b8b825020e2efa01, content: ' Capacitors deviate from the ideal capacitor equation in a number of ways. Some of these, such as le...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=5897521e8e5dfad9a4b7fffc75c5fc0e8f7d5b45f4bec3455ec414bb1e1321be, content: 'For air dielectric capacitors the breakdown field strength is of the order 2 to 5 MV/m; for mica the...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=1da2b4c08ab8f2e3f40eed7cbdaecfc7fb4c8e4ad6694f03e184c6ffd64b9609, content: 'Ripple current is the AC component of an applied source (often a switched-mode power supply) whose f...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=5b375172950d66d684597d1ae0491b2088a3bd5d5d7f8d6ef3bf11d16c7af16e, content: 'The capacitance of certain capacitors decreases as the component ages. In ceramic capacitors, this i...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=de362f16360a95bddd4cb38e33274a4c0c4d396b8b4442dc6f6e715bf8b4a3af, content: 'Capacitors, especially ceramic capacitors, and older designs such as paper capacitors, can absorb so...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=60584984aa19621433108dece9e4f2aa1a799e19b6940b602b349edcbffb670a, content: 'In DC circuits and pulsed circuits, current and voltage reversal are affected by the damping of the ...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=50c090a788a179f316022082c9e41bbd6a9b0dd7fc28027fb7a6449bdefebba5, content: 'For maximum life, capacitors usually need to be able to handle the maximum amount of reversal that a...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=55ea5e8b3fd90891e10a6ce961e008682d489036076ebf3d2d269c437d56aada, content: 'Capacitors made with any type of dielectric material will show some level of \"dielectric absorption\"...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=d9eb32c64446159a2cf63975232e0a0fcab686d34c9599cdebc260225f334813, content: 'Leakage is equivalent to a resistor in parallel with the capacitor. Constant exposure to heat can ca...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=4d2c09385123aed88ba0b7b0dba3c105846d599031fbd01671f155bc78a379be, content: 'Most types of capacitor include a dielectric spacer, which increases their capacitance. These dielec...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=79304bab4217ec78c11066faf42660cd9839153ace48aa30464f3573e7926630, content: 'Several solid dielectrics are available, including paper, plastic, glass, mica and ceramic materials...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=cca4ed3811abbb931e260ecf827f0b06fa2191c154a0d91869612ff9495e2387, content: 'Electrolytic capacitors use an aluminum or tantalum plate with an oxide dielectric layer. The second...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=b2311f932d54cfe98e1230305534842bae91dd25a5355ef88e2c24cbd42183c9, content: 'Several other types of capacitor are available for specialist applications. Supercapacitors store la...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=21d2375fb6c37019d17d6cc7d39d4a3ad240a771381e329cf8c337fe4c67cabc, content: 'If a capacitor is driven with a time-varying voltage that changes rapidly enough, at some frequency ...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=88653d58e68d8fc332354073a0438d65fa6219e1d4a38c228fb85e2c19bc461b, content: 'where a single prime denotes the real part and a double prime the imaginary part, Z(ω) is the comple...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=96d3fc669ec9ce838cfe413aa6d86a51abd6527047fa9aab609f65eaccd2e1d3, content: 'The arrangement of plates and dielectric has many variations depending on the desired ratings of the...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=9bba7008ef0cf2aac37ba56b57698e0b765b6c588875468769a8ee0008cad861, content: 'Capacitors may have their connecting leads arranged in many configurations, for example axially or r...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=e8564212cb82a32385d8577006f7d165ee8dfc7e8a35527b8e539e293e411661, content: 'Small, cheap discoidal ceramic capacitors have existed since the 1930s, and remain in widespread use...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=d6026e0d1e011caccc4be3a4b6cf9c321555d2c594e750c2bfaefc88103d0ba2, content: 'Mechanically controlled variable capacitors allow the plate spacing to be adjusted, for example by r...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=fb30e092635639898a131878bf1949e3763e424c3ed942820c10ac9a3211da3a, content: 'Most capacitors have numbers printed on their bodies to indicate their electrical characteristics. L...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=d79a86b0184c09951952ed2575c6b3bf819940a0928b5dc47065b60d10d89312, content: 'Capacitors are connected in parallel with the power circuits of most electronic devices and larger s...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=a8663ad3652bff833491f714a7f7e7b14f6106f5d1f83de889adb036a050e062, content: 'In electric power distribution, capacitors are used for power factor correction. Such capacitors oft...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=c2da2672b482a632027575108d0127028cf587a7298b28af55351dcb6a024524, content: 'When an inductive circuit is opened, the current through the inductance collapses quickly, creating ...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=4641d427ea2cd572e9442845f5da81ea72adfdfe50baf457833ba20e7ca1c56c, content: 'In single phase squirrel cage motors, the primary winding within the motor housing is not capable of...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=69c362144a621b7a73e99c099a4c7fa8ea23b37babd37d1f9b10dba6e68e0451, content: 'Capacitors may retain a charge long after power is removed from a circuit; this charge can cause dan...', meta: {'name': 'Capacitor'}, embedding: vector of size 384), Document(id=60958655dabd08388c5557bb81766a4ba4ad4c324d1521d9938eb7cb0f396c5c, content: 'Capacitors may catastrophically fail when subjected to voltages or currents beyond their rating, or ...', meta: {'name': 'Capacitor'}, embedding: vector of size 384)], [Document(id=7d418f67489051800d9a51ff114aeb4ffc15cf759330f154eb0f0d8236c88472, content: 'A hunter-gatherer is a human living in a society in which most or all food is obtained by foraging (...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=001153e4d20aaa7c4b20fe1010595f9006d4670206354c378fb40fc600e78cb7, content: 'Hunting and gathering was humanity's first and most successful adaptation, occupying at least 90 per...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=4f383fe71ed391e095a555ebd50375a74415ce184ec8fd43a7a0a32557268509, content: 'Only a few contemporary societies are classified as hunter-gatherers, and many supplement their fora...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=e67fb98f358c1bf9a0831500204f5fbedfcf2f33130dd6f07d3d007f5465d861, content: 'In the 1950s, Lewis Binford suggested that early humans were obtaining meat via scavenging, not hunt...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=f5da700dcde0054afe72a6af2d636cdd52231ca83296d2240739d14e5257471a, content: 'According to the endurance running hypothesis, long-distance running as in persistence hunting, a me...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=1386793a4767d94c4ac46b6c7c0b8afc215d582c61ba069b591fa1e0c859ef5c, content: 'Hunting and gathering was presumably the subsistence strategy employed by human societies beginning ...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=3ec555c26f2193e9b14d6f554198a9b0004c0954211df5c4f42e4a3b2abb63db, content: 'Starting at the transition between the Middle to Upper Paleolithic period, some 80,000 to 70,000 yea...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=5639214d431891b7fa02153e604023eccb59da925a3d653b8e239b7d0dba1011, content: 'Forest gardening was also being used as a food production system in various parts of the world over ...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=306b8e4297dbb5df010f40d9c7cffdbf7489ab9de16278378fb456faeea46783, content: 'Many groups continued their hunter-gatherer ways of life, although their numbers have continually de...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=324d1ef99d4d1127bc7927e86c7d31ceb28b13f895b6e12fcad4ab115ebcac35, content: 'As the number and size of agricultural societies increased, they expanded into lands traditionally u...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=ab4a799ea88f187296109b60ccebc3bb2476737f6f6ec8732180af27e23e4faa, content: 'As a result of the now near-universal human reliance upon agriculture, the few contemporary hunter-g...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=2f7e510177fdd49ef144b119ee07951619e402fbccb23c2b9b24b423736375a0, content: 'Most hunter-gatherers are nomadic or semi-nomadic and live in temporary settlements. Mobile communit...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=54c3b6f8ad3d50e77f4aceca20bda128762e328b2353992c67e8c1c48ccc5a8d, content: 'Some hunter-gatherer cultures, such as the indigenous peoples of the Pacific Northwest Coast, lived ...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=a914d234043a55a16afa035856f78ed6f86529729a6976f57d82c7337e1f40a4, content: 'Hunter-gatherers tend to have an egalitarian social ethos, although settled hunter-gatherers (for ex...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=e1b170d070768820043fadd478b89d8802f9f00f60340be1e4d3acb6bcbb5d4b, content: 'The egalitarianism typical of human hunters and gatherers is never total, but is striking when viewe...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=b4328276b7f2e32f79b15f3e07ef76cc3b79b141a3b5b2c0f2af67b8975d384a, content: 'Anthropologists maintain that hunter/gatherers don't have permanent leaders; instead, the person tak...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=db92f120c50e02fdad8a305f1bb2e37cd537066653f20810fef8667184b25eb3, content: 'It is easy for Western-educated scholars to fall into the trap of viewing hunter-gatherer social and...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=fc38ed3a4223e55930472356979b6e8e371efd52565cc92024d9cd83f5188397, content: 'To this day, most hunter-gatherers have a symbolically structured sexual division of labour. However...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=a2786eda29910df537f4b5e18d3f8f09448db21a977c94b955ea02be1a5a7ca5, content: 'At the 1966 \"Man the Hunter\" conference, anthropologists Richard Borshay Lee and Irven DeVore sugges...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=678e17e7a74f8b6de7a92e5f93ab2a50123ca063f660bdae265cc5b62b6e4094, content: 'At the same conference, Marshall Sahlins presented a paper entitled, \"Notes on the Original Affluent...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=17285f18b976b5beef7fd4e58562ab5c97b266130090c92fadc72ffdf5b85145, content: 'Mutual exchange and sharing of resources (i.e., meat gained from hunting) are important in the econo...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=f5abf24f2cea6d648c0616817e67055e46c9d80fe20c92b907496af923019037, content: 'Hunter-gatherer societies manifest significant variability, depending on climate zone/life zone, ava...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=c26f6849c01561e3434f082be69d88d5958797a5c03be5393cd91f05666d70d3, content: 'One way to divide hunter-gatherer groups is by their return systems. James Woodburn uses the categor...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=4b3fc3642e2d6e9403a1e07ec5cf5f98e080f2fd386193ce270cd07875bcab37, content: 'Hunting-gathering was the common human mode of subsistence throughout the Paleolithic, but the obser...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=45e31feb034b4f47c1cc792952823ea0c2c0a9942694e02b02a938b3d28287db, content: 'The transition from hunting and gathering to agriculture is not necessarily a one way process. It ha...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=4300cb5bb29d1443a3938740c23d9aa73c5a9a22de0fe38e5f10a92ad651596b, content: 'In the early 1980s, a small but vocal segment of anthropologists and archaeologists attempted to dem...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=a26640ef0e495bd016718ebee138996423ca99d7b12688feefd2e2bb3f471c10, content: 'Some of the theorists who advocate this \"revisionist\" critique imply that, because the \"pure hunter-...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=6102b4429dabbef47eebeb7266fbe40c980672971830036261bc01e744305bf7, content: 'Lee and Guenther have rejected most of the arguments put forward by Wilmsen. Doron Shultziner and ot...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=b78b705ab5e606fcaa8371fac74c04d508e71d43c7a6c8e8d54db5201668b821, content: 'Many hunter-gatherers consciously manipulate the landscape through cutting or burning undesirable pl...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=dc9f7501b55257d8ca68801b4683d94d84ab42f1893ba0f9d96ee5abafa2bef4, content: 'Some agriculturalists also regularly hunt and gather (e.g., farming during the frost-free season and...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=d1b05e79cd6976fcfb50ac17361c94545aa74eab56b00374f310c48482c06b27, content: 'There are nevertheless a number of contemporary hunter-gatherer peoples who, after contact with othe...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=27e20620783d00e8edbb609adc53aa997523e153e8e24c640a6a3e4a77badf68, content: 'Evidence suggests big-game hunter gatherers crossed the Bering Strait from Asia (Eurasia) into North...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=edf7aad5df96c8198503bd4cc0aa7866ad8b85ebdf4ba53d674108f817799b58, content: 'Hunter-gatherers would eventually flourish all over the Americas, primarily based in the Great Plain...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384), Document(id=76fb79fe23f6ca1c8be39a14f5e26ae99013015935c458772bf157abeb91db55, content: 'The Archaic period in the Americas saw a changing environment featuring a warmer more arid climate a...', meta: {'name': 'Hunter-gatherer'}, embedding: vector of size 384)], [Document(id=0458176894954819c8c0ca1b62b9136355d134cbe609056044ece79e29ab49b3, content: 'Gothic architecture is a style of architecture that flourished during the high and late medieval per...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=a86edc4a2a5c9656a637986f411fb5730afa0c13f0e9606b983ff288c816d92d, content: 'It is in the great churches and cathedrals and in a number of civic buildings that the Gothic style ...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=f2b028ef3ad4a75c2da65efec695c5c48220695155f82b10bcfae09256a780b1, content: 'The term \"Gothic architecture\" originated as a pejorative description. Giorgio Vasari used the term ...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=232b7946959c56855f6c47162e984d5a9b4a85d71606679ec35b9d9e233f2e25, content: 'The greatest number of surviving Gothic buildings are churches. These range from tiny chapels to lar...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=115ba691a6b411168ea8ec8946d5d23703bd661036162c410d7e2ddab44101b9, content: 'At the end of the 12th century, Europe was divided into a multitude of city states and kingdoms. The...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=4fb52eb2a352efff726e4909c244560120ee51694dd981f2ae4f1c4683367024, content: 'Throughout Europe at this time there was a rapid growth in trade and an associated growth in towns. ...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=d169e69a6542e591741f98302ef01f78b43a2531f47d9aab72b52819f2c54f66, content: 'The Catholic Church prevailed across Europe at this time, influencing not only faith but also wealth...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=54e3d762c382a2887a5f3e4452149b9380e7427b0cb9b0a7ed65c701f91b9f3a, content: 'From the 10th to the 13th century, Romanesque architecture had become a pan-European style and manne...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=9e7ad829e8ed1ea815e24797caa7d7f95b7dc66f18861daa1c0716fd22c31e6e, content: 'In Northern Germany, Netherlands, northern Poland, Denmark, and the Baltic countries local building ...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=1a46df6f721a1e95dc655864649c1870216723ada6b69f751fb8e5fcf8198246, content: 'By the 12th century, Romanesque architecture (termed Norman architecture in England because of its a...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=c2fb9b8cb1e83b244b63640b18ca58f5304fe663c1c5d30148c5247b8d8a6089, content: 'It was principally the widespread introduction of a single feature, the pointed arch, which was to b...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=f2ce1a5d694bc1a331d4767bb8167d69267d61de5556f7179c64e8c92950ab29, content: 'The pointed arch, one of the defining attributes of Gothic, was earlier incorporated into Islamic ar...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=23aa1f4f96c5a67235b1c5379da9cc1d9246ed4128e111b8f5b254db85f42307, content: 'Increasing military and cultural contacts with the Muslim world, including the Norman conquest of Is...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=de85f6a32990fe7fb5de5191f8411ca3d5ac24536e2ea4a1595eedc62865877c, content: 'The characteristic forms that were to define Gothic architecture grew out of Romanesque architecture...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=e1919a1ea5d2f00b4aef390fccfa778131fa4822cb769219f57e0ce9ca483e3f, content: 'The Basilica of Saint Denis is generally cited as the first truly Gothic building, however the disti...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=b7005be8a2caad26e71f39a2333e1537745bf69f6fb1f66d9972676f10fc69e5, content: 'At the Abbey Saint-Denis, Noyon Cathedral, Notre Dame de Paris and at the eastern end of Canterbury ...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=443ac64c82327ff4e12ef2be35d5afa964e65b118b82a4e42533b43d20127fad, content: 'Suger, friend and confidant of the French Kings, Louis VI and Louis VII, decided in about 1137, to r...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=50bb82079c22c3eaddb6b4a524ba143a28f3798d8a28c6f38d9f8a58c95fbc83, content: 'At the completion of the west front in 1140, Abbot Suger moved on to the reconstruction of the easte...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=e603aa2bee8b86c7af8e5686c698a2eb96a9d6ffe1309b4821f2c9a15932e21b, content: 'While many secular buildings exist from the Late Middle Ages, it is in the buildings of cathedrals a...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=d8f601cc64c8c90c3b8bde84f1ba2c468b8c70c0b1d5fe95ef4196316207adc8, content: 'The eastern arm shows considerable diversity. In England it is generally long and may have two disti...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=8d2aa9413333c155dd685033a5baf653a225532347044d1ee0f677211b792381, content: 'Contrary to the diffusionist theory, it appears that there was simultaneously a structural evolution...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=1a9fa44a402a19573fb1e4d673f429fb126291692c134442175641e76ba737b1, content: 'The Gothic vault, unlike the semi-circular vault of Roman and Romanesque buildings, can be used to r...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=cf915fe4b0156edf7ceaf7d96b41e426a19c227eddf9c4aa5a46ec04c321ede3, content: 'Externally, towers and spires are characteristic of Gothic churches both great and small, the number...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=af948872208401cb21a81a2b3195309ed925be76c3960bc55bee9322154a6755, content: 'On the exterior, the verticality is emphasised in a major way by the towers and spires and in a less...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=e18b636a03207454ef8ce75c898356aa9c9b99f30da93a6c9803434244a06119, content: 'On the interior of the building attached shafts often sweep unbroken from floor to ceiling and meet ...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=148da740b8fcd83681cef668b72935f3d22290d9eb5c7c8f4a5819ac3c030ba9, content: 'Expansive interior light has been a feature of Gothic cathedrals since the first structure was opene...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=5b270b1ca2589073465e1ff3fcef2975dcde1d7cc9f7843c9ff8ba5a8f2ada91, content: 'Above the main portal there is generally a large window, like that at York Minster, or a group of wi...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=5749bece17c0d20f5cec9bf911fef34ab9ac08fca7af35e5514d707e2ae76e4a, content: 'The distinctive characteristic of French cathedrals, and those in Germany and Belgium that were stro...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=398174b217f847d3118f14d9fc8a8cb01befaa7f7508c246162baa947136696c, content: 'The distinctive characteristic of English cathedrals is their extreme length, and their internal emp...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=fda60fba40916cdcfdc1d750e81a1d4d3d29784c2db037a9c4aa869271ca6dc2, content: 'Romanesque architecture in Germany, Poland, the Czech Lands and Austria is characterised by its mass...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=dd55ef7166bee176465dcad4e59fec46f7c8020705dd8ffde7dc017a468495eb, content: 'The distinctive characteristic of Gothic cathedrals of the Iberian Peninsula is their spatial comple...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=ac763d788584ef95bc660adf16fc9056312211e226210c329aa5ff222485f949, content: 'The distinctive characteristic of Italian Gothic is the use of polychrome decoration, both externall...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=8b2182b3d9049a00459141c3e8d519238bdb47c1bf91d5bd4d799b3085e44435, content: 'The Palais des Papes in Avignon is the best complete large royal palace, alongside the Royal palace ...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=85656eab2c4daf97e1d30902b37899518c83295fe7d7eb37668f83c6399b39eb, content: 'Secular Gothic architecture can also be found in a number of public buildings such as town halls, un...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=c5339b59c77ccc464afe7b13fbd7d40fd0a851e7f721612376d2e6ac7807f258, content: 'By the late Middle Ages university towns had grown in wealth and importance as well, and this was re...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=e8185885f614e9e6b8fc0c296c3ee1fd6d829acd6b4dbd090ac0f1845200256c, content: 'Other cities with a concentration of secular Gothic include Bruges and Siena. Most surviving small s...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=9f6f4648d7213c294181ee8acb59b2b8974306ae7a12d7fe4f2fa61d9578bc5c, content: 'In 1663 at the Archbishop of Canterbury's residence, Lambeth Palace, a Gothic hammerbeam roof was bu...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=4c1ccbfe113ec999fde23d47a8ad269bd76668fa5b4c9bca52e1a86918e9780c, content: 'In England, partly in response to a philosophy propounded by the Oxford Movement and others associat...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=fdc5286ee448bea4162c0797a3cb1ab1924deb08bb7dba7494bccae1dc7610a4, content: 'The Houses of Parliament in London by Sir Charles Barry with interiors by a major exponent of the ea...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384), Document(id=1672b7287f685fd1cd3f8c5eae615ee89595475a478ee8e41748f2dbb1e1dd93, content: 'In France, simultaneously, the towering figure of the Gothic Revival was Eugène Viollet-le-Duc, who ...', meta: {'name': 'Gothic_architecture'}, embedding: vector of size 384)], [Document(id=1534894464c9ac5538580b09cd42549863a9ec6a92f3b44ea740a8294d2d0030, content: 'Originally based on the English alphabet, ASCII encodes 128 specified characters into seven-bit inte...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=f347980ca814ca533ebc525e71f7ddc1b14020a5914e0e985018f458850c0559, content: 'The code itself was patterned so that most control codes were together, and all graphic codes were t...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=d2475ef6c2938069934b599fb7d3ff9f05f88d3b18986e1b4aa547740f43349f, content: 'ASCII was incorporated into the Unicode character set as the first 128 symbols, so the 7-bit ASCII c...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=fe440627c06652056fd7b2385c83434320fd44bdce3bee39db863d915d8bbfe4, content: 'When a Teletype 33 ASR equipped with the automatic paper tape reader received a Control-S (XOFF, an ...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=9912c80740f55dded9425b46e507c78952544c9fd2f24588e3a010eb5d73226d, content: 'DEC operating systems (OS/8, RT-11, RSX-11, RSTS, TOPS-10, etc.) used both characters to mark the en...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=63723845bd1f0e068e7508d50b5f957a140438d3263e640287c8d5f66a7b66f5, content: 'C trigraphs were created to solve this problem for ANSI C, although their late introduction and inco...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=7637ec04bb3c0fe98f59925428c8e8831f9c75cb312f00275da9acee213a2da8, content: 'The X3.2 subcommittee designed ASCII based on the earlier teleprinter encoding systems. Like other c...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=97a6e3ddbe58f3c86c1e88354064763fc98f18322946ff203d3f60288d6780e7, content: 'ASCII itself was first used commercially during 1963 as a seven-bit teleprinter code for American Te...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=562318592f7814169984456f858ce6ced57af54ff121bb5030b87c1d898ab6aa, content: 'For example, character 10 represents the \"line feed\" function (which causes a printer to advance its...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=2838f4615a82a56b9bb9ffcfee3e618d71d28bb06adee6ebc9616d805d2ee3b5, content: 'Some software assigned special meanings to ASCII characters sent to the software from the terminal. ...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=a8af7e2fc6a46f231e22e94eab5454a576f003a64a2bf0e4b04619af4adcce8f, content: 'Computers attached to the ARPANET included machines running operating systems such as TOPS-10 and TE...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=c6a620dda2ff5278526d81731fc84ccf54f8e326d01d53306429f41a2efed0d1, content: 'From early in its development, ASCII was intended to be just one of several national variants of an ...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=89a6b0e1a1704a1d318868daf7026b88fb21e4d9da92e5b2ead54799b94c92d9, content: 'Most early home computer systems developed their own 8-bit character sets containing line-drawing an...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=85ff239cf783e941d6286ef346369b62301d3ca435194bc0670f48e9ed1fcec8, content: 'ASCII (i/ˈæski/ ASS-kee), abbreviated from American Standard Code for Information Interchange, is a ...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=3128632c197721bc63795d0771565f12887b9aeae116a773e7dbf660553f9a3f, content: 'The committee debated the possibility of a shift function (like in ITA2), which would allow more tha...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=3c04fe8ce1041a827bb5dff88dac07312dfdd34f29a3cf3a483d95a70dcf1277, content: 'Many more of the control codes have been given meanings quite different from their original ones. Th...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=38d36c021c84092657a50de06c3eed1550724e9271ee6c6c38d0e4434f3f1607, content: 'Older operating systems such as TOPS-10, along with CP/M, tracked file length only in units of disk ...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=0091a855d313bb07cbc468008959839dbb6f4b0a9c9a57520a90ca865fbfa78a, content: 'ASCII developed from telegraphic codes. Its first commercial use was as a seven-bit teleprinter code...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=6382ecc16a0dc1460c9b297a6862fc0bfcc7a3285aadaf120b8ea9fe59f151bd, content: 'The committee considered an eight-bit code, since eight bits (octets) would allow two four-bit patte...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=60d1bb0e73eea8af6e35be382d349c0ecdab9bdf25431a893cdb9d1f1c2e1b1e, content: 'With the other special characters and control codes filled in, ASCII was published as ASA X3.4-1963,...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=f84e0ce59a7c67f99ed850515f3f1ccfbf90d938d8cf110e9ce628b5e367de14, content: 'Other international standards bodies have ratified character encodings such as ISO/IEC 646 that are ...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=1f8c49881a880fea61d07b4a7bd7d49be32f92ec5446624cd215cd7ac96f2d4c, content: 'Probably the most influential single device on the interpretation of these characters was the Telety...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=7c052d0ce1aff3a0d48f91bd4327c855bda97a27cab75a64d8c00beb33af3095, content: 'The inherent ambiguity of many control characters, combined with their historical usage, created pro...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=65c689b90206111f608124cca71a52e436f3595d53bf6773c20038453577e337, content: 'Many of the non-alphanumeric characters were positioned to correspond to their shifted position on t...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=47fde94a5ca6f5ac9b73333200d92b883348e4a9bfbbbd14499c22d27baee11b, content: 'Code 127 is officially named \"delete\" but the Teletype label was \"rubout\". Since the original standa...', meta: {'name': 'ASCII'}, embedding: vector of size 384), Document(id=b9badcd7cbce18254aa5a13d0619230995095c4d9150a1cf52d7b3e1e301a05d, content: 'Unfortunately, requiring two characters to mark the end of a line introduces unnecessary complexity ...', meta: {'name': 'ASCII'}, embedding: vector of size 384)], [Document(id=8c24e6d733aeadab50bdd7af41b53a97690f458a91133e5c85260bf5b43a1043, content: 'In 1790, the first federal population census was taken in the United States. Enumerators were instru...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=c032a24951952f951130cd0cd9a6a4a02cf620aa835634fb696f5e377ef6f9c8, content: 'By 1990, the Census Bureau included more than a dozen ethnic/racial categories on the census, reflec...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=f2a01c7e3216212f7447ffa022e2b406114b4f6a3bd80e7c3c0cde2489a2c8a0, content: 'Americans with Sub-Saharan African ancestry for historical reasons: slavery, partus sequitur ventrem...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=8b6f5d8d2bfeb762732c30a1202d7de36fe0ee4f44a29206c197fa333d88d1d4, content: 'After a lengthy period of formal racial segregation in the former Confederacy following the Reconstr...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=f5d8f359ae48f42b324892167085a5e7a530d5e80a5985aca2a33de10440304d, content: 'Anti-miscegenation laws were passed in most states during the 18th, 19th and early 20th centuries, b...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=1af97a815542cb65794efde835c98a9157a51b18b3261b5883b6c53db916bb12, content: 'After the American Revolutionary War, the number and proportion of free people of color increased ma...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=feb17da98957c0b20ccff7054a8662ae77292f64991b18f9e202cfd776e66702, content: 'In their attempt to ensure white supremacy decades after emancipation, in the early 20th century, mo...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=0a4b67a8c0888961593278bc1a87b0933da1c62dc0ce2455ec2d8bd7664ea6ba, content: 'Multiracial Americans are Americans who have mixed ancestry of \"two or more races\". The term may als...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=e8ca93ccf9a4e7b03260ad0077a5ab4d2f8285b2719ee9f8f400ba49d95bb8f7, content: 'The American people are mostly multi-ethnic descendants of various culturally distinct immigrant gro...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=ad542990e6052198b8c14c8e7db6e6a746aa3632c1a71be034a3671a8546fb31, content: 'Some Europeans living among Indigenous Americans were called \"white Indians\". They \"lived in native ...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=d2ab2154790eff4e57eddba7403d78b53684bffbd21322a4fc2c00bdd4912605, content: 'In the colonial years, while conditions were more fluid, white women, indentured servant or free, an...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=c4ba786d1ade53f542b48c5e1f012c93cbc8cccfaf05c44e31c4bb8043350e82, content: 'Sometimes people of mixed African-American and Native American descent report having had elder famil...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=ade7078de68873286cb259501fc3f551ec2dc249a565518c626f3703f9964775, content: 'During the 1800s Christian missionaries from Great Britain and the United States followed traders to...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=423195f4ebce58567f077e0fadca8fd6c99b4b3e1627535af8ea4986e87a0413, content: 'Racial discrimination continued to be enacted in new laws in the 20th century, for instance the one-...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=04905eca4f56392ceb6d9cd6946836505423e4f18482523e8a7e6d8e43771bd6, content: 'The phenomenon known as \"passing as white\" is difficult to explain in other countries or to foreign ...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=b20e62241b81d85ce7628f6d0a59b107bacefbdeeffce528c0d48d1ece6c1d74, content: 'Population testing is still being done. Some Native American groups that have been sampled may not h...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=bb75019980b9d539b94506685a23ecc58d178cff26a85359d26492e71d4f3883, content: 'Some multiracial individuals feel marginalized by U.S. society. For example, when applying to school...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=6dc96ef37b96343124094fc7386ddd080ab25bdcba6613a067682d57fa0b838f, content: 'Prior to the one-drop rule, different states had different laws regarding color. More importantly, s...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=21eedab21de04e102ebe2e79c71673d54f10dfd1f07d3388633e0fbf0c441e40, content: 'Since the late twentieth century, the number of African and Caribbean ethnic African immigrants have...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=abd17e340c65bec19eb1a5a8c2d9a4ff8c1b52a398ed456f0b82c236c7849ee5, content: 'In the 1980s, parents of mixed-race children began to organize and lobby for the addition of a more ...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=a5527faa88330f00f2bd3194e081bda0d873f5bf94726cd4984d136dc0314cf0, content: 'The social identity of the children was strongly determined by the tribe's kinship system. Among the...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=06ec00be4fcb51427d364be2c5a95258fbdb13375b95d5db778bca3c40b081d4, content: 'In the late 19th century, three European-American middle-class female teachers married Indigenous Am...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=e3408e0d4e57b5f4461911f1f3025a6f33c2f6cc6c73e07630d0b8ec1aca0e73, content: 'The writer Sherrel W. Stewart's assertion that \"most\" African Americans have significant Native Amer...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=ee3799b9f54bbd855483f19903f78bfad1228434a90dab6fc676ec7bbc5dd509, content: 'Interracial relationships have had a long history in North America and the United States, beginning ...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=b5b8ae4ba455af2572ffe173c3678aa0266fe594a8135005ec368f8d2e0147f4, content: 'Of numerous relationships between male slaveholders, overseers, or master's sons and women slaves, t...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=8cb5d53a259a5be471c96bae513167ae065338b08f49efaaad50564b0acd7d0f, content: 'After the Civil War, racial segregation forced African Americans to share more of a common lot in so...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=e1502a550c73c8245a495ade11393c3bb213236ac66a0bc067a669a9b2a98a73, content: 'Chinese men entered the United States as laborers, primarily on the West Coast and in western territ...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=053f7a28840f37c7648a66aca0e3b1f2bacf0a9c4eb7e3e9a13f176a2e32425e, content: 'Multiracial people who wanted to acknowledge their full heritage won a victory of sorts in 1997, whe...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=cae4ff1587faa84478e1e8a4b7f5ad91b51802a29a45318dc38366edf07185cb, content: 'Laws dating from 17th-century colonial America defined children of African slave mothers as taking t...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=2dc9a78d24a6f07c3491d31528997b0c85be530b1280fc8a0e40efc79450b603, content: 'Reacting to media criticism of Michelle Obama during the 2008 presidential election, Charles Kenzie ...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=989f5500002032c4f0362d21efa0600025988e5ec0ad25e2abc2c8b6d6e26db3, content: 'Some early male settlers married Indigenous American women and had informal unions with them. Early ...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=4d19ac5553a481eeade78ce14816b8d993c695c2b330523c0f4a6d4d36b720ec, content: 'Colonial records of French and Spanish slave ships and sales, and plantation records in all the form...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=e17759fd5058d2fb1d253c6019883914410cb16ce44167cbbe0a0f7763269752, content: 'European colonists created treaties with Indigenous American tribes requesting the return of any run...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=1a1e668ac012358c28517ddd1a169ba51a43e1289ccbb6b6181f182065a193bd, content: 'Interracial relationships, common-law marriages, and marriages occurred since the earliest colonial ...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=e351b06b5542426bc6089158acec891955493261984734e86056db725ef746e1, content: 'Many Latin American migrants have been mestizo, Amerindian, or other mixed race. Multiracial Latinos...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=f8e5401d9fb4bcf2a1f6e9c73f50586cb90bd5d04ce89237f6f1d8dcdae99d61, content: 'In Virginia prior to 1920, for example, a person was legally white if having seven-eights or more wh...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=8ebc59a36ac698bc29f38175dbf46539711c8403a08c5ae2c19d9d590fe8c89f, content: 'Stanley Crouch wrote in a New York Daily News piece \"Obama's mother is of white U.S. stock. His fath...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=be97d5b22bbf9830ecf1b025c8922048916b13546da8ef2ef73927d0794d216d, content: 'The 2000 U.S. Census in the write-in response category had a code listing which standardizes the pla...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=2d40277851878c89403a26757d55d0d5a5e10f550f63600882b842066af022b2, content: 'Interracial relations between Indigenous Americans and African Americans is a part of American histo...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=15020b05f8dc3e08a8e4b0da646bdc6f538721c96b31d25bc6655c7bc8a48649, content: 'Some biographical accounts include the autobiography Life on the Color Line: The True Story of a Whi...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=916eaa441e09df05ce18dce913fc412b950d802f99102d54b2ee9332e4e3eab9, content: 'By the 1980s, parents of mixed-race children (and adults of mixed-race ancestry) began to organize a...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=fac7c33fc3e16c883b6fd05cd685a5546c9c0d1920cbf6a5cad1317567c7058d, content: 'In the early 19th century, the Indigenous American woman Sacagawea, who would help translate for and...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=2fad40e7c2c95abf5c17f7932629d88074cf3d8b292e53186d4511a66afd0e8b, content: 'For African Americans, the one-drop rule was a significant factor in ethnic solidarity. African Amer...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384), Document(id=40da6419671a37e113017506cf82d6b97a6a262df7d32a82e63ca2d0fc487175, content: 'The figure of the \"tragic octoroon\" was a stock character of abolitionist literature: a mixed-race w...', meta: {'name': 'Multiracial_American'}, embedding: vector of size 384)], [Document(id=aa943e6f5d8f0a956d75cdda21f9115d97057a3cbe4c09d02819a57fa89ceb00, content: 'Protestantism is a form of Christian faith and practice which originated with the Protestant Reforma...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=abcaeb16916cf70fba904fb484f7da8505b7f864ecb3ed7636312dbd9f3e50f1, content: 'All Protestant denominations reject the notion of papal supremacy over the Church universal and gene...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=b7992d559ee50a4e11fba9722c5938869c9ac2773ca798bbc0028efc139ce49b, content: 'Protestantism spread in Europe during the 16th century. Lutheranism spread from Germany into its sur...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=0f316f342ce9fa519146e96836b0492a97ca33e352a38bbe45b667f95af960af, content: 'Collectively encompassing more than 900 million adherents, or nearly forty percent of Christians wor...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=95745a5044a553ba0d0faad2711e71de734804f02bc95604ae39ad63809524ce, content: 'During the Reformation, the term was hardly used outside of the German politics. The word evangelica...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=7654d406343941b9cf30889c730c46b66eb1f0d63c975e528c84902a9c09d66d, content: 'The use of the phrases as summaries of teaching emerged over time during the Reformation, based on t...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=fe304cc50e045c24097726e0dca1cf5f331a3699b7f910c95791e2343661798a, content: 'The necessity and inerrancy were well-established ideas, garnering little criticism, though they lat...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=18ad295be8ca3940bdec36c9a95ea2104108ce62238cd37b4c3a7ffc392a8a3a, content: 'The second main principle, sola fide (by faith alone), states that faith in Christ is sufficient alo...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=7cd21a4f1d9ca7c6dca6565ad70cad6640324f135a1507baccf5d642b35559e2, content: 'The Protestant movement began to diverge into several distinct branches in the mid-to-late 16th cent...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=1dfcb4740244b4f3e53e7d0c0c553f1cf03ebd5db1415c279d019d6530e5b3f4, content: 'In the late 1130s, Arnold of Brescia, an Italian canon regular became one of the first theologians t...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=672d7493ac7cb72fbf4bb9e2b6e446df2296182ed71620ecf5177a659ef0b65d, content: 'Beginning in first decade of the 15th century, Jan Hus—a Roman Catholic priest, Czech reformist and ...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=7e40a23ffb0517e49cb36dda1152df63eaeb218105f4928f4e7360617526a240, content: 'On 31 October 1517, Martin Luther supposedly nailed his 95 theses against the selling of indulgences...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=a095813703e1c1dcee6a09e797e824585238d86bced6ed262e6b28b3f9f72c78, content: 'Following the excommunication of Luther and condemnation of the Reformation by the Pope, the work an...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=f89c142105559a0f9490350303e49c72ab5a9cb0f67e7bca2374f78fde1188d0, content: 'Protestantism also spread from the German lands into France, where the Protestants were nicknamed Hu...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=cb9bb4597fa05cf8c3f96a08aa78a4683ebd7ba859832683b658529b5eec6dba, content: 'Parallel to events in Germany, a movement began in Switzerland under the leadership of Huldrych Zwin...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=224f9d0c5a8dcabe8467db6398b5b35739f0b2a27360044fcbda99a8e3bed535, content: 'The political separation of the Church of England from Rome under Henry VIII brought England alongsi...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=0d2e159deca5a0420f551df445830fa02f87751c42b3b8f43088e39f1ad4f75c, content: 'The success of the Counter-Reformation on the Continent and the growth of a Puritan party dedicated ...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=93384e106abe725b2233081557e22805ebd5a63353d7f8677ef88102cc6a7d5f, content: 'The Scottish Reformation of 1560 decisively shaped the Church of Scotland. The Reformation in Scotla...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=16cd4850246458c9b4abb3163a31e835413cfd323625639ac0fb116e89c4c027, content: 'In the course of this religious upheaval, the German Peasants' War of 1524–25 swept through the Bava...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=8d4e70b197019c8512c7b9a8ab249ed9bfb7531582447c632603e73dbcb4d23b, content: 'The First Great Awakening was an evangelical and revitalization movement that swept through Protesta...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=6112e442172490ed22e56a5e93353ce3aee10ab10d54834d00ce34954dfbb5bc, content: 'The Second Great Awakening began around 1790. It gained momentum by 1800. After 1820, membership ros...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=728934e764f65424ae0e8c616b8d35c93cf613a284b7f4071bb44529cb87e94b, content: 'The Third Great Awakening refers to a hypothetical historical period that was marked by religious ac...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=c41aac91701293d5c1bf36628b91afd7336881dfd6b85b957a1f840ccb91ac62, content: 'A noteworthy development in 20th-century Protestant Christianity was the rise of the modern Pentecos...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=1d0c70f7853b3e1a10b812286cc24f071aeb5f46e0ebba9f7e294335f81d301f, content: 'In the United States and elsewhere in the world, there has been a marked rise in the evangelical win...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=bc49763db44c4b5c03610dd754099e53d85b35614e392c0272fdac5985f5c14c, content: 'In Europe, there has been a general move away from religious observance and belief in Christian teac...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=3274ea2eed445415914b03ec1fe450c9749cb859788879763b58478bb91ef2c6, content: 'In the view of many associated with the Radical Reformation, the Magisterial Reformation had not gon...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=ca8270df1f3273a060a4bd86ce0fce109a8cabfec0bf40020db8885f1ede44da, content: 'Protestants reject the Roman Catholic Church's doctrine that it is the one true church, believing in...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=b1260b81a4b0f40938db51ae3b34a07d3e3b581b54611378b19b29ced73b0663, content: 'Various ecumenical movements have attempted cooperation or reorganization of the various divided Pro...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=e74077b6c0748455ab638445490a199fed136a1007098759e2f74fd631952235, content: 'Several countries have established their national churches, linking the ecclesiastical structure wit...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=775f55738e63d344cf11b71d524ad6d2d6d3fe438c2ccce8f3646071c8f3b43d, content: 'Protestants can be differentiated according to how they have been influenced by important movements ...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=6fcf4b62fccbe54df02e6ddff8956f9885803f39b3b1978986c67076e92695c1, content: 'Although the Adventist churches hold much in common, their theologies differ on whether the intermed...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=40ff443d9dca1b033d3042ab3b204b5c08c18df503781eafe577c1af69501e5a, content: 'The name Anabaptist, meaning \"one who baptizes again\", was given them by their persecutors in refere...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=5b48d2b4b9c99f86dedf3a771836711474d33f063f896b57b28534e2ed25cb00, content: 'Anglicanism comprises the Church of England and churches which are historically tied to it or hold s...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=5deaf3d501b3e505d8089e42f8eb9b38efcc6a05db31155ccd2e489deeca84a5, content: 'The Church of England declared its independence from the Catholic Church at the time of the Elizabet...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=2dd67bf6e6c265a61c8a8effe7747ce9d363a1bc89e597dd957df6e28b01c27f, content: 'Baptists subscribe to a doctrine that baptism should be performed only for professing believers (bel...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=95f9cf4f44c8371bf877f49f27f96425997fd55ec7ef54c89f0e3005015685f3, content: 'Historians trace the earliest church labeled Baptist back to 1609 in Amsterdam, with English Separat...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=b7964b7cf6aea566c0843d8de9761264837b5871b024526de731516cac60977c, content: 'Today, this term also refers to the doctrines and practices of the Reformed churches of which Calvin...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=b999b99f15da07b648d4defa7f176bcfc4848aaa656cd449d5f939906815f708, content: 'Today, Lutheranism is one of the largest branches of Protestantism. With approximately 80 million ad...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=4f4471a43b7b857c430b317ca39e78bfbc4d61dba0324e68ab8bd3352846b873, content: 'Methodism identifies principally with the theology of John Wesley—an Anglican priest and evangelist....', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=b92f04b2515153787bd9f6f2ca2fcb285b7415822302a3b9d331f52dce0ff5bc, content: 'Soteriologically, most Methodists are Arminian, emphasizing that Christ accomplished salvation for e...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=238d7e95d6743fd6260011d1480c17132b276a1d053b6567c552ed57741d9e66, content: 'This branch of Protestantism is distinguished by belief in the baptism with the Holy Spirit as an ex...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=a34adc7dcb3b22dd928acef5fea50fb0bf980a918b09cb15788121618b593b68, content: 'Pentecostalism eventually spawned hundreds of new denominations, including large groups such as the ...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=55528760d7253a904feb62de001c4890a0f42729aa603c2d4685a93a6645eb8e, content: 'There are many other Protestant denominations that do not fit neatly into the mentioned branches, an...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=9dea6432537a6a6d0e1a4aaccd2e6aadf0e0aa1040dbecd741e1367c3bbcba15, content: 'The Plymouth Brethren are a conservative, low church, evangelical movement, whose history can be tra...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=61d0ead364cc5ccdc828554164fe6e527049382dfbbc92b7fa7925d99525bf25, content: 'Quakers, or Friends, are members of a family of religious movements collectively known as the Religi...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=b3d3547c917cb1c36e0163036e7034cc5b5328dc2d48cac851abc6945d29dc05, content: 'There are also Christian movements which cross denominational lines and even branches, and cannot be...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=2a03f71de8086e5a9e9e026a0abfada880f2c3418eb80da5b5d9f939e9f680d0, content: 'It gained great momentum in the 18th and 19th centuries with the emergence of Methodism and the Grea...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=fc5765ef7cee6e1c5aec80f17fca86854a774f4cfc8a3bb8d28bae2e762639c3, content: 'In America, Episcopalian Dennis Bennett is sometimes cited as one of the charismatic movement's semi...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=b9e06d852668b50a5a25443bcf46205525b97a53de176a0f88b32526bc51d0c6, content: 'Larry Christenson, a Lutheran theologian based in San Pedro, California, did much in the 1960s and 1...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=f4e89a81e32f7e52d6eba7770e03ca5f7ea8f320e416dcba022930a1d2ace5d3, content: 'In Congregational and Presbyterian churches which profess a traditionally Calvinist or Reformed theo...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=b5df8f0c39c8e872877c88339284476c223d0b48c23d2fab918e3795cfabff45, content: 'Puritans were blocked from changing the established church from within, and were severely restricted...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=ffd8b6eb2e8f24e140d44907e4b6886c359130dee84e6bcb0b111de657f71d2f, content: 'They formed, and identified with various religious groups advocating greater purity of worship and d...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=95d019fbbfa4ed1d4c95d3420269beb3d368a9ce1042373b8fe276383e12b42b, content: 'Although the Reformation was a religious movement, it also had a strong impact on all other aspects ...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=21006d383ad3c533d7948fb558e4890d47925e2887c22c44365d70f9b69dec62, content: 'As the Reformers wanted all members of the church to be able to read the Bible, education on all lev...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=b050cddd00aae6fbef0b696a0a65aa5f81a9bfb9a958fb0b8c34e1d1dd49d94f, content: 'The Protestant concept of God and man allows believers to use all their God-given faculties, includi...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=3e11774a99a412e1a5b30a93dd976db76665b24ed4dde09cb2d7c6c12ba4809c, content: 'In a factor analysis of the latest wave of World Values Survey data, Arno Tausch (Corvinus Universit...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=8f9c9b67dbb3d3f3940b5f03da73c9cb2c4b889f1eb2542f3f1507dc2db24fa4, content: 'Episcopalians and Presbyterians, as well as other WASPs, tend to be considerably wealthier and bette...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=3d47a7157abc1784eaa1d080a88b94dbf3aa247ee9dfdf1b42c1f6f0119d2463, content: 'Protestantism has had an important influence on science. According to the Merton Thesis, there was a...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=b03afa308b7f755b88783057edc445fc5aebe1fd086dcada884395e3cf9f003e, content: 'In the Middle Ages, the Church and the worldly authorities were closely related. Martin Luther separ...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=68cef3aa221aab8b7d90c3ba917f40f575fc3398544e4cf9cb92471ec4dd35d5, content: 'Politically, Calvin favoured a mixture of aristocracy and democracy. He appreciated the advantages o...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=a402872d515456ea26b22aedd33f97078b92aa7ca3b5a7c9ae5736191d18db47, content: 'Consistent with Calvin's political ideas, Protestants created both the English and the American demo...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=a95152f8845d82b1e5a335c5744c3973fd16f795db0d0d81784d149129298b01, content: 'Protestants also took the initiative in advocating for religious freedom. Freedom of conscience had ...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=28dc70fc88998e1a62841255b397b489b6ff5d534f2c1e36bcc17c8bde972705, content: 'Democracy, social-contract theory, separation of powers, religious freedom, separation of church and...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=76ba8e3a214fce0a267e5a9fc1b4d3d89d56248e2d1015e905221a274009d3dd, content: 'Also, other human rights were advocated for by some Protestants. For example, torture was abolished ...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=7bf732e99dffabeea48b56bd87eb8ec06e989655ebc598b8d6a1b4810115b7a7, content: 'Protestants have founded hospitals, homes for disabled or elderly people, educational institutions, ...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=5b5a8b44fcc48ee8e155c319fc1b82b4cc30e4316d57faf786723b741f0a3438, content: 'World literature was enriched by the works of Edmund Spenser, John Milton, John Bunyan, John Donne, ...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=43762a0df84612b944180ec914b1277df06f3d3f1106c9e121564c21f6677abf, content: 'The view of the Roman Catholic Church is that Protestant denominations cannot be considered churches...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=fa4759d8e38e8d69d1dafa5ef919aa8ad6716e8ff96312bc2f64fb462f912921, content: 'Contrary to how the Protestant Reformers were often characterized, the concept of a catholic or univ...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=1cd712fb53c71b95e7667c32d4ceffb041b3a5c192439aab450f578777436857, content: 'Wherever the Magisterial Reformation, which received support from the ruling authorities, took place...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=3b3cdf0b6c35558c7bb25fc943bc675e788506316785180222877e894d2057aa, content: 'The ecumenical movement has had an influence on mainline churches, beginning at least in 1910 with t...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=dab03eb113e79f489742c79a99a34b4201da57decec7ef2f1bd5602b144df29a, content: 'A Protestant baptism is held to be valid by the Catholic Church if given with the trinitarian formul...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=e58514668a8a3b95698afad32d957e35fd3f4a5311127d412597e5105bf1e1f5, content: 'In 1999, the representatives of Lutheran World Federation and Catholic Church signed the Joint Decla...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=fbe6917f9db256a7107dd43c997fe1e8f26367aeef0748cff8510d61dbfa2388, content: 'There are more than 900 million Protestants worldwide,[ad] among approximately 2.4 billion Christian...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=27f23ef632f302d9cd023925c30b529d3f9c5df0edd83b5592bd77a26341f4d6, content: 'In European countries which were most profoundly influenced by the Reformation, Protestantism still ...', meta: {'name': 'Protestantism'}, embedding: vector of size 384), Document(id=d61e43ab558b6afa47a7427409fbf25ca65c0f00493eb34fc2c5e7503d9e0715, content: 'Changes in worldwide Protestantism over the last century have been significant. Since 1900, Protesta...', meta: {'name': 'Protestantism'}, embedding: vector of size 384)], [Document(id=27e12b901fe98482fa740282e20f384825585790f04cf22a3dbbf05cb3c41470, content: 'Unlike the Federal Bureau of Investigation (FBI), which is a domestic security service, CIA has no l...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384), Document(id=aeb4166bf7ae0b0c2f65b1f2165508f917718ae7b3b58a8379d158f052369bf3, content: 'The Executive Office also supports the U.S. military by providing it with information it gathers, re...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384), Document(id=31a464f5164767ebd5e2efce53b9a29a61a0e4b4404890756123ec18d42c90f0, content: 'The Directorate of Analysis produces all-source intelligence investigation on key foreign and interc...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384), Document(id=abf41599cae823fcd0ea971af34f362ccd8d5a0eb85127fa9705ce972b81cf80, content: 'The Directorate of Operations is responsible for collecting foreign intelligence, mainly from clande...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384), Document(id=4dcb82770b35ccc84326961e22563ed8a255a23520218f9e4d7c39de24702709, content: 'The CIA established its first training facility, the Office of Training and Education, in 1950. Foll...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384), Document(id=af05bf652f98223a95e7bb23b05dbf1345779f00029a4dc1dfa1c675cedcdbbb, content: 'Details of the overall United States intelligence budget are classified. Under the Central Intellige...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384), Document(id=dd446c17c6be7c0a52791e2219d0a8749282c72a1ddbc0e791f84e68ae80a8be, content: 'There were numerous previous attempts to obtain general information about the budget. As a result, i...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384), Document(id=d9752ad0adf09d783ef51d8596bda1f25a776b899197d79f25759c698f9f320d, content: 'The role and functions of the CIA are roughly equivalent to those of the United Kingdom's Secret Int...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384), Document(id=2b811bbf260c0d21d2555ed4ec72d73d05ea7fba0df1ce9c6fc36e6b8aba66d3, content: 'The closest links of the U.S. IC to other foreign intelligence agencies are to Anglophone countries:...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384), Document(id=4cf129cb6ef814eefd090d7426ac2c657c6afec2ffb477c6ce91652bb566d93e, content: 'The success of the British Commandos during World War II prompted U.S. President Franklin D. Rooseve...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384), Document(id=06c3031f53792c2bb267c8393a432c3feb9eb20d3d19e60f48a5974bc9053d02, content: 'Lawrence Houston, head counsel of the SSU, CIG, and, later CIA, was a principle draftsman of the Nat...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384), Document(id=eb8d0d1234136cdacda27690ae196b9dcaa3ba898e38b88914a3de3a4b9560d2, content: 'At the outset of the Korean War the CIA still only had a few thousand employees, a thousand of whom ...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384), Document(id=fe3481f6f2d9246ea153dd2ee5ddee6a6a478de5826e494e37293b2fceef59a8, content: 'The CIA had different demands placed on it by the different bodies overseeing it. Truman wanted a ce...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384), Document(id=a86d2a78047887332174bf70fc9e1108283e75a1d24f308c5ef14a1237039160, content: 'US army general Hoyt Vandenberg, the CIG's second director, created the Office of Special Operations...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384), Document(id=edd493776d2cdafb68e7b1a71dc8bf27e7e9de635a2d743dddc327ce5582b173, content: 'On 18 June 1948, the National Security Council issued Directive 10/2 calling for covert action again...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384), Document(id=e6e065f3ff1985e57c725deb330d11b85d1bec925164c97f0319614f1e5ef991, content: 'The early track record of the CIA was poor, with the agency unable to provide sufficient intelligenc...', meta: {'name': 'Central_Intelligence_Agency'}, embedding: vector of size 384)], [Document(id=9fe70b8a3a57c672e0de3c96186774b9bb7981920dc27d666578e87be859491a, content: 'Mexico City, or the City of Mexico (Spanish: Ciudad de México audio (help·info) American Spanish: [...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=2c25a0f304ba0085d576f4565d244d198d045277da0e082544fab584e9ce071c, content: 'The Greater Mexico City has a gross domestic product (GDP) of US$411 billion in 2011, making Mexico ...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=e9efd1be3299a8aa59ec8fa1150c59aa2d06fd6e21e3ba28a71b0c71bd8db7b8, content: 'Mexico’s capital is both the oldest capital city in the Americas and one of two founded by Amerindia...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=ce40d09bbd28900964466c2fab2b6e1e34b2cbb667455548cb755bb1de115acd, content: 'After years of demanding greater political autonomy, residents were given the right to directly elec...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=01c09ccd43789edf584bf7ad89f477948e4932366e2481ea0f739c4ccd8c2fc6, content: 'The city grew as the population did, coming up against the lake's waters. As the depth of the lake w...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=86abd23b64d97109b1889759aa05f7554a3a7604708dbfd1af2ad2400faccfdc, content: 'The concept of nobility flourished in New Spain in a way not seen in other parts of the Americas. Sp...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=6cd1d20215cbb5afa267e489c9023f5f0a43f80af79a6e7ec21864b36e5b4b1a, content: 'The Grito de Dolores (\"Cry of Dolores\") also known as El Grito de la Independencia (\"Cry of Independ...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=ac2ec421e2b20db084889926d0c4665d5b98834af7233ec26dcdfbff26cbd9b4, content: 'The Battle for Mexico City was the series of engagements from September 8 to September 15, 1847, in ...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=71763d7ec43ab6d670489837afb2e8517aa9d58892780829cb3bbfdfc8a7cfde, content: 'During this battle, on September 13, the 4th Division, under John A. Quitman, spearheaded the attack...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=71589bebbc221d71694682772d4f85074e1e4cd35303af1e213599d4c3c870ca, content: 'During this era of Porfirian rule, the city underwent an extensive modernization. Many Spanish Colon...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=879fcc69abf7c91a7183f08169d0a45c066d383edd3fe1230e8adb1261ab7a93, content: 'Diaz's plans called for the entire city to eventually be modernized or rebuilt in the Porfirian/Fren...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=67f20a1bd43c3b340f9a95119686b6536fb08206beda240024c39ace8251c924, content: 'Zapatist forces, which were based in neighboring Morelos had strengths in the southern edge of the F...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=3d86a3ac455cd06a25110839e32469fca12f660a9a832260a7de9e4078212c0f, content: 'In 1980 half of all the industrial jobs in Mexico were located in Mexico City. Under relentless grow...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=1b564b7bb80d68fcd3c3d9d0aa85dbe11c1d108ed09fbe7f97ad354e305b8106, content: 'On Thursday, September 19, 1985, at 7:19 am local time, Mexico City was struck by an earthquake of m...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=bc4831ed4cc60530ffef2f644ad807626d2740d4a05d5719a90e51f13c2129f7, content: 'Mexico City is located in the Valley of Mexico, sometimes called the Basin of Mexico. This valley is...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=efc3975fb0a9c49f6ddad9349a939448e8550a8561d02266b760a6a67ab76ef1, content: 'Mexico city primarily rests on what was Lake Texcoco. Seismic activity is frequent here. Lake Texcoc...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=8604718622392cc02f398654b573b5f6a6a849420e6c1d3d6926ef3b3fb12615, content: 'The area receives about 820 millimetres (32.3 in) of annual rainfall, which is concentrated from Jun...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=979603b5138d1756014bd5fc5e9f2bdddb671633049025278818eaf4350222e9, content: 'Originally much of the valley laid beneath the waters of Lake Texcoco, a system of interconnected sa...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=8fcb7a84d62bfcceee22c0c79fb95eac4d863e77e50e2b830adfae093570cb7b, content: 'By the 1990s Mexico City had become infamous as one of the world's most polluted cities; however the...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=40548b1917670b7809e3c3076f337ce7c882910306bdc990c3c87e951374537a, content: 'To clean up pollution, the federal and local governments implemented numerous plans including the co...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=2973003c4523a2ac2f384cf827456f17dd3e5545e06cb17c0c4ca7a63deb692b, content: 'The Acta Constitutiva de la Federación of January 31, 1824, and the Federal Constitution of October ...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=f05b3865769225e0ce041bbac0098215b4f91fa44b532eb3d5f6270436a647b6, content: 'Due in large part to the persuasion of representative Servando Teresa de Mier, Mexico City was chose...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=52496f122b33640c5e93bebd1e4a0fdf149f8d5b280a2eb338ea9f819114ad5f, content: 'In 1854 president Antonio López de Santa Anna enlarged the area of the Federal District almost eight...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=81596a0ea7566ba152d52ae780637554ee5e5ce83c332106ab9d4fbceb07ab51, content: 'While the Federal District was ruled by the federal government through an appointed governor, the mu...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=a6145987edca57cfdac585be11738b80708bb5645e23374b691ab985d22fa8a7, content: 'In 1941, the General Anaya borough was merged to the Central Department, which was then renamed \"Mex...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=d989f94663c623e55c164fc884d448870ba2a58accbf5836aa1c534d84f50eee, content: 'Mexico City, being the seat of the powers of the Union, did not belong to any particular state but t...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=ba54deaef3022fb890d0d101a8af62fd768d25986a71a37f2313f1cd1802825b, content: 'In response to the demands, in 1987 the Federal District received a greater degree of autonomy, with...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=5ce2b2b66829b9daba32f5eecece370c89c0105aa5971b410d017eb02ba1eea4, content: 'The first elected head of government was Cuauhtémoc Cárdenas. Cárdenas resigned in 1999 to run in th...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=8a527613d9416261b681363763115316b34dc3cecd78e2aa35f367181cc060b9, content: 'The Legislative Assembly of the Federal District is formed, as it is the case in all legislatures in...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=9c9ad3a1fa82b7e296ba6aad26781021d16a3cdd0a6dc42bb75227bc6fccba7f, content: 'Even though proportionality is confined to the proportional seats to prevent a part from being overr...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=21c2ddc6cd96b2c420a7408c8fb509c4e39208cc717677003d281d8a888f7341, content: 'The politics pursued by the administrations of heads of government in Mexico City since the second h...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=ccb8263d12af5835f3e0d436fce59e69bb5bf9f20f533214824d73dd4e4aeb56, content: 'For administrative purposes, the Federal District is divided into 16 \"delegaciones\" or boroughs. Whi...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=edbf9f0c83dfa0682a1cb86055ae0f3353caa7ee821871f15463c5e1752542c8, content: 'The boroughs are composed by hundreds of colonias or neighborhoods, which have no jurisdictional aut...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=dd5e6004c58181e10761be30cab36ae3ac0adf818d1e8a194fce69165e099295, content: 'West of the Historic Center (Centro Histórico) along Paseo de la Reforma are many of the city's weal...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=98f0b552f461139602cdc4ce2261144795cd68642697e480600031bb9dadf83b, content: 'The south of the city is home to some other high-income neighborhoods such as Colonia del Valle and ...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=3e8fd3f4c9f2736be6216bd227351e88b76db4ec45b7b13bb955dd5cf55d097e, content: 'North of the Historic Center, Azcapotzalco and Gustavo A. Madero have important industrial centers a...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=ff22646ba911729b40262d857448a057900a2f29be7dfaadddf02b7145d66eed, content: 'The Human Development Index report of 2005 shows that there were three boroughs with a very high Hu...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=bf1533585f7a8ab5cf69128866bd10c7e9ff79d32c544d57663dbe4892bc3d98, content: 'In contrast, the boroughs of Xochimilco (172th), Tláhuac (177th) and Iztapalapa (183th) presented th...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=cd9ac7650252c23c784fac8e3c972a2fd34f0d477c2b97d0746b5150821f6e63, content: 'Mexico City is home to some of the best private hospitals in the country; Hospital Ángeles, Hospital...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=b939952596578a89775a455f4887237a9c3362db31b6e4455fe1af7abd7972e2, content: 'The World Bank has sponsored a project to curb air pollution through public transport improvements a...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=a2a24aade51a71ba27f362cc46fe3b22439c3f3494343737ad1c822ed5e2d092, content: 'Mexico City is one of the most important economic hubs in Latin America. The city proper (Federal Di...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=2a38477a00643b69ad0127d5f761d66c225d582e9cc10cf77ee081da55142c9e, content: 'The economic reforms of President Carlos Salinas de Gortari had a tremendous effect on the city, as ...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=4d6a5716c3f3c8979566debce7c0bfbffe234a9fceeaf062bbff2694c49ed5cc, content: 'Historically, and since pre-Hispanic times, the Valley of Anahuac has been one of the most densely p...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=cf2fe6e3150cbaffaf9f9252a411936c2f17b0f8ca10d6ee3d3b0e47012053e1, content: 'Up to the 1990s, the Federal District was the most populous federal entity in Mexico, but since then...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=091173c4de9ff16446a98116c302adb3aa539a57506901062468a3be284f88ca, content: 'On the other hand, Mexico City is also home to large communities of expatriates and immigrants, most...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=d760eb50433636de5c6dcfc07dfdfa70d7b25a523455c91f6f317d3d18adc3ca, content: 'The Historic center of Mexico City (Centro Histórico) and the \"floating gardens\" of Xochimilco in th...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=28050b8541a74954c1638f4a128a3fe8c4f15bc487d696cb5cf80a37c81a1349, content: 'The most recognizable icon of Mexico City is the golden Angel of Independence on the wide, elegant a...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=5cf6aa3ea31d0260098cdd18b76f05bd4ef55a06ce4c0b6f3bfc71fbdf662bad, content: 'Chapultepec Park houses the Chapultepec Castle, now a museum on a hill that overlooks the park and i...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=12755cf827c5151bbc2e5a5d1cb19c01dcb4b0d35d278cab9a21262d1757127c, content: 'In addition, the city has about 160 museums—the world's greatest single metropolitan concentration —...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=424f02d1f621bb12a74be46b9eab4ad9e7088eca55d13d867bbc92305c25e735, content: 'Mexico City is served by the Sistema de Transporte Colectivo, a 225.9 km (140 mi) metro system, whic...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=0551764ab21b9f8b019556c04aad5287d3814697269184628c2920889d0b5a39, content: 'The city's first bus rapid transit line, the Metrobús, began operation in June 2005, along Avenida I...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=cc974a56092316bb3366dffbcf1e14dd671fbaf5cd85a9bd619961519d1134a0, content: 'In the late 1970s many arterial roads were redesigned as ejes viales; high-volume one-way roads that...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=7ddb1b65535acc23af999a648a92881cb72976a0bec02dfd4ad96cbfc7b8f99d, content: 'There is an environmental program, called Hoy No Circula (\"Today Does Not Run\", or \"One Day without ...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=68bb40dcfd394e9eae9ad343a3628f78a5c55c7bc7f8006788e968052f6c737e, content: 'Street parking in urban neighborhoods is mostly controlled by the franeleros a.k.a. \"viene vienes\" (...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=8d979b099641527e52134785b16b0b99e46d7d5540ea1b26bd5d45c45f48e8dc, content: 'The local government continuously strives for a reduction of massive traffic congestion, and has inc...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=6ba1637b0b269b5a03882c97004fe6fde312580217a19fd58684420601099b0c, content: 'Mexico City is served by Mexico City International Airport (IATA Airport Code: MEX). This airport is...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=84c5c81c65304b26500d0d1f794a8089fbd817efbae1d7557c19993504f2e579, content: 'In the Mexico City airport, the government engaged in an extensive restructuring program that includ...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=21109546ff02053120f963bb7648d31bc8821c3f88d217527a4067b3fbbecbc6, content: 'During his annual state-of-the-nation address on September 2, 2014, President of Mexico Enrique Peña...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=102fbb5098b6fd1c10e1f9371ce1abd350e601047cc619a3c385617810949caf, content: 'Having been capital of a vast pre-Hispanic empire, and also the capital of richest viceroyalty withi...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=48e8c37861878c230c3c6589b78cbbb34ca600d0aca55d740aa96766d771bee8, content: 'Much of the early colonial art stemmed from the codices (Aztec illustrated books), aiming to recover...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=cce10e5d373645f70f1e120bfb257b2aeb20bff8a21a655d8bf76c8577bb3243, content: 'During the 19th century, an important producer of art was the Academia de San Carlos (San Carlos Art...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=1385e038243bf804131320014d83ecc632f84dbcaa1ccc50d8eae2325d4eaa42, content: 'During the 20th century, many artists immigrated to Mexico City from different regions of Mexico, su...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=cc2ed3ae7efd539afc4d52f0874efbba8d03ffad5fc53a52c452a046b4784e45, content: 'Mexico City has numerous museums dedicated to art, including Mexican colonial, modern and contempora...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=cd4d179e299f30ef68c503983f264bf001a27535155ca7208e1b31b223bb3048, content: 'The Museo Soumaya, named after the wife of Mexican magnate Carlos Slim, has the largest private coll...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=bbaf75d92cef9efe25762f71b48e1bfbb9317bf31e9d3e04c0b008a4fd79c6ad, content: 'Another major addition to the city's museum scene is the Museum of Remembrance and Tolerance (Museo ...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=0727ac14305949f537df566dded182ea9de4e791472027baff97a0783c065876, content: 'Mexico City is home to a number of orchestras offering season programs. These include the Mexico Cit...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=5a54bb2e29e8a922289ce3db57d58a56b93b39d2deb132626e76abb64125ad10, content: 'The city is also a leading center of popular culture and music. There are a multitude of venues host...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=8cc780e976fbcc59e234e87ef4e738b750b733e73e1e79fff16180fce86e4748, content: 'Other popular sites for pop-artist performances include the 3,000-seat Teatro Metropolitan, the 15,0...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=5280bc4e3d77cfc46660101c58e45a9be396ac2db7aeccd6768fcc37c8c5c960, content: 'The Centro Nacional de las Artes (National Center for the Arts has several venues for music, theatre...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=09d91297773343c7668bb7e14fcb910e7f9901d4777d3aa27caf9a78b3ff118c, content: 'The Papalote children's museum, which houses the world's largest dome screen, is located in the wood...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=f3a9cf4b523bd74178cf4a321f5892cb6c019d3d7125269dc7a22160d57e6cdf, content: 'The Cineteca Nacional (the Mexican Film Library), near the Coyoacán suburb, shows a variety of films...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=e922b87e3809fb6fde0b79df0ffdece207b834339bfe8f513345583c8e6d2979, content: 'Mexico City offers a variety of cuisines. Restaurants specializing in the regional cuisines of Mexic...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=b1d72b9226ebdac9e71a4dd83944d20294fae4b9f9f3d8fd6a0aa821826b1424, content: 'The city also has several branches of renowned international restaurants and chefs. These include Pa...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=81a3f7a806441a0af029594e31c9371f90842bf109adfaf606bf621a8249c65f, content: 'Association football is the country's most popular and most televised franchised sport. Its importan...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=5f53b045ed29a5eec5658735b1b44baf6a71030ec75c2c95a85327b155b224cb, content: 'Mexico City remains the only Latin American city to host the Olympic Games, having held the Summer O...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=561cb4e029de09716168a5579092a203b829ba36723a0721a4e2bbbacaed788b, content: 'The National Autonomous University of Mexico (UNAM), located in Mexico City, is the largest universi...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=640545cdf1db29a4df3655663df0852d897ec7c81c4439e63e2c6aecff3370d4, content: 'The second largest higher-education institution is the National Polytechnic Institute (IPN), which i...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=f360364692fa455ae1d9d7a15e10abebc635c31e227c5ea7addceda572e87d8c, content: 'Unlike those of Mexican states' schools, curricula of Mexico City's public schools is managed by the...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=8048cc3274856c008a9d150c5aee8c2c6ab93c0ff573326c4b6579e6fd2c32ba, content: 'A special case is that of El Colegio Nacional, created during the district's governmental period of ...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=f687b600a865bdfd63cac862b77d2fd6220e4d6a317f262076c559f2f70eaa49, content: 'Mexico City is Latin America's leading center for the television, music and film industries. It is a...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=453d345dc1cbaeed62566da8827ffe556b72573112a16ee2677ce44365d2463d, content: 'Mexico City offers an immense and varied consumer retail market, ranging from basic foods to ultra h...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=0e2699a756ba1c066af59f6487721d1cb7e9ccd94d79d99657c7c751110b9a62, content: 'A staple for consumers in the city is the omnipresent \"mercado\". Every major neighborhood in the cit...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=d094d4efee6d02ea808c65d2200aa81b509492249f263b653324d7fa6d9bc9bb, content: 'Street vendors play their trade from stalls in the tianguis as well as at non-officially controlled ...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=9bb55921b08f049759f31400f0cbbcaa10f573a25b660f7e8bc8b7550f6dfb36, content: 'Mexico City has three zoos. Chapultepec Zoo, the San Juan de Aragon Zoo and Los Coyotes Zoo. Chapult...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=300b9f88e6f9fb0457341d0c6095366410c9393c15408cb2d3b15bf54d2eebab, content: 'During Andrés López Obrador's administration a political slogan was introduced: la Ciudad de la Espe...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=59d3c60e95f852a33a9f67ab2803867ae331f82cd69970e46110e28bce78f289, content: 'The city is colloquially known as Chilangolandia after the locals' nickname chilangos. Chilango is u...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384), Document(id=41a43296562130be1b47d6ffb9e0b0bf44b8441d7a548522a330b4c0fba78afc, content: 'Between 2000 and 2004 an average of 478 crimes were reported each day in Mexico City; however, the a...', meta: {'name': 'Mexico_City'}, embedding: vector of size 384)], [Document(id=f9f6538b9cfb9b6837f44010748f59d06fa7db03d84bade8b887340dc32e4241, content: 'An airport is an aerodrome with facilities for flights to take off and land. Airports often have fac...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=e6b01e2175833676458ae04e4efb749a0c15cdd3a8737bb278d80046b83a3c87, content: 'The majority of the world's airports are non-towered, with no air traffic control presence. Busy air...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=af5fda86ac3c4b71f423416b6712a6da5a4199e79ee14217637184d99ce11ba5, content: 'Most of the world's airports are owned by local, regional, or national government bodies who then le...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=15371710476755d2cab4ed9a0497a290b16f43c520467a84a12c759a70687062, content: 'Airports are divided into landside and airside areas. Landside areas include parking lots, public tr...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=c05310992c8758864ce9312ac895f5ff01315cc47e7e467be5b5fcfeeaf5d93d, content: 'Most major airports provide commercial outlets for products and services. Most of these companies, m...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=8e8a9754df41335d704c35337a2c221248c7298879d2c0a6163a1edef7128859, content: 'Airports may also contain premium and VIP services. The premium and VIP services may include express...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=5211ceca504c932fdf2a868a213c48db39090087c4bf3f71d1d7fd57ee2983ad, content: 'Many large airports are located near railway trunk routes for seamless connection of multimodal tran...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=b92547c58e1805a0ce6e300c7310cc430c712d894d19aff5f1d7ec2cbc512af0, content: 'The distances passengers need to move within a large airport can be substantial. It is common for ai...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=a8f57c343e8b1e25587065133ad3ad1acea783d689a2be28919f1417628e6089, content: 'The title of \"world's oldest airport\" is disputed, but College Park Airport in Maryland, US, establi...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=0c0b4237d1556939f7df8213f2ccdbb688ece438d4821132c59f265ab6f00371, content: 'Following the war, some of these military airfields added civil facilities for handling passenger tr...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=d05de2762ad032a8e9c7c31d30ca752183492bf3ca968377feafeebceb950a7e, content: 'The first lighting used on an airport was during the latter part of the 1920s; in the 1930s approach...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=3d2f1b81c4dc197e422a722b6d09bed6714b4ce39d1d9dc1746cabd77256b5c9, content: 'Airport construction boomed during the 1960s with the increase in jet aircraft traffic. Runways were...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=12f93f39a1aeda37ca513e23c646b0d0aaac87dcbf70bfab2043eb3ae009a445, content: 'The majority of the world's airports are non-towered, with no air traffic control presence. However,...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=4d89cef1810ebad0546881ff420d94737d6dd8746808a0a4f1623d7c72167546, content: 'Ground Control is responsible for directing all ground traffic in designated \"movement areas\", excep...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=5c713f4fb68894d842a4164229479f5e13012cae37835d4f6365146d28318d41, content: 'Tower Control controls aircraft on the runway and in the controlled airspace immediately surrounding...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=2e83b107160a447bbf4014c40b68622777bd9bad54e970a0bfa3c2e3ddfa45f5, content: 'At all airports the use of a traffic pattern (often called a traffic circuit outside the U.S.) is po...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=47d42222f5309907e82064db2aaf3b707c683a0935e23a12f3dd7ec8ab652633, content: 'Generally, this pattern is a circuit consisting of five \"legs\" that form a rectangle (two legs and t...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=fbaeba3da53e3d2e947425d705d8b60b9bd66aadfce0b4844f7a8a44ec8ae58e, content: 'At extremely large airports, a circuit is in place but not usually used. Rather, aircraft (usually o...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=7b9c11121392f4c0ec5dc545bfe863884d547b206e1e19c70e3aa24bae866297, content: 'There are a number of aids available to pilots, though not all airports are equipped with them. A vi...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=87e232296975fb1af6f04de57be64456770bbd0ab955237b6b6aaa28e87a2bd4, content: 'On runways, green lights indicate the beginning of the runway for landing, while red lights indicate...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=b03288b0fa300c4e017800cd91d77783550f0388547f3f3584d7c90fd4fef904, content: 'Hazards to aircraft include debris, nesting birds, and reduced friction levels due to environmental ...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=3d4d4ba721dadf314f0ef3f3453e67398ac79ad9956951e9b55ad845dc64a2f5, content: 'Many ground crew at the airport work at the aircraft. A tow tractor pulls the aircraft to one of the...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=f8cf230c895593a983eadfada5e64b62cc58afe34098ba3d03d8121ef71a4910, content: 'An airbase, sometimes referred to as an air station or airfield, provides basing and support of mili...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=1a4cc3fb3d1b538e9cdf7e9f1037ab8d33891707e336a701d8dc5e844877db96, content: 'Airports have played major roles in films and television programs due to their very nature as a tran...', meta: {'name': 'Airport'}, embedding: vector of size 384), Document(id=3509bffd6c913a8b4f06008770e8358e81d3b1473e6365a5fd5e9a7ebab14392, content: 'Most airports welcome filming on site, although it must be agreed in advance and may be subject to a...', meta: {'name': 'Airport'}, embedding: vector of size 384)]], ground_truth_answers=['the Stone of Scone', 'between its plates', 'eliminated', 'Cistercian Orders', 'October 6, 1960', 'Santo Domingo', 'secularism', '$15 million', 'Academia de San Carlos', 'August 1919'], additional_rag_inputs={'prompt_builder': {'question': ['Upon what are kings of Scots coronated?', 'Where is the energy stored by a capacitor located?', 'What did these gardeners do about unwanted species?', 'What is one type of Benedictine order that was common in France?', 'When did work on the ASCII standard begin? ', 'Where did Africans escape and mate with naitves?', 'What direction has Europe moved towards?', 'What was the Office of Special Operations initial budget?', 'What is the large art school in Mexico City?', 'When did the Hounslow Heath Aerodrome begin to operate scheduled international commercial services?']}, 'answer_builder': {'query': ['Upon what are kings of Scots coronated?', 'Where is the energy stored by a capacitor located?', 'What did these gardeners do about unwanted species?', 'What is one type of Benedictine order that was common in France?', 'When did work on the ASCII standard begin? ', 'Where did Africans escape and mate with naitves?', 'What direction has Europe moved towards?', 'What was the Office of Special Operations initial budget?', 'What is the large art school in Mexico City?', 'When did the Hounslow Heath Aerodrome begin to operate scheduled international commercial services?']}})\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Inspect the output of the evaluation run.\n",
+ "\n",
+ "print(f\"Results of the evaluation run: {emb_eval_run.results.run_name}\")\n",
+ "print(f\"Serialized RAG pipeline: {emb_eval_run.evaluated_pipeline}\")\n",
+ "print(f\"Serialized evaluation pipeline: {emb_eval_run.evaluation_pipeline}\")\n",
+ "print(f\"Inputs: {emb_eval_run.inputs}\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Evaluation score report:\n"
+ ]
+ },
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " metrics | \n",
+ " score | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " metric_doc_recall_single | \n",
+ " 0.7 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " metric_answer_faithfulness | \n",
+ " 0.7 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " metric_doc_map | \n",
+ " 0.6 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " metrics score\n",
+ "0 metric_doc_recall_single 0.7\n",
+ "1 metric_answer_faithfulness 0.7\n",
+ "2 metric_doc_map 0.6"
+ ]
+ },
+ "execution_count": 15,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "print(\"Evaluation score report:\")\n",
+ "emb_eval_run.results.score_report()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Evaluation score dataframe:\n"
+ ]
+ },
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " questions | \n",
+ " contexts | \n",
+ " responses | \n",
+ " metric_doc_recall_single | \n",
+ " metric_answer_faithfulness | \n",
+ " metric_doc_map | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " Upon what are kings of Scots coronated? | \n",
+ " [Normans came into Scotland, building castles ... | \n",
+ " The kings of Scots are coronated on the Stone ... | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " Where is the energy stored by a capacitor loca... | \n",
+ " [A capacitor (originally known as a condenser)... | \n",
+ " The energy stored by a capacitor is located in... | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 0.5 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " What did these gardeners do about unwanted spe... | \n",
+ " [Forest gardening was also being used as a foo... | \n",
+ " The gardeners identified, protected, and impro... | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " What is one type of Benedictine order that was... | \n",
+ " [The Catholic Church prevailed across Europe a... | \n",
+ " One type of Benedictine order that was common ... | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " When did work on the ASCII standard begin? | \n",
+ " [ASCII developed from telegraphic codes. Its f... | \n",
+ " Work on the ASCII standard began on October 6,... | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ "
\n",
+ " \n",
+ " 5 | \n",
+ " Where did Africans escape and mate with naitves? | \n",
+ " [Numerous communities of dark-skinned peoples ... | \n",
+ " Africans escaped and mated with natives in pre... | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " 6 | \n",
+ " What direction has Europe moved towards? | \n",
+ " [Modern historiography on the period has reach... | \n",
+ " Europe has moved towards an era characterized ... | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " 7 | \n",
+ " What was the Office of Special Operations init... | \n",
+ " [US army general Hoyt Vandenberg, the CIG's se... | \n",
+ " The initial budget of the Office of Special Op... | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ "
\n",
+ " \n",
+ " 8 | \n",
+ " What is the large art school in Mexico City? | \n",
+ " [During the 19th century, an important produce... | \n",
+ " The large art school in Mexico City is the Esc... | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 0.5 | \n",
+ "
\n",
+ " \n",
+ " 9 | \n",
+ " When did the Hounslow Heath Aerodrome begin to... | \n",
+ " [Following the war, some of these military air... | \n",
+ " Hounslow Heath Aerodrome began to operate sche... | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " questions \\\n",
+ "0 Upon what are kings of Scots coronated? \n",
+ "1 Where is the energy stored by a capacitor loca... \n",
+ "2 What did these gardeners do about unwanted spe... \n",
+ "3 What is one type of Benedictine order that was... \n",
+ "4 When did work on the ASCII standard begin? \n",
+ "5 Where did Africans escape and mate with naitves? \n",
+ "6 What direction has Europe moved towards? \n",
+ "7 What was the Office of Special Operations init... \n",
+ "8 What is the large art school in Mexico City? \n",
+ "9 When did the Hounslow Heath Aerodrome begin to... \n",
+ "\n",
+ " contexts \\\n",
+ "0 [Normans came into Scotland, building castles ... \n",
+ "1 [A capacitor (originally known as a condenser)... \n",
+ "2 [Forest gardening was also being used as a foo... \n",
+ "3 [The Catholic Church prevailed across Europe a... \n",
+ "4 [ASCII developed from telegraphic codes. Its f... \n",
+ "5 [Numerous communities of dark-skinned peoples ... \n",
+ "6 [Modern historiography on the period has reach... \n",
+ "7 [US army general Hoyt Vandenberg, the CIG's se... \n",
+ "8 [During the 19th century, an important produce... \n",
+ "9 [Following the war, some of these military air... \n",
+ "\n",
+ " responses \\\n",
+ "0 The kings of Scots are coronated on the Stone ... \n",
+ "1 The energy stored by a capacitor is located in... \n",
+ "2 The gardeners identified, protected, and impro... \n",
+ "3 One type of Benedictine order that was common ... \n",
+ "4 Work on the ASCII standard began on October 6,... \n",
+ "5 Africans escaped and mated with natives in pre... \n",
+ "6 Europe has moved towards an era characterized ... \n",
+ "7 The initial budget of the Office of Special Op... \n",
+ "8 The large art school in Mexico City is the Esc... \n",
+ "9 Hounslow Heath Aerodrome began to operate sche... \n",
+ "\n",
+ " metric_doc_recall_single metric_answer_faithfulness metric_doc_map \n",
+ "0 0.0 1.0 0.0 \n",
+ "1 1.0 1.0 0.5 \n",
+ "2 1.0 1.0 1.0 \n",
+ "3 1.0 0.0 1.0 \n",
+ "4 1.0 0.0 1.0 \n",
+ "5 0.0 1.0 0.0 \n",
+ "6 0.0 1.0 0.0 \n",
+ "7 1.0 0.0 1.0 \n",
+ "8 1.0 1.0 0.5 \n",
+ "9 1.0 1.0 1.0 "
+ ]
+ },
+ "execution_count": 16,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "print(\"Evaluation score dataframe:\")\n",
+ "emb_eval_run.results.to_pandas()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "0008b3059ab549beb89017859ef2aac6",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "ac402a48e1a349f3a16447b279f8abe7",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "9cbe20edf3494a4dbe454fdd63c4b5ca",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "a7d21602278a45eaa0b99836dcc25583",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "d3cace14ff894fd8b8472be1076fe567",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "6fdbcb615043413185391dd12a76c444",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "e14d9adfca59464c94b62a194f0a0e9d",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "bbb22829bcd5489894f01858fa381eba",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "aa84db7490c843a1b1db5ee7eb4c589a",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "dcfba8618dce42a2bcd05270df8340f8",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Batches: 0%| | 0/1 [00:00, ?it/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "100%|██████████| 10/10 [00:12<00:00, 1.25s/it]\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Launch another evaluation run with the same inputs but with different overrides.\n",
+ "overrides = RAGEvaluationOverrides(rag_pipeline={\n",
+ " \"generator\": {\"model\": \"gpt-4-turbo\"},\n",
+ "})\n",
+ "emb_eval_run_gpt4 = emb_eval_harness.run(inputs=eval_harness_input, run_name=\"emb_eval_run_gpt4\", overrides=overrides)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Comparison of the two evaluation runs:\n"
+ ]
+ },
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " questions | \n",
+ " contexts | \n",
+ " responses | \n",
+ " emb_eval_run_metric_doc_recall_single | \n",
+ " emb_eval_run_metric_answer_faithfulness | \n",
+ " emb_eval_run_metric_doc_map | \n",
+ " emb_eval_run_gpt4_metric_doc_recall_single | \n",
+ " emb_eval_run_gpt4_metric_answer_faithfulness | \n",
+ " emb_eval_run_gpt4_metric_doc_map | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " Upon what are kings of Scots coronated? | \n",
+ " [Normans came into Scotland, building castles ... | \n",
+ " The kings of Scots are coronated on the Stone ... | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " Where is the energy stored by a capacitor loca... | \n",
+ " [A capacitor (originally known as a condenser)... | \n",
+ " The energy stored by a capacitor is located in... | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 0.5 | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 0.5 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " What did these gardeners do about unwanted spe... | \n",
+ " [Forest gardening was also being used as a foo... | \n",
+ " The gardeners identified, protected, and impro... | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " What is one type of Benedictine order that was... | \n",
+ " [The Catholic Church prevailed across Europe a... | \n",
+ " One type of Benedictine order that was common ... | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " When did work on the ASCII standard begin? | \n",
+ " [ASCII developed from telegraphic codes. Its f... | \n",
+ " Work on the ASCII standard began on October 6,... | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ "
\n",
+ " \n",
+ " 5 | \n",
+ " Where did Africans escape and mate with naitves? | \n",
+ " [Numerous communities of dark-skinned peoples ... | \n",
+ " Africans escaped and mated with natives in pre... | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " 6 | \n",
+ " What direction has Europe moved towards? | \n",
+ " [Modern historiography on the period has reach... | \n",
+ " Europe has moved towards an era characterized ... | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " 7 | \n",
+ " What was the Office of Special Operations init... | \n",
+ " [US army general Hoyt Vandenberg, the CIG's se... | \n",
+ " The initial budget of the Office of Special Op... | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 0.0 | \n",
+ " 1.0 | \n",
+ "
\n",
+ " \n",
+ " 8 | \n",
+ " What is the large art school in Mexico City? | \n",
+ " [During the 19th century, an important produce... | \n",
+ " The large art school in Mexico City is the Esc... | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 0.5 | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 0.5 | \n",
+ "
\n",
+ " \n",
+ " 9 | \n",
+ " When did the Hounslow Heath Aerodrome begin to... | \n",
+ " [Following the war, some of these military air... | \n",
+ " Hounslow Heath Aerodrome began to operate sche... | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ " 1.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " questions \\\n",
+ "0 Upon what are kings of Scots coronated? \n",
+ "1 Where is the energy stored by a capacitor loca... \n",
+ "2 What did these gardeners do about unwanted spe... \n",
+ "3 What is one type of Benedictine order that was... \n",
+ "4 When did work on the ASCII standard begin? \n",
+ "5 Where did Africans escape and mate with naitves? \n",
+ "6 What direction has Europe moved towards? \n",
+ "7 What was the Office of Special Operations init... \n",
+ "8 What is the large art school in Mexico City? \n",
+ "9 When did the Hounslow Heath Aerodrome begin to... \n",
+ "\n",
+ " contexts \\\n",
+ "0 [Normans came into Scotland, building castles ... \n",
+ "1 [A capacitor (originally known as a condenser)... \n",
+ "2 [Forest gardening was also being used as a foo... \n",
+ "3 [The Catholic Church prevailed across Europe a... \n",
+ "4 [ASCII developed from telegraphic codes. Its f... \n",
+ "5 [Numerous communities of dark-skinned peoples ... \n",
+ "6 [Modern historiography on the period has reach... \n",
+ "7 [US army general Hoyt Vandenberg, the CIG's se... \n",
+ "8 [During the 19th century, an important produce... \n",
+ "9 [Following the war, some of these military air... \n",
+ "\n",
+ " responses \\\n",
+ "0 The kings of Scots are coronated on the Stone ... \n",
+ "1 The energy stored by a capacitor is located in... \n",
+ "2 The gardeners identified, protected, and impro... \n",
+ "3 One type of Benedictine order that was common ... \n",
+ "4 Work on the ASCII standard began on October 6,... \n",
+ "5 Africans escaped and mated with natives in pre... \n",
+ "6 Europe has moved towards an era characterized ... \n",
+ "7 The initial budget of the Office of Special Op... \n",
+ "8 The large art school in Mexico City is the Esc... \n",
+ "9 Hounslow Heath Aerodrome began to operate sche... \n",
+ "\n",
+ " emb_eval_run_metric_doc_recall_single \\\n",
+ "0 0.0 \n",
+ "1 1.0 \n",
+ "2 1.0 \n",
+ "3 1.0 \n",
+ "4 1.0 \n",
+ "5 0.0 \n",
+ "6 0.0 \n",
+ "7 1.0 \n",
+ "8 1.0 \n",
+ "9 1.0 \n",
+ "\n",
+ " emb_eval_run_metric_answer_faithfulness emb_eval_run_metric_doc_map \\\n",
+ "0 1.0 0.0 \n",
+ "1 1.0 0.5 \n",
+ "2 1.0 1.0 \n",
+ "3 0.0 1.0 \n",
+ "4 0.0 1.0 \n",
+ "5 1.0 0.0 \n",
+ "6 1.0 0.0 \n",
+ "7 0.0 1.0 \n",
+ "8 1.0 0.5 \n",
+ "9 1.0 1.0 \n",
+ "\n",
+ " emb_eval_run_gpt4_metric_doc_recall_single \\\n",
+ "0 0.0 \n",
+ "1 1.0 \n",
+ "2 1.0 \n",
+ "3 1.0 \n",
+ "4 1.0 \n",
+ "5 0.0 \n",
+ "6 0.0 \n",
+ "7 1.0 \n",
+ "8 1.0 \n",
+ "9 1.0 \n",
+ "\n",
+ " emb_eval_run_gpt4_metric_answer_faithfulness \\\n",
+ "0 1.0 \n",
+ "1 1.0 \n",
+ "2 1.0 \n",
+ "3 0.0 \n",
+ "4 0.0 \n",
+ "5 1.0 \n",
+ "6 1.0 \n",
+ "7 0.0 \n",
+ "8 1.0 \n",
+ "9 1.0 \n",
+ "\n",
+ " emb_eval_run_gpt4_metric_doc_map \n",
+ "0 0.0 \n",
+ "1 0.5 \n",
+ "2 1.0 \n",
+ "3 1.0 \n",
+ "4 1.0 \n",
+ "5 0.0 \n",
+ "6 0.0 \n",
+ "7 1.0 \n",
+ "8 0.5 \n",
+ "9 1.0 "
+ ]
+ },
+ "execution_count": 18,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# Compare the results of the two evaluation runs.\n",
+ "print(\"Comparison of the two evaluation runs:\")\n",
+ "emb_eval_run.results.comparative_individual_scores_report(emb_eval_run_gpt4.results)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "In the above code, we've primarily focused on using the `default_xxx` methods of the `RAGEvaluationHarness` class. They provide a straightforward way of getting started with the evaluation of simple RAG pipelines which use prototypical components. The harness can also be used to evaluate arbitrarily complex RAG pipelines. This is done by providing the harness with some extra metadata about the pipeline to be evaluated.\n",
+ "\n",
+ "To use an arbitrary pipeline with the harness, the latter requires information about the following components (c.f `RAGExpectedComponent`):\n",
+ "- Query processor - Component that processes the input query. \n",
+ " - Expects one input that contains the query string.\n",
+ "- Document retriever - Component that retrieves documents based on the input query.\n",
+ " - Expects one output that contains the retrieved documents.\n",
+ "- Response generator - Component that generates responses based on the query and the retrieved documents.\n",
+ " - Expects one output that contains the LLM's response(s).\n",
+ "\n",
+ "For each of the above, the user needs to provide the following metadata (c.f `RAGExpectedComponentMetadata`):\n",
+ "- The name of the component as seen in the pipeline.\n",
+ "- A mapping of the component's expected inputs to their corresponding input names.\n",
+ "- A mapping of the component's expected outputs to their corresponding output names.\n",
+ "\n",
+ "For example, let's consider `RAGExpectedComponent.QUERY_PROCESSOR`: Assume we have a RAG pipeline with an [`OpenAITextEmbedder`](https://github.com/deepset-ai/haystack/blob/0ceeb733baabe2b3658ee7065c4441a632ef465d/haystack/components/embedders/openai_text_embedder.py#L18) component called `\"txt_embedder\"`. Since the harness is responsible for passing the pipeline's input (the query) to the `OpenAITextEmbedder`, it needs to know the name of the component. Furthermore, it also needs to know the [name of `OpenAITextEmbedder`'s input](https://github.com/deepset-ai/haystack/blob/0ceeb733baabe2b3658ee7065c4441a632ef465d/haystack/components/embedders/openai_text_embedder.py#L135) through which the query should be supplied. The metadata for the above looks thus:\n",
+ "```python\n",
+ "query_processor_metadata = RAGExpectedComponentMetadata(\n",
+ " name=\"txt_embedder\",\n",
+ " input_mapping={\n",
+ " \"query\": \"text\"\n",
+ " }\n",
+ ")\n",
+ "```\n",
+ "Similarly, for `RAGExpectedComponent.DOCUMENT_RETRIEVER`: Assume the RAG pipeline has an [`InMemoryEmbeddingRetriever`](https://github.com/deepset-ai/haystack/blob/0ceeb733baabe2b3658ee7065c4441a632ef465d/haystack/components/retrievers/in_memory/embedding_retriever.py#L12) component named `\"mem_retriever\"` and is connected to `\"txt_embedder\"`.\n",
+ "```python\n",
+ "document_retriever_metadata = RAGExpectedComponentMetadata(\n",
+ " name=\"mem_retriever\",\n",
+ " output_mapping={\n",
+ " \"retrieved_documents\": \"documents\"\n",
+ " }\n",
+ ")\n",
+ "```\n",
+ "Both `\"query\"` and `\"retrieved_documents\"` are \"meta\" identifiers used by the harness to specify expected inputs and outputs - They are specific to each `RAGExpectedComponent` enum variant and are documented in their docstrings."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# Create a harness to evalaute a custom RAG pipeline.\n",
+ "# Commented out because the pipeline is not defined in this notebook.\n",
+ "\n",
+ "# custom_eval_harness = RAGEvaluationHarness(\n",
+ "# rag_pipeline=custom_rag_pipeline,\n",
+ "# rag_components={\n",
+ "# RAGExpectedComponent.QUERY_PROCESSOR: RAGExpectedComponentMetadata(\n",
+ "# \"query_embedder\", input_mapping={\"query\": \"text\"}\n",
+ "# ),\n",
+ "# RAGExpectedComponent.DOCUMENT_RETRIEVER: RAGExpectedComponentMetadata(\n",
+ "# \"retriever\",\n",
+ "# output_mapping={\"retrieved_documents\": \"documents\"},\n",
+ "# ),\n",
+ "# RAGExpectedComponent.RESPONSE_GENERATOR: RAGExpectedComponentMetadata(\n",
+ "# \"generator\", output_mapping={\"replies\": \"replies\"}\n",
+ "# ),\n",
+ "# },\n",
+ "# metrics={\n",
+ "# RAGEvaluationMetric.DOCUMENT_MAP,\n",
+ "# RAGEvaluationMetric.DOCUMENT_RECALL_SINGLE_HIT,\n",
+ "# RAGEvaluationMetric.ANSWER_FAITHFULNESS\n",
+ "# })"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "There is no strict requirement when it comes which components can act as a query processor, a document retriever or a response generator. For instance, it's perfecty fine if the query processor and the document retriever are the same component. In fact, this is the case when using a keyword-based retriever which directly accepts the query (as opposed to having a query embedder in front of it)."
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "dev",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.10.13"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/haystack_experimental/evaluation/harness/rag/harness.py b/haystack_experimental/evaluation/harness/rag/harness.py
index f0b51165..e4c1518e 100644
--- a/haystack_experimental/evaluation/harness/rag/harness.py
+++ b/haystack_experimental/evaluation/harness/rag/harness.py
@@ -25,7 +25,9 @@
)
-class RAGEvaluationHarness(EvaluationHarness[RAGEvaluationInput, RAGEvaluationOverrides, RAGEvaluationOutput]):
+class RAGEvaluationHarness(
+ EvaluationHarness[RAGEvaluationInput, RAGEvaluationOverrides, RAGEvaluationOutput]
+):
"""
Evaluation harness for evaluating RAG pipelines.
"""
@@ -167,7 +169,9 @@ def _lookup_component_output(
output_name = mapping[output_name]
return outputs[name][output_name]
- def _generate_eval_run_pipelines(self, overrides: Optional[RAGEvaluationOverrides]) -> PipelinePair:
+ def _generate_eval_run_pipelines(
+ self, overrides: Optional[RAGEvaluationOverrides]
+ ) -> PipelinePair:
if overrides is None:
rag_overrides = None
eval_overrides = None
@@ -178,7 +182,9 @@ def _generate_eval_run_pipelines(self, overrides: Optional[RAGEvaluationOverride
if eval_overrides is not None:
for metric in eval_overrides.keys():
if metric not in self.metrics:
- raise ValueError(f"Cannot override parameters of unused evaluation metric '{metric.value}'")
+ raise ValueError(
+ f"Cannot override parameters of unused evaluation metric '{metric.value}'"
+ )
eval_overrides = {k.value: v for k, v in eval_overrides.items()} # type: ignore
@@ -193,18 +199,26 @@ def _generate_eval_run_pipelines(self, overrides: Optional[RAGEvaluationOverride
x
),
included_first_outputs={
- RAGExpectedComponent.DOCUMENT_RETRIEVER.value,
- RAGExpectedComponent.RESPONSE_GENERATOR.value,
+ self.rag_components[RAGExpectedComponent.DOCUMENT_RETRIEVER].name,
+ self.rag_components[RAGExpectedComponent.RESPONSE_GENERATOR].name,
},
)
- def _aggregate_rag_outputs(self, outputs: List[Dict[str, Dict[str, Any]]]) -> Dict[str, Dict[str, Any]]:
+ def _aggregate_rag_outputs(
+ self, outputs: List[Dict[str, Dict[str, Any]]]
+ ) -> Dict[str, Dict[str, Any]]:
aggregate = aggregate_batched_pipeline_outputs(outputs)
# We only care about the first response from the generator.
- generator_name = self.rag_components[RAGExpectedComponent.RESPONSE_GENERATOR].name
- replies_output_name = self.rag_components[RAGExpectedComponent.RESPONSE_GENERATOR].output_mapping["replies"]
- aggregate[generator_name][replies_output_name] = [r[0] for r in aggregate[generator_name][replies_output_name]]
+ generator_name = self.rag_components[
+ RAGExpectedComponent.RESPONSE_GENERATOR
+ ].name
+ replies_output_name = self.rag_components[
+ RAGExpectedComponent.RESPONSE_GENERATOR
+ ].output_mapping["replies"]
+ aggregate[generator_name][replies_output_name] = [
+ r[0] for r in aggregate[generator_name][replies_output_name]
+ ]
return aggregate
@@ -247,7 +261,10 @@ def _map_rag_eval_pipeline_io(self) -> Dict[str, List[str]]:
RAGExpectedComponent.DOCUMENT_RETRIEVER,
"retrieved_documents",
),
- "responses": (RAGExpectedComponent.RESPONSE_GENERATOR, "replies"),
+ "predicted_answers": (
+ RAGExpectedComponent.RESPONSE_GENERATOR,
+ "replies",
+ ),
},
}
@@ -266,9 +283,15 @@ def _map_rag_eval_pipeline_io(self) -> Dict[str, List[str]]:
return outputs_to_inputs
- def _prepare_rag_pipeline_inputs(self, inputs: RAGEvaluationInput) -> List[Dict[str, Dict[str, Any]]]:
- query_embedder_name = self.rag_components[RAGExpectedComponent.QUERY_PROCESSOR].name
- query_embedder_text_input = self.rag_components[RAGExpectedComponent.QUERY_PROCESSOR].input_mapping["query"]
+ def _prepare_rag_pipeline_inputs(
+ self, inputs: RAGEvaluationInput
+ ) -> List[Dict[str, Dict[str, Any]]]:
+ query_embedder_name = self.rag_components[
+ RAGExpectedComponent.QUERY_PROCESSOR
+ ].name
+ query_embedder_text_input = self.rag_components[
+ RAGExpectedComponent.QUERY_PROCESSOR
+ ].input_mapping["query"]
if inputs.additional_rag_inputs is not None:
# Ensure that the query embedder input is not provided as additional input.
@@ -284,14 +307,22 @@ def _prepare_rag_pipeline_inputs(self, inputs: RAGEvaluationInput) -> List[Dict[
rag_inputs = deepcopy(inputs.additional_rag_inputs)
if query_embedder_name not in rag_inputs:
rag_inputs[query_embedder_name] = {}
- rag_inputs[query_embedder_name][query_embedder_text_input] = deepcopy(inputs.queries)
+ rag_inputs[query_embedder_name][query_embedder_text_input] = deepcopy(
+ inputs.queries
+ )
else:
- rag_inputs = {query_embedder_name: {query_embedder_text_input: deepcopy(inputs.queries)}}
+ rag_inputs = {
+ query_embedder_name: {
+ query_embedder_text_input: deepcopy(inputs.queries)
+ }
+ }
separate_rag_inputs = deaggregate_batched_pipeline_inputs(rag_inputs)
return separate_rag_inputs
- def _prepare_eval_pipeline_additional_inputs(self, inputs: RAGEvaluationInput) -> Dict[str, Dict[str, Any]]:
+ def _prepare_eval_pipeline_additional_inputs(
+ self, inputs: RAGEvaluationInput
+ ) -> Dict[str, Dict[str, Any]]:
eval_inputs: Dict[str, Dict[str, List[Any]]] = {}
for metric in self.metrics:
@@ -302,18 +333,30 @@ def _prepare_eval_pipeline_additional_inputs(self, inputs: RAGEvaluationInput) -
RAGEvaluationMetric.DOCUMENT_RECALL_MULTI_HIT,
):
if inputs.ground_truth_documents is None:
- raise ValueError(f"Ground truth documents required for metric '{metric.value}'.")
+ raise ValueError(
+ f"Ground truth documents required for metric '{metric.value}'."
+ )
if len(inputs.ground_truth_documents) != len(inputs.queries):
- raise ValueError("Length of ground truth documents should match the number of queries.")
+ raise ValueError(
+ "Length of ground truth documents should match the number of queries."
+ )
- eval_inputs[metric.value] = {"ground_truth_documents": inputs.ground_truth_documents}
+ eval_inputs[metric.value] = {
+ "ground_truth_documents": inputs.ground_truth_documents
+ }
elif metric == RAGEvaluationMetric.SEMANTIC_ANSWER_SIMILARITY:
if inputs.ground_truth_answers is None:
- raise ValueError(f"Ground truth answers required for metric '{metric.value}'.")
+ raise ValueError(
+ f"Ground truth answers required for metric '{metric.value}'."
+ )
if len(inputs.ground_truth_answers) != len(inputs.queries):
- raise ValueError("Length of ground truth answers should match the number of queries.")
+ raise ValueError(
+ "Length of ground truth answers should match the number of queries."
+ )
- eval_inputs[metric.value] = {"ground_truth_answers": inputs.ground_truth_answers}
+ eval_inputs[metric.value] = {
+ "ground_truth_answers": inputs.ground_truth_answers
+ }
elif metric == RAGEvaluationMetric.ANSWER_FAITHFULNESS:
eval_inputs[metric.value] = {"questions": inputs.queries}
@@ -326,13 +369,20 @@ def _validate_rag_components(
):
for e in RAGExpectedComponent:
if e not in components:
- raise ValueError(f"RAG evaluation harness requires metadata for the '{e.value}' component.")
+ raise ValueError(
+ f"RAG evaluation harness requires metadata for the '{e.value}' component."
+ )
- pipeline_outputs = pipeline.outputs(include_components_with_connected_outputs=True)
+ pipeline_outputs = pipeline.outputs(
+ include_components_with_connected_outputs=True
+ )
pipeline_inputs = pipeline.inputs(include_components_with_connected_inputs=True)
for component, metadata in components.items():
- if metadata.name not in pipeline_outputs or metadata.name not in pipeline_inputs:
+ if (
+ metadata.name not in pipeline_outputs
+ or metadata.name not in pipeline_inputs
+ ):
raise ValueError(
f"Expected '{component.value}' component named '{metadata.name}' not found in pipeline."
)
diff --git a/pyproject.toml b/pyproject.toml
index 85214d0e..78245150 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -51,7 +51,7 @@ extra-dependencies = [
]
[tool.hatch.envs.test.scripts]
-unit = 'pytest --cov-report xml:coverage.xml --cov="haystack-experimental" -m "not integration" {args:test}'
+unit = 'pytest --cov-report xml:coverage.xml --cov="haystack_experimental" -m "not integration" {args:test}'
integration = 'pytest --maxfail=5 -m "integration" {args:test}'
typing = "mypy --install-types --non-interactive {args:haystack_experimental}"
lint = [
@@ -77,10 +77,10 @@ path = "haystack_experimental/version.py"
allow-direct-references = true
[tool.hatch.build.targets.sdist]
-include = ["/haystack-experimental", "/VERSION.txt"]
+include = ["/haystack_experimental", "/VERSION.txt"]
[tool.hatch.build.targets.wheel]
-packages = ["haystack-experimental"]
+packages = ["haystack_experimental"]
[tool.codespell]
ignore-words-list = "ans,astroid,nd,ned,nin,ue,rouge,ist"