Semantic Search with Pinecone and OpenAI

Published

March 24, 2023

Open In Colab

This repository uses OpenAI Embedding API to generate language embeddings and store them in pinecone. Ref. ChatGPT Retrieval Plugin.

In this guide you will learn how to use the OpenAI Embedding API to generate language embeddings, and then index those embeddings in the Pinecone vector database for fast and scalable vector search.

This is a powerful and common combination for building semantic search, question-answering, threat-detection, and other applications that rely on NLP and search over a large corpus of text data.

The basic workflow looks like this:

Embed and index

Search

Architecture overview

Let’s get started…

Setup

We first need to setup our environment and retrieve API keys for OpenAI and Pinecone. Let’s start with our environment, we need HuggingFace Datasets for our data, and the OpenAI and Pinecone clients:

!pip install -qU pinecone-client openai datasets
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 177.2/177.2 KB 3.5 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 70.1/70.1 KB 869.1 kB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 469.0/469.0 KB 20.4 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 KB 3.4 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 283.7/283.7 KB 15.1 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 14.5 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.9/132.9 KB 8.7 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 110.5/110.5 KB 5.1 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 212.2/212.2 KB 3.6 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.8/199.8 KB 7.7 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 264.6/264.6 KB 5.1 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 158.8/158.8 KB 8.5 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 114.2/114.2 KB 3.8 MB/s eta 0:00:00

Creating Embeddings

Then we initialize our connection to OpenAI Embeddings and Pinecone vector DB. Sign up for an API key over at OpenAI and Pinecone.

import openai
import os

openai.api_key = "XXXXX"
# get API key from top-right dropdown on OpenAI website

openai.Engine.list()  # check we have authenticated
<OpenAIObject list at 0x7fe2c254be00> JSON: {
  "data": [
    {
      "created": null,
      "id": "babbage",
      "object": "engine",
      "owner": "openai",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "davinci",
      "object": "engine",
      "owner": "openai",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "babbage-code-search-code",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-similarity-babbage-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-davinci-001",
      "object": "engine",
      "owner": "openai",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "ada",
      "object": "engine",
      "owner": "openai",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "curie-instruct-beta",
      "object": "engine",
      "owner": "openai",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "babbage-code-search-text",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "babbage-similarity",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "whisper-1",
      "object": "engine",
      "owner": "openai-internal",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "code-search-babbage-text-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-curie-001",
      "object": "engine",
      "owner": "openai",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "code-search-babbage-code-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-ada-001",
      "object": "engine",
      "owner": "openai",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-embedding-ada-002",
      "object": "engine",
      "owner": "openai-internal",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-similarity-ada-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "ada-code-search-code",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "ada-similarity",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-davinci-003",
      "object": "engine",
      "owner": "openai-internal",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "code-search-ada-text-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-search-ada-query-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "davinci-search-document",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "ada-code-search-text",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-search-ada-doc-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "davinci-instruct-beta",
      "object": "engine",
      "owner": "openai",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-similarity-curie-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "code-search-ada-code-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "ada-search-query",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-search-davinci-query-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "curie-search-query",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "gpt-3.5-turbo-0301",
      "object": "engine",
      "owner": "openai",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "davinci-search-query",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "babbage-search-document",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "ada-search-document",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-search-curie-query-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-search-babbage-doc-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "gpt-3.5-turbo",
      "object": "engine",
      "owner": "openai",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "curie-search-document",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-search-curie-doc-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "babbage-search-query",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-babbage-001",
      "object": "engine",
      "owner": "openai",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-search-davinci-doc-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-search-babbage-query-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "curie-similarity",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "curie",
      "object": "engine",
      "owner": "openai",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-similarity-davinci-001",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "text-davinci-002",
      "object": "engine",
      "owner": "openai",
      "permissions": null,
      "ready": true
    },
    {
      "created": null,
      "id": "davinci-similarity",
      "object": "engine",
      "owner": "openai-dev",
      "permissions": null,
      "ready": true
    }
  ],
  "object": "list"
}

We can now create embeddings with the OpenAI Ada similarity model like so:

MODEL = "text-embedding-ada-002"

res = openai.Embedding.create(
    input=[
        "Sample document text goes here",
        "there will be several phrases in each batch"
    ], engine=MODEL
)
res
<OpenAIObject list at 0x7fe2b4597310> JSON: {
  "data": [
    {
      "embedding": [
        -0.0031135426834225655,
        0.011766765266656876,
        -0.00509151816368103,
        -0.027159256860613823,
        -0.01633599027991295,
        0.03237545117735863,
        -0.016160769388079643,
        -0.0010808103252202272,
        -0.02583836019039154,
        -0.006641550455242395,
        0.02012345939874649,
        0.016672953963279724,
        -0.009178885258734226,
        0.02331787347793579,
        -0.010149340145289898,
        0.013458321802318096,
        0.02527226135134697,
        -0.016915567219257355,
        0.012056553736329079,
        -0.01636294648051262,
        -0.004303023684769869,
        -0.006402306258678436,
        -0.00437378603965044,
        0.020810864865779877,
        -0.010567175224423409,
        -0.003726816037669778,
        0.013626803644001484,
        -0.02635054476559162,
        -0.0004172029148321599,
        -0.0021852082572877407,
        0.00576881505548954,
        -0.01012912206351757,
        -0.02817014791071415,
        -0.01622816175222397,
        -0.004255848936736584,
        0.007426674943417311,
        -0.002897885860875249,
        -0.031431954354047775,
        0.023843536153435707,
        -0.03329199180006981,
        -0.0003548646636772901,
        0.013087661936879158,
        0.007123407907783985,
        -0.0056812041439116,
        0.003057943657040596,
        -0.029814528301358223,
        0.02621575817465782,
        -0.004663574509322643,
        0.0066348109394311905,
        0.017481666058301926,
        0.027280563488602638,
        0.015756413340568542,
        -0.02218567579984665,
        0.00282038445584476,
        -0.006459590047597885,
        0.00635850103572011,
        -0.016942523419857025,
        0.020029108971357346,
        0.0034606149420142174,
        -0.0034943113569170237,
        -0.0011305124498903751,
        0.003568443236872554,
        -0.0026889685541391373,
        -0.012494605965912342,
        -0.018074721097946167,
        -0.03517898917198181,
        -0.031701523810625076,
        0.007547982037067413,
        0.00705601554363966,
        0.005556527990847826,
        0.02068955823779106,
        0.010998488403856754,
        -0.011611761525273323,
        -0.01738731563091278,
        0.006621332373470068,
        0.01014260109513998,
        -0.012110468000173569,
        -0.012380038388073444,
        0.00031506086816079915,
        -0.001085864845663309,
        0.004619769286364317,
        -0.026660550385713577,
        -0.002372222952544689,
        0.03202500939369202,
        0.009044099599123001,
        0.014125509187579155,
        0.018182549625635147,
        0.02900581620633602,
        -0.021066956222057343,
        -0.017346879467368126,
        -0.005933926906436682,
        0.015891198068857193,
        -0.0043535684235394,
        0.01700991578400135,
        -0.013235925696790218,
        0.021983496844768524,
        -0.005388046149164438,
        0.024355720728635788,
        0.0038211659993976355,
        -0.0409478023648262,
        0.008478001691401005,
        0.00987302977591753,
        -0.012110468000173569,
        -0.010284125804901123,
        -0.03938429057598114,
        0.0057519664987921715,
        0.016268596053123474,
        -0.014772479422390461,
        0.01609337516129017,
        0.014381601475179195,
        -0.021484792232513428,
        0.012615912593901157,
        -0.004602921195328236,
        -0.03318416327238083,
        0.01420638058334589,
        0.004626508802175522,
        -0.004407482221722603,
        -0.021956540644168854,
        0.0011195611441507936,
        -0.0051690200343728065,
        -0.013276360929012299,
        0.026121409609913826,
        0.04003126174211502,
        -0.01644381880760193,
        0.01395028829574585,
        0.023695271462202072,
        -0.005111736245453358,
        -0.031890224665403366,
        0.012723741121590137,
        -0.005903600249439478,
        0.018074721097946167,
        0.042457398027181625,
        0.024180499836802483,
        0.02055477164685726,
        -0.02822406217455864,
        0.018789084628224373,
        -0.04550354927778244,
        0.019139526411890984,
        -0.021902626380324364,
        -0.01746818609535694,
        0.008889096789062023,
        0.03490941599011421,
        -0.006193388719111681,
        -0.006314695812761784,
        0.006934708449989557,
        0.011113055981695652,
        0.000630964117590338,
        -0.021080436185002327,
        0.01086370274424553,
        -0.01384245976805687,
        0.01086370274424553,
        0.0023705381900072098,
        -0.00705601554363966,
        0.012002639472484589,
        0.0037672517355531454,
        0.02624271623790264,
        0.012474387884140015,
        -0.003844753373414278,
        -0.0113624082878232,
        -0.0204739011824131,
        0.008134298026561737,
        0.01450290810316801,
        0.019382139667868614,
        -0.010122383013367653,
        0.010432389564812183,
        0.04140607267618179,
        0.002699077595025301,
        -0.010701959952712059,
        0.0003576024901121855,
        -0.0176838431507349,
        -0.024477027356624603,
        0.016969481483101845,
        -0.04566529020667076,
        0.00417160801589489,
        -0.03313025087118149,
        0.02459833398461342,
        0.014974657446146011,
        0.015028571709990501,
        -0.009138450026512146,
        -0.023169608786702156,
        -0.019840409979224205,
        0.008006252348423004,
        0.011861114762723446,
        0.037200767546892166,
        -0.036499883979558945,
        -0.003689750097692013,
        -0.015527277253568172,
        0.00045026745647192,
        0.0026283152401447296,
        0.000650760717689991,
        0.00801973044872284,
        0.010479564778506756,
        0.005034234374761581,
        -0.023573964834213257,
        -0.690963864326477,
        -0.021147828549146652,
        -0.003753773169592023,
        -0.011773504316806793,
        0.025717053562402725,
        0.02068955823779106,
        0.01173980813473463,
        0.01018303632736206,
        -0.010439128614962101,
        0.014085073955357075,
        -0.023142652586102486,
        0.0053240228444337845,
        -0.0109580522403121,
        -0.003015823196619749,
        -0.01749514415860176,
        -0.01888343319296837,
        0.0001238340773852542,
        0.0038009481504559517,
        -0.01915300451219082,
        0.007891684770584106,
        0.0001177266167360358,
        0.013532453216612339,
        -0.02892494574189186,
        0.013775067403912544,
        0.01250134501606226,
        -0.0008836867054924369,
        0.005010646767914295,
        -0.01638990454375744,
        0.0029720179736614227,
        0.02438267692923546,
        -0.037389468401670456,
        -0.01106588076800108,
        -0.005044343415647745,
        0.02242828905582428,
        0.053779371082782745,
        -0.00013826032227370888,
        -0.00014478899538516998,
        -0.0073255859315395355,
        0.011247840709984303,
        0.013235925696790218,
        -0.018317334353923798,
        -0.0174142736941576,
        0.006051864009350538,
        -0.015877719968557358,
        -0.0013933440204709768,
        0.00160310382489115,
        0.029895400628447533,
        0.01163197960704565,
        0.01771080121397972,
        0.027213171124458313,
        -0.005600333213806152,
        0.000994884641841054,
        0.015608148649334908,
        -0.005987841170281172,
        0.011881332844495773,
        0.001907213358208537,
        0.036661628633737564,
        -0.02438267692923546,
        0.016430338844656944,
        0.026795336976647377,
        0.005286957137286663,
        0.022684382274746895,
        -0.01446247287094593,
        -0.017926456406712532,
        -0.0058058807626366615,
        0.006698834244161844,
        -0.00988650880753994,
        0.003854862181469798,
        0.027509698644280434,
        -0.014826393686234951,
        0.01117370929569006,
        0.018842998892068863,
        -0.020878257229924202,
        -0.024342242628335953,
        0.005613811779767275,
        0.011881332844495773,
        0.013754849322140217,
        -0.005044343415647745,
        -0.011295015923678875,
        0.01668643206357956,
        0.018479077145457268,
        0.007925380952656269,
        -0.036985110491514206,
        -0.015608148649334908,
        0.01882951892912388,
        -0.0038514926563948393,
        -0.042080000042915344,
        -0.0065303524024784565,
        0.002055477350950241,
        0.009098013862967491,
        0.009899986907839775,
        0.021417399868369102,
        -0.0065573095344007015,
        0.006857207044959068,
        0.005003907717764378,
        0.011463497765362263,
        -0.0029484303668141365,
        0.006537091452628374,
        0.009333888068795204,
        -0.005596963223069906,
        0.002249231329187751,
        0.02432876266539097,
        -0.01419290155172348,
        0.006981883198022842,
        0.030596284195780754,
        0.001833081361837685,
        -0.002119500422850251,
        0.011133273132145405,
        0.01703687384724617,
        -0.013977245427668095,
        0.0027344587724655867,
        -0.0002377698547206819,
        -0.00859930831938982,
        -0.024126585572957993,
        -0.01700991578400135,
        -0.031458910554647446,
        0.011854375712573528,
        0.00046795804519206285,
        0.015271184965968132,
        0.009657373651862144,
        0.019705625250935555,
        0.010189775377511978,
        -0.0026754899881780148,
        0.0007202594424597919,
        0.015527277253568172,
        0.0066887252032756805,
        -0.010668263770639896,
        -0.0324024073779583,
        -0.0028119601774960756,
        -0.011989160440862179,
        -0.011975682340562344,
        0.0027580461464822292,
        0.04528789222240448,
        -0.016349468380212784,
        0.013532453216612339,
        0.004296284634619951,
        0.019085612148046494,
        -0.0063113258220255375,
        -0.005361089017242193,
        -0.014125509187579155,
        -0.02353353053331375,
        0.015001614578068256,
        -0.006890903227031231,
        -0.011092837899923325,
        0.009805637411773205,
        -0.02028520219027996,
        -0.024625292047858238,
        -0.0022037411108613014,
        0.003922254778444767,
        -0.004505201708525419,
        -0.01126805879175663,
        -0.010560435242950916,
        -0.02339874394237995,
        0.006473068613559008,
        0.004144650883972645,
        -0.004990429151803255,
        0.006139474455267191,
        -0.02808927558362484,
        -0.01029086485505104,
        -0.013060704804956913,
        0.004141281358897686,
        0.018573427572846413,
        -0.0227248165756464,
        -0.0006326489383354783,
        -0.009246277622878551,
        -0.020756950601935387,
        -0.026175323873758316,
        0.020487379282712936,
        -0.01167241483926773,
        -0.030542369931936264,
        -0.005131953861564398,
        -0.012535041198134422,
        -0.00109344650991261,
        -0.001085864845663309,
        0.014651171863079071,
        -0.015176835469901562,
        -0.02044694498181343,
        0.0011625239858403802,
        0.027428828179836273,
        -0.025878796353936195,
        0.011510672979056835,
        0.014583779498934746,
        0.0168751310557127,
        0.015958590433001518,
        0.021390441805124283,
        0.012986572459340096,
        0.0015592984855175018,
        0.015904676169157028,
        -0.015540756285190582,
        -0.002311569405719638,
        0.020864779129624367,
        -0.006045124959200621,
        -0.010378475300967693,
        0.01310787908732891,
        -0.005694682709872723,
        0.004282806068658829,
        -0.0227248165756464,
        0.017427751794457436,
        0.018923869356513023,
        0.0002628315123729408,
        0.021511748433113098,
        0.0082353875041008,
        0.01411203108727932,
        -0.010048250667750835,
        0.003236534306779504,
        -0.03399287536740303,
        -0.0035819218028336763,
        -0.025959666818380356,
        0.009448455646634102,
        0.012110468000173569,
        0.0033932223450392485,
        -0.02044694498181343,
        -0.026943599805235863,
        0.0040671490132808685,
        0.010169558227062225,
        0.02004258707165718,
        -0.0038885585963726044,
        -0.0036729020066559315,
        -0.0013158423826098442,
        0.0011667360085994005,
        0.008633004501461983,
        -0.006318065337836742,
        0.017926456406712532,
        -0.007008840329945087,
        -0.007750160060822964,
        0.01944953203201294,
        0.01609337516129017,
        0.0374433808028698,
        0.011113055981695652,
        -0.01457030139863491,
        -0.0009199103224091232,
        0.005475656595081091,
        -0.0013065759558230639,
        -0.0003424391325097531,
        0.027010992169380188,
        0.013289839960634708,
        0.019274311140179634,
        -0.016780780628323555,
        0.03897993639111519,
        -0.006031646393239498,
        -0.01633599027991295,
        0.021323049440979958,
        0.021376963704824448,
        -0.013235925696790218,
        0.014381601475179195,
        -0.022037411108613014,
        0.015203792601823807,
        0.019975194707512856,
        -0.008053427562117577,
        0.00046374599332921207,
        0.0014363068621605635,
        0.013559410348534584,
        -0.00803320948034525,
        0.013518975116312504,
        0.026727942749857903,
        -0.006867315620183945,
        -0.0015963645419105887,
        0.01008868683129549,
        0.00488934013992548,
        0.016322510316967964,
        0.018519513309001923,
        -0.013080921955406666,
        -0.003367949975654483,
        0.004892709665000439,
        0.020891735330224037,
        -0.0068403584882617,
        -0.0023671684321016073,
        -0.004906188230961561,
        -0.01784558594226837,
        0.0005930557381361723,
        0.004993798676878214,
        -0.01277091633528471,
        0.012952876277267933,
        -0.017266009002923965,
        0.02180827595293522,
        0.008424087427556515,
        0.01628207601606846,
        0.008936272002756596,
        0.0015432927757501602,
        -0.0050611915066838264,
        -0.017212094739079475,
        -0.03787469491362572,
        0.0013242665445432067,
        0.010998488403856754,
        0.005954144522547722,
        -0.0015112812398001552,
        -0.007743421010673046,
        0.01668643206357956,
        -0.014583779498934746,
        -0.0005206085625104606,
        0.006146213971078396,
        0.005428481847047806,
        0.007871466688811779,
        -0.011288276873528957,
        0.004164868500083685,
        0.012838308699429035,
        0.0039054066874086857,
        0.0036156182177364826,
        -0.018708212301135063,
        0.010418910533189774,
        0.011288276873528957,
        -0.002080749487504363,
        -0.023910928517580032,
        -0.024234414100646973,
        0.04358959570527077,
        -0.0137481102719903,
        -0.007136886473745108,
        0.0019409096566960216,
        -0.009286713786423206,
        -0.021242177113890648,
        0.012063292786478996,
        0.002414343412965536,
        -0.02202393300831318,
        -0.0008596780826337636,
        0.01936866156756878,
        0.0009510794188827276,
        -0.011126534081995487,
        0.015055528841912746,
        0.02573053166270256,
        0.00801973044872284,
        0.0017977001843973994,
        -0.02857450395822525,
        -0.013869416899979115,
        0.012272209860384464,
        0.06038385629653931,
        0.05124540627002716,
        0.0057283793576061726,
        0.0039087762124836445,
        0.008282562717795372,
        -0.0053779371082782745,
        -0.013471799902617931,
        -0.013518975116312504,
        0.017400793731212616,
        -0.021188264712691307,
        -0.0061293658800423145,
        -0.004673683550208807,
        0.019436053931713104,
        0.0026653811801224947,
        0.02223959006369114,
        -0.006803292781114578,
        0.010364997200667858,
        0.013741371221840382,
        -0.01152415107935667,
        -0.018263420090079308,
        0.007938859984278679,
        0.010479564778506756,
        0.0010083632078021765,
        0.008619525469839573,
        0.020756950601935387,
        -0.02256307564675808,
        0.010048250667750835,
        0.014435515739023685,
        -0.006702203769236803,
        -0.024477027356624603,
        -0.016457296907901764,
        0.01644381880760193,
        0.016834694892168045,
        0.023641357198357582,
        -0.0037840998265892267,
        0.030973684042692184,
        -0.010897398926317692,
        -0.013909852132201195,
        0.005286957137286663,
        0.0038009481504559517,
        0.00838365126401186,
        0.006041755434125662,
        0.011038923636078835,
        0.0033174054697155952,
        -0.00212286994792521,
        0.0031438693404197693,
        -0.021983496844768524,
        0.0032399038318544626,
        -0.013330275192856789,
        -0.003416809719055891,
        0.0017724279314279556,
        -0.007460371591150761,
        0.018155591562390327,
        -0.013033747673034668,
        0.017670365050435066,
        0.018546469509601593,
        0.009408020414412022,
        0.010553696192800999,
        -0.00648654717952013,
        -0.025851838290691376,
        -0.00553294038400054,
        -0.001615739893168211,
        -0.009542806074023247,
        -0.009286713786423206,
        -0.004444548394531012,
        -0.024625292047858238,
        -0.010668263770639896,
        -0.0013613324845209718,
        -0.02578444592654705,
        0.010358257219195366,
        0.007426674943417311,
        0.0022037411108613014,
        -0.014489430002868176,
        0.0033393080811947584,
        0.01117370929569006,
        0.00147926970385015,
        -0.003595400368794799,
        -0.004680422600358725,
        -0.010728917084634304,
        -0.00023355781740974635,
        -0.00696840463206172,
        -0.014287251979112625,
        0.01148371584713459,
        -0.02275177463889122,
        -0.0008744202204979956,
        0.015918154269456863,
        0.0005580957513302565,
        0.001140621374361217,
        0.0003527586522977799,
        0.027064906433224678,
        -0.005057821981608868,
        0.008525175973773003,
        -0.009879769757390022,
        -0.031701523810625076,
        -0.0022627098951488733,
        -0.018222985789179802,
        0.006041755434125662,
        -0.012710263021290302,
        -0.004471505526453257,
        -0.020770428702235222,
        -0.010931095108389854,
        -0.00028957799077033997,
        -0.000423099787440151,
        -0.0061563230119645596,
        0.0035246380139142275,
        0.001002466306090355,
        -0.0015104388585314155,
        0.012898962013423443,
        -0.008039948530495167,
        -0.0019493337022140622,
        0.004717488773167133,
        -0.01117370929569006,
        -0.0011852690950036049,
        -0.013370711356401443,
        0.011369148269295692,
        0.012979833409190178,
        -0.006169801577925682,
        0.02500269003212452,
        0.0022997758351266384,
        -0.015459884889423847,
        0.012872004881501198,
        -0.019786495715379715,
        0.013444842770695686,
        0.024854427203536034,
        0.009239538572728634,
        0.023169608786702156,
        -0.022576553747057915,
        -0.00488934013992548,
        0.0036830108147114515,
        -0.012993311509490013,
        -0.007952338084578514,
        0.008417347446084023,
        -0.0022054261062294245,
        -0.018654298037290573,
        -0.0264583732932806,
        -0.001937540015205741,
        0.0013647021260112524,
        0.009279974736273289,
        -0.023061780259013176,
        -0.011854375712573528,
        -0.018842998892068863,
        0.004980320110917091,
        0.00953606702387333,
        -0.0037065984215587378,
        -0.011220883578062057,
        -0.025851838290691376,
        -0.0032062076497823,
        -0.002513747662305832,
        -0.012326124124228954,
        0.016592081636190414,
        0.005195976700633764,
        -0.004562485497444868,
        -0.00828930176794529,
        -0.0029130494222044945,
        0.004727597814053297,
        -0.02554183267056942,
        0.009589980356395245,
        0.010627828538417816,
        0.018492555245757103,
        0.017993850633502007,
        0.026040537282824516,
        -0.0005113420775160193,
        0.015581191517412663,
        0.012063292786478996,
        -0.00885540060698986,
        -0.0026283152401447296,
        0.004980320110917091,
        -0.010695220902562141,
        -0.01665947400033474,
        -0.0027799487579613924,
        0.010513260960578918,
        0.011510672979056835,
        0.010789570398628712,
        -0.018964305520057678,
        0.013195489533245564,
        0.005108366254717112,
        -0.004484984092414379,
        0.003132075536996126,
        0.004798360168933868,
        -0.023007865995168686,
        -0.008376912213861942,
        0.011409583501517773,
        -0.0132291866466403,
        0.014651171863079071,
        -0.02905973047018051,
        0.0027007623575627804,
        0.05191933363676071,
        -0.005684574134647846,
        0.006577527150511742,
        0.004575964063405991,
        0.008713875897228718,
        -0.015729455277323723,
        -0.0017084048595279455,
        -0.020163895562291145,
        -0.00046795804519206285,
        -0.01312135811895132,
        0.01695600338280201,
        -0.021242177113890648,
        0.003511159447953105,
        0.04615052044391632,
        0.016592081636190414,
        0.003298872383311391,
        0.0033207752276211977,
        0.019786495715379715,
        0.007291889749467373,
        -0.01907213404774666,
        0.01014260109513998,
        0.0023486355785280466,
        -0.0033881678245961666,
        0.0005909497267566621,
        -0.03207892179489136,
        0.0029113644268363714,
        -0.0030781615059822798,
        -0.011328712105751038,
        -0.002417712938040495,
        0.01907213404774666,
        0.006392197217792273,
        0.005957514513283968,
        -0.036526840180158615,
        -0.01393680926412344,
        -0.002867559203878045,
        -0.013613324612379074,
        0.05191933363676071,
        0.017562536522746086,
        -0.0021060218568891287,
        0.01384245976805687,
        -0.00827582273632288,
        -0.015459884889423847,
        0.01641686074435711,
        -0.007959077134728432,
        -0.011126534081995487,
        0.043185241520404816,
        0.03183630853891373,
        -0.007237975485622883,
        0.0027866880409419537,
        0.010412171483039856,
        0.024530941620469093,
        0.012150903232395649,
        -0.013134836219251156,
        0.00999433733522892,
        0.017670365050435066,
        -0.0013840774772688746,
        -0.021660013124346733,
        -0.008996925316751003,
        -0.05272804573178291,
        0.026943599805235863,
        0.0059170788154006,
        0.0018297117203474045,
        -0.01173980813473463,
        -0.009050839580595493,
        -0.020029108971357346,
        0.005849685985594988,
        -0.0172794871032238,
        0.01955736055970192,
        0.00873409304767847,
        -0.012036335654556751,
        -0.011503932997584343,
        0.01385593879967928,
        -0.024463549256324768,
        -0.00431987177580595,
        -0.005138692911714315,
        0.018101679161190987,
        -0.024086149409413338,
        0.004589442629367113,
        0.008606047369539738,
        0.01944953203201294,
        -0.012615912593901157,
        0.0004561643290799111,
        0.0005500928964465857,
        0.02884407341480255,
        -0.016214683651924133,
        -0.007029058411717415,
        -0.0026687507051974535,
        -0.0008592568919993937,
        0.009967380203306675,
        -0.004697271157056093,
        -0.004016604740172625,
        -0.005536309909075499,
        -0.011463497765362263,
        -0.014489430002868176,
        0.005536309909075499,
        0.008424087427556515,
        -0.012723741121590137,
        -0.01795341446995735,
        -0.0053846766240894794,
        -0.021107392385601997,
        -0.012063292786478996,
        -0.01317527238279581,
        0.00023292600235436112,
        -0.030191928148269653,
        -0.036607712507247925,
        0.016349468380212784,
        0.010486303828656673,
        0.013343754224479198,
        0.0059979502111673355,
        -0.019840409979224205,
        0.02041998691856861,
        0.03992343321442604,
        -0.004933145362883806,
        0.005067930556833744,
        0.0033291992731392384,
        0.004383895080536604,
        -0.02250916138291359,
        -0.0015382382553070784,
        -0.008134298026561737,
        0.0016612299950793386,
        0.021242177113890648,
        -0.018128635361790657,
        -0.02765796333551407,
        -0.01178024336695671,
        -0.00045068864710628986,
        0.013620063662528992,
        0.003848122898489237,
        -0.015365534462034702,
        0.004720858298242092,
        0.00547902612015605,
        0.003780730301514268,
        0.018438640981912613,
        -0.025717053562402725,
        0.022711338475346565,
        -0.0009190678829327226,
        -0.0063652400858700275,
        -0.001214753370732069,
        -0.023735707625746727,
        -0.0004302602610550821,
        0.004788251128047705,
        0.007507546339184046,
        0.011348930187523365,
        -0.04027387499809265,
        -0.018142113462090492,
        -0.002424452221021056,
        0.015379013493657112,
        -0.003327514510601759,
        -0.010304342955350876,
        -0.021821755915880203,
        -0.0011153491213917732,
        -0.009421499446034431,
        -0.0034184944815933704,
        0.018182549625635147,
        -0.0145568223670125,
        -0.007918641902506351,
        0.00988650880753994,
        -0.004484984092414379,
        0.008558872155845165,
        -0.007608635351061821,
        0.010991748422384262,
        -0.03523290157318115,
        -0.01679426059126854,
        -0.016511211171746254,
        -0.018506035208702087,
        -0.00637871865183115,
        0.025663139298558235,
        0.008646482601761818,
        -0.007271672133356333,
        -0.016187725588679314,
        -0.01271700207144022,
        -0.03924950584769249,
        -0.022953951731324196,
        -0.0061765406280756,
        -0.0023705381900072098,
        0.021376963704824448,
        0.030650198459625244,
        -0.0015938372816890478,
        0.030569327995181084,
        -0.0009628731640987098,
        0.0332111194729805,
        -0.03534073010087013,
        -0.01122762355953455,
        0.01719861663877964,
        -0.019355181604623795,
        -0.007574939168989658,
        0.006823510397225618,
        -0.019489968195557594,
        -0.006877424661070108,
        0.03889906406402588,
        0.004559115972369909,
        -0.0036931198555976152,
        0.03334590792655945,
        -0.001848244690336287,
        -0.02763100527226925,
        -0.008039948530495167,
        0.006961665581911802,
        0.0011102947173640132,
        -0.007689506746828556,
        0.0010707015171647072,
        -0.007170583121478558,
        -0.010809788480401039,
        -0.002271133940666914,
        -0.013161793351173401,
        -0.007251454051584005,
        0.004151389934122562,
        0.01045260764658451,
        0.001937540015205741,
        0.00578903267160058,
        -0.027186213061213493,
        -0.012986572459340096,
        -0.018479077145457268,
        -0.014759000390768051,
        0.0273614339530468,
        0.0046332478523254395,
        -0.014961178414523602,
        0.036904241889715195,
        -0.009044099599123001,
        -0.0030225624796003103,
        -0.01625511795282364,
        0.023358307778835297,
        -0.016645995900034904,
        -0.012413734570145607,
        0.002633369527757168,
        -0.02339874394237995,
        -0.02342570200562477,
        -0.0031994683668017387,
        -0.00514543242752552,
        -0.021592620760202408,
        0.007345804013311863,
        -0.005121844820678234,
        -0.010108904913067818,
        -0.015756413340568542,
        -0.008808225393295288,
        0.00661459332332015,
        -0.024773554876446724,
        -0.04561137780547142,
        -0.023034824058413506,
        0.018425162881612778,
        -0.0006229612627066672,
        -0.00936084520071745,
        -0.011719590052962303,
        -0.014893786050379276,
        0.021403919905424118,
        0.01086370274424553,
        -0.011908289045095444,
        -0.007547982037067413,
        0.01993476040661335,
        0.011847635731101036,
        -0.019058654084801674,
        0.021053478121757507,
        0.2296743094921112,
        -0.0002716768067330122,
        0.012986572459340096,
        0.04078606143593788,
        0.013310058042407036,
        0.012332863174378872,
        0.014839871786534786,
        0.0014876937493681908,
        -0.010681742802262306,
        0.007615374866873026,
        0.00715036503970623,
        0.003949211910367012,
        -0.0013840774772688746,
        -0.0003483360051177442,
        0.0273614339530468,
        0.012838308699429035,
        -0.020810864865779877,
        -0.04021996259689331,
        -0.011611761525273323,
        -0.029410172253847122,
        -0.0007501649670302868,
        -0.004414221737533808,
        -0.00022892456036061049,
        -0.010661524720489979,
        0.005846316460520029,
        -0.009003664366900921,
        -0.011092837899923325,
        -0.003871710505336523,
        0.018977783620357513,
        0.015311621129512787,
        -0.010378475300967693,
        -0.013411146588623524,
        0.010425650514662266,
        0.007581678219139576,
        -0.042268700897693634,
        0.020864779129624367,
        0.014907264150679111,
        0.011497193947434425,
        0.022414810955524445,
        0.014341166242957115,
        0.0015399231342598796,
        -0.01730644516646862,
        -0.023007865995168686,
        -0.018896911293268204,
        -0.0016637572553008795,
        0.01413898728787899,
        0.007972556166350842,
        -0.01982693187892437,
        0.008430826477706432,
        0.0021986868232488632,
        -0.009765202179551125,
        0.014125509187579155,
        0.020379550755023956,
        0.012380038388073444,
        0.008983446285128593,
        -0.007237975485622883,
        0.016592081636190414,
        0.013599846512079239,
        -0.024086149409413338,
        0.010520000010728836,
        -0.008100601844489574,
        0.015837283805012703,
        -0.005175759084522724,
        0.017535580322146416,
        -0.011166970245540142,
        -0.005108366254717112,
        -0.015419448725879192,
        -0.020945649594068527,
        -0.01450290810316801,
        -0.0020773799624294043,
        0.0029063101392239332,
        0.005408263765275478,
        -0.00180106982588768,
        0.0013579628430306911,
        -0.006334913428872824,
        -0.014543344266712666,
        0.006762857083231211,
        0.02876320295035839,
        0.017697321251034737,
        0.02763100527226925,
        -0.020069545134902,
        0.0009519218583591282,
        0.018694734200835228,
        -0.023358307778835297,
        -0.025744009763002396,
        -0.02291351743042469,
        -0.002667065942659974,
        0.0009283343679271638,
        -0.009758462198078632,
        -0.01698295958340168,
        -0.017886022105813026,
        -0.01250134501606226,
        -0.012535041198134422,
        -0.016025982797145844,
        0.01773775741457939,
        0.00179601542185992,
        -0.015918154269456863,
        0.016079897060990334,
        -0.006617962848395109,
        -0.0009173830621875823,
        -0.03248327970504761,
        0.03970777615904808,
        0.00406377948820591,
        0.014732043258845806,
        0.003864971222355962,
        6.270680023590103e-05,
        -0.004545637406408787,
        0.006914490833878517,
        -0.009394542314112186,
        -0.011881332844495773,
        0.019463010132312775,
        0.006351761519908905,
        0.015702499076724052,
        -0.008174734190106392,
        -0.01240699551999569,
        0.021134350448846817,
        0.0026738052256405354,
        -0.01709078811109066,
        0.0021060218568891287,
        0.003976169042289257,
        -0.019894324243068695,
        -0.005256630480289459,
        -0.016780780628323555,
        0.0043535684235394,
        -0.016484253108501434,
        -0.013060704804956913,
        -0.005499244201928377,
        -0.00476129399612546,
        0.012535041198134422,
        -0.014839871786534786,
        0.0035448558628559113,
        0.007467110641300678,
        0.006641550455242395,
        0.0033123509492725134,
        -0.007217757869511843,
        8.445147250313312e-05,
        0.0006187491817399859,
        0.011355669237673283,
        -0.019705625250935555,
        0.015486842021346092,
        0.010068468749523163,
        -0.008066905662417412,
        0.002011671895161271,
        -0.013384189456701279,
        0.0015475047985091805,
        -0.005044343415647745,
        0.009657373651862144,
        -0.019247354939579964,
        -0.0018448750488460064,
        -0.017131224274635315,
        -0.027186213061213493,
        -0.013269621878862381,
        -0.008221909403800964,
        0.008026470430195332,
        0.02881711721420288,
        -0.016726868227124214,
        -0.018923869356513023,
        -0.027267085388302803,
        0.016376424580812454,
        -0.014597258530557156,
        -0.03407374769449234,
        -0.000549250456970185,
        0.026849251240491867,
        -0.018802562728524208,
        0.003386483062058687,
        -0.0028136451728641987,
        -0.17619146406650543,
        0.0017286227084696293,
        0.017562536522746086,
        -0.022792210802435875,
        0.008794747292995453,
        -0.012380038388073444,
        0.02602705918252468,
        0.007008840329945087,
        -0.0006596060120500624,
        0.0032500128727406263,
        -0.007467110641300678,
        -0.015257706865668297,
        -0.0353676863014698,
        -0.006200128234922886,
        -0.013673977926373482,
        0.006216976325958967,
        -0.03480158746242523,
        0.010782831348478794,
        0.018964305520057678,
        0.02914060279726982,
        0.0036931198555976152,
        -0.010715438984334469,
        0.01909909024834633,
        -0.031189339235424995,
        0.008504957892000675,
        -0.005738487932831049,
        -0.006853837054222822,
        0.026997514069080353,
        -0.0043906341306865215,
        -0.007763638626784086,
        0.003595400368794799,
        -0.00465346546843648,
        -0.0022846125066280365,
        0.005182498600333929,
        0.011941986158490181,
        -0.002402549609541893,
        0.010675002820789814,
        -0.002993920585140586,
        -0.009495630860328674,
        0.02085130102932453,
        0.014422036707401276,
        0.04127128794789314,
        0.0033039269037544727,
        -0.02427484840154648,
        0.0018128635128960013,
        0.007366021629422903,
        0.019921280443668365,
        -0.004734336864203215,
        0.001702507957816124,
        -0.013357232324779034,
        0.02226654626429081,
        -0.03442418947815895,
        -0.0061024087481200695,
        -0.002523856470361352,
        0.00017595812096260488,
        -0.0007126777782104909,
        0.0033561564050614834,
        -0.013363971374928951,
        -0.006136104930192232,
        0.008349955081939697,
        0.015837283805012703,
        -0.03525985777378082,
        0.010796310380101204,
        0.02600010298192501,
        -0.010634567588567734,
        -0.011908289045095444,
        -0.026943599805235863,
        0.01310787908732891,
        -0.008147777058184147,
        0.009711287915706635,
        -0.018479077145457268,
        -0.021579140797257423,
        -0.008322997950017452,
        -0.005829468369483948,
        0.002921473467722535,
        -0.009920204989612103,
        -0.026121409609913826,
        0.02234741859138012,
        -0.010715438984334469,
        -0.009017142467200756,
        -0.0260540172457695,
        0.02459833398461342,
        -0.007399718277156353,
        0.019382139667868614,
        0.004424330312758684,
        0.015095964074134827,
        -0.02052781544625759,
        -0.008134298026561737,
        0.005448699463158846,
        0.013404407538473606,
        0.04472179338335991,
        -0.008686918765306473,
        -0.015769891440868378,
        -0.004023343790322542,
        0.0037065984215587378,
        0.0187216904014349,
        -0.0017825368558987975,
        0.01950344629585743,
        0.0039087762124836445,
        0.002269448945298791,
        -0.001710089622065425,
        -0.02068955823779106,
        -0.009583241306245327,
        0.010176297277212143,
        0.02916755899786949,
        0.014759000390768051,
        0.01380202453583479,
        -0.00359203084371984,
        0.02197001874446869,
        -0.0003384377050679177,
        -0.04574616253376007,
        0.00431987177580595,
        0.015230749733746052,
        0.012231774628162384,
        -0.0059440359473228455,
        0.03776686638593674,
        -0.02280568890273571,
        -0.0334806926548481,
        0.005987841170281172,
        -0.0023301024921238422,
        0.04089388996362686,
        0.007399718277156353,
        -0.0021312939934432507,
        0.011510672979056835,
        0.01029086485505104,
        -0.008498218841850758,
        -0.08318954706192017,
        -0.01260917354375124,
        0.01866777613759041,
        0.03453201800584793,
        -0.018209505826234818,
        0.015163356438279152,
        -0.011598283424973488,
        0.020703036338090897,
        0.004960102494806051,
        0.0018819411052390933,
        0.003030986525118351,
        -0.018789084628224373,
        -0.008282562717795372,
        -0.022792210802435875,
        0.024355720728635788,
        0.01240699551999569,
        -0.0007307895575650036,
        -0.005819359328597784,
        -0.0015879403799772263,
        0.021821755915880203,
        -0.009812376461923122,
        -0.0025828250218182802,
        0.013390928506851196,
        -0.013269621878862381,
        0.002397495089098811,
        -0.005933926906436682,
        -0.027536656707525253,
        0.02321004495024681,
        0.007399718277156353,
        -0.011679153889417648,
        -0.0034976808819919825,
        -0.009731505066156387,
        0.02095912955701351,
        -0.01310787908732891,
        -0.004882601089775562,
        0.01771080121397972,
        -0.042780883610248566,
        -0.00936084520071745,
        0.0070627545937895775,
        -0.007689506746828556,
        0.002459833398461342,
        0.026606636121869087,
        0.014017680659890175,
        -0.04016604647040367,
        0.0007438468746840954,
        -0.012022856622934341,
        -0.007878206670284271,
        0.037578169256448746,
        0.005307174753397703,
        -0.027307521551847458,
        -0.03552943095564842,
        0.01628207601606846,
        -0.030272798612713814,
        -0.00930693093687296,
        0.030057143419981003,
        0.01652468927204609,
        0.022306982427835464,
        -0.0015828859759494662,
        -0.0051420629024505615,
        -0.0076490710489451885,
        -0.006847098004072905,
        -0.009077795781195164,
        -0.002678859746083617,
        0.029976271092891693,
        -0.004788251128047705,
        0.005320653319358826,
        -0.0164707750082016,
        0.0009140134206973016,
        -0.0012408680049702525,
        -0.01380202453583479,
        0.004090736620128155,
        0.0023469505831599236,
        -0.011200666427612305,
        0.020891735330224037,
        -0.007905162870883942,
        -0.004491723142564297,
        -0.030138013884425163,
        -0.02438267692923546,
        0.01297309435904026,
        -0.005357719492167234,
        -0.017346879467368126,
        -0.016241639852523804,
        -0.010560435242950916,
        0.004057040438055992,
        0.021188264712691307,
        0.02337178774178028,
        0.004087367095053196,
        0.004744445905089378,
        0.014637693762779236,
        -0.03539464250206947,
        0.018694734200835228,
        0.04159477353096008,
        -0.008990185335278511,
        -0.021794797852635384,
        -0.004559115972369909,
        0.006725790910422802,
        -0.0008146092295646667,
        0.005014016758650541,
        0.00720427930355072,
        -0.0040671490132808685,
        -0.03951907902956009,
        -0.02624271623790264,
        -0.06523612886667252,
        0.011800461448729038,
        0.010701959952712059,
        -0.024638770148158073,
        -0.003629096783697605,
        0.018222985789179802,
        -0.0048253173008561134,
        -0.00413791136816144,
        -0.0172794871032238,
        0.006698834244161844,
        -0.02600010298192501,
        0.005782293155789375,
        0.008808225393295288,
        -0.0011136643588542938,
        -0.026202280074357986,
        -0.0036257270257920027,
        0.02063564397394657,
        0.0018297117203474045,
        0.025420526042580605,
        0.025905752554535866,
        0.0009148558601737022,
        -0.021471312269568443,
        -0.0029602241702377796,
        0.010998488403856754,
        -0.01435464434325695,
        0.005617181304842234,
        -0.029787572100758553,
        0.026889685541391373,
        -0.010209993459284306,
        -0.021161306649446487,
        -0.002080749487504363,
        -0.0390608087182045,
        0.0035785522777587175,
        0.010964791290462017,
        -0.0009746668511070311,
        -0.0025305957533419132,
        -0.004407482221722603,
        0.03302242234349251,
        0.005371198058128357,
        0.015244227834045887,
        -0.008309519849717617,
        -0.022495681419968605,
        0.006853837054222822,
        -0.025177910923957825,
        0.0024261369835585356,
        0.02841276116669178,
        -0.025824882090091705,
        -0.02004258707165718,
        0.03555638715624809,
        0.009313670918345451,
        0.011995900422334671,
        -0.0039054066874086857,
        -0.02835884690284729,
        -0.024193977937102318,
        -0.00865322258323431,
        -0.00873409304767847,
        0.014381601475179195,
        0.0015154932625591755,
        0.01762992888689041,
        -0.011018705554306507,
        0.03569117188453674,
        -0.005954144522547722,
        -0.0023570596240460873,
        0.008592569269239902,
        -0.0087071368470788,
        0.00941475946456194,
        -0.02860146015882492,
        0.0056475079618394375,
        -0.008525175973773003,
        -0.021525226533412933,
        -0.03520594537258148,
        -0.02329091541469097,
        -0.010479564778506756,
        0.03809035196900368,
        0.027078386396169662,
        0.016888609156012535,
        -0.008167995139956474,
        0.022333940491080284,
        0.007123407907783985,
        0.02787361852824688,
        0.01963823102414608,
        0.021296091377735138,
        -0.008053427562117577,
        0.009327149018645287,
        0.042187828570604324,
        0.016672953963279724,
        -0.02261698991060257,
        0.004340089857578278,
        -0.013498757034540176,
        0.009704547934234142,
        -0.01086370274424553,
        0.010688481852412224,
        0.01385593879967928,
        0.0012332863407209516,
        -0.008478001691401005,
        -0.013909852132201195,
        -5.823150058859028e-05,
        0.004444548394531012,
        0.02199697680771351,
        0.018020806834101677,
        0.005216194782406092,
        0.009488891810178757,
        -0.0028759832493960857,
        -0.02353353053331375,
        -0.008990185335278511,
        -0.0030596284195780754,
        -0.036769453436136246,
        -0.04709401726722717,
        -0.0007189958123490214,
        0.02085130102932453,
        -0.007898423820734024,
        -0.013384189456701279,
        0.01609337516129017,
        0.01446247287094593,
        -0.03453201800584793,
        0.01665947400033474,
        -0.013417885638773441,
        -0.010425650514662266,
        -0.036311183124780655,
        0.031243253499269485,
        -0.014651171863079071,
        -0.0016485938103869557,
        0.03946516290307045,
        -0.008936272002756596,
        0.023520050570368767,
        0.008821704424917698,
        0.024557897821068764,
        -0.01655164547264576,
        -0.00012130685354350135,
        0.008201691322028637,
        -0.007069493643939495,
        0.018034284934401512,
        -0.012784394435584545,
        -0.026593158021569252,
        0.0026434785686433315,
        -0.010985009372234344,
        -0.014287251979112625,
        0.04472179338335991,
        -0.0037470338866114616,
        0.07494068145751953,
        -0.002940006321296096,
        -0.009050839580595493,
        0.011025445535779,
        -0.015621626749634743,
        0.02763100527226925,
        0.021376963704824448,
        0.01435464434325695,
        -0.012265470810234547,
        0.00713014742359519,
        0.022630468010902405,
        0.007170583121478558,
        -0.000987302977591753,
        -0.016699910163879395,
        -0.020783906802535057,
        -0.01256873831152916,
        -0.010034772567451,
        0.011611761525273323,
        0.003174195997416973,
        0.0020773799624294043,
        0.014219858683645725,
        -0.005040973890572786,
        0.021093914285302162,
        0.016565125435590744,
        -0.010418910533189774,
        -0.0024834207724779844,
        0.02819710411131382,
        -0.027240127325057983,
        -0.01097153127193451,
        -0.016592081636190414,
        -0.0020622164011001587,
        -0.003945842385292053,
        -0.02218567579984665,
        -0.02519139088690281,
        0.00036160394665785134,
        0.015446405857801437,
        -0.008248865604400635,
        -0.027199693024158478,
        -0.0056475079618394375,
        0.009023882448673248,
        0.003945842385292053,
        0.02822406217455864,
        -0.013828981667757034,
        0.002439615549519658,
        -0.03410070389509201,
        0.01111979503184557,
        -0.009367585182189941,
        -0.0006486547063104808,
        -0.013451581820845604
      ],
      "index": 0,
      "object": "embedding"
    },
    {
      "embedding": [
        -0.03310590982437134,
        -0.009949825704097748,
        0.007700179237872362,
        0.01988576538860798,
        -0.005884492304176092,
        0.01623355969786644,
        -0.007484935224056244,
        -0.01571975275874138,
        -0.03416129946708679,
        -0.013942253775894642,
        0.006106679327785969,
        0.03405020385980606,
        -0.016483521088957787,
        0.008172326721251011,
        0.007193314377218485,
        0.00477355532348156,
        0.019024789333343506,
        0.0036036004312336445,
        0.003683449001982808,
        -0.022913066670298576,
        0.003372733946889639,
        0.0012984070926904678,
        -0.010290049947798252,
        -0.0132132014259696,
        -0.025412673130631447,
        0.0065163373947143555,
        0.005384570453315973,
        -0.011775927618145943,
        -0.015414244495332241,
        0.009866504929959774,
        -0.0061830561608076096,
        0.008859719149768353,
        0.0010927102994173765,
        -0.019496936351060867,
        -0.01376867014914751,
        -0.016414087265729904,
        -0.018510980531573296,
        -0.006325394846498966,
        0.006853090133517981,
        -0.009172170422971249,
        0.038716137409210205,
        -0.004922837484627962,
        0.0010822952026501298,
        -0.000612750940490514,
        -0.006689921021461487,
        -0.009380470961332321,
        0.006203886587172747,
        -0.017705552279949188,
        -0.020968927070498466,
        0.01610857993364334,
        0.035494424402713776,
        -0.010324766859412193,
        -0.020010745152831078,
        -0.013983913697302341,
        -0.0018365170108154416,
        0.026162555441260338,
        0.007672405801713467,
        0.010067862458527088,
        -0.015205943956971169,
        0.0009364847792312503,
        0.01798328571021557,
        0.008380627259612083,
        -0.004745782352983952,
        0.025329353287816048,
        -0.023163028061389923,
        -0.009630431421101093,
        0.0007051843567751348,
        0.00645037554204464,
        -0.004047974944114685,
        -0.0007290521170943975,
        0.019316408783197403,
        -0.010741367936134338,
        -0.01295629795640707,
        -0.0021229302510619164,
        0.017594458535313606,
        -0.015067077241837978,
        -0.007970970124006271,
        -0.0051727984100580215,
        0.00857504177838564,
        0.00507906312122941,
        0.014858776703476906,
        -0.020219044759869576,
        -0.0015093114925548434,
        0.018705394119024277,
        0.02071896754205227,
        0.016302993521094322,
        0.00017727249360177666,
        0.012907694093883038,
        -0.01006091944873333,
        -0.0030429246835410595,
        0.020260704681277275,
        0.02035791240632534,
        0.023787928745150566,
        0.015886392444372177,
        -0.014747682958841324,
        0.010005372576415539,
        0.010192843154072762,
        0.05710214003920555,
        0.013803387060761452,
        -0.024218417704105377,
        -0.01781664602458477,
        0.020413460209965706,
        -0.02230205200612545,
        -0.00946379080414772,
        -0.033828020095825195,
        0.005762983579188585,
        0.002369419438764453,
        -0.007158597465604544,
        -0.0015474999090656638,
        0.010498350486159325,
        0.008408401161432266,
        0.04032699763774872,
        0.0032685836777091026,
        -0.03413352742791176,
        -0.01365063339471817,
        0.004863819107413292,
        0.006207358092069626,
        -0.026537496596574783,
        -0.015705864876508713,
        -0.021816017106175423,
        -0.007103050593286753,
        -0.0057664550840854645,
        0.01860818825662136,
        -0.014539382420480251,
        0.009845674969255924,
        0.015414244495332241,
        -0.02257978543639183,
        -0.017636118456721306,
        -0.004912422504276037,
        0.013379842042922974,
        0.02369072288274765,
        0.026676364243030548,
        0.020469006150960922,
        -0.01574752666056156,
        -0.02996751293540001,
        0.004627745132893324,
        -0.03471676632761955,
        -0.004506236407905817,
        -0.021496621891856194,
        -0.021538281813263893,
        0.007755726110190153,
        0.00940824393182993,
        -0.004527066368609667,
        0.014733796007931232,
        0.006481620483100414,
        0.02523214742541313,
        0.029273178428411484,
        0.017205629497766495,
        -0.012664676643908024,
        -0.01745559088885784,
        0.01944139041006565,
        -0.013456218875944614,
        0.009859561920166016,
        -0.00685656163841486,
        0.005270005203783512,
        -0.00310020730830729,
        0.011991171166300774,
        0.012914637103676796,
        -0.037521883845329285,
        0.008012630045413971,
        0.016816802322864532,
        0.010671934112906456,
        0.022801972925662994,
        0.0002391117304796353,
        0.013220145367085934,
        0.02099670097231865,
        0.035577744245529175,
        -0.01678902842104435,
        0.004370841197669506,
        0.0016238768585026264,
        -0.019302522763609886,
        0.0016568577848374844,
        -0.018997015431523323,
        0.012796600349247456,
        0.013643689453601837,
        0.016761254519224167,
        0.012629959732294083,
        -0.007464105263352394,
        -0.01706676371395588,
        -0.04552062600851059,
        0.00873473845422268,
        0.01674736849963665,
        0.017511136829853058,
        0.0071238805539906025,
        -0.014400514774024487,
        -0.006582299247384071,
        0.004308350849896669,
        -0.011303779669106007,
        0.005210986826568842,
        0.010713594034314156,
        -0.0024232303258031607,
        0.013727010227739811,
        0.01237999927252531,
        0.008443118073046207,
        -0.6910025477409363,
        -0.016011374071240425,
        0.011373213492333889,
        -0.027606774121522903,
        0.016122465953230858,
        -0.0009304093546234071,
        0.00021654584270436317,
        -0.012039775028824806,
        -0.020371798425912857,
        0.030106380581855774,
        -0.0019476106390357018,
        0.002645417582243681,
        -0.013379842042922974,
        -0.012150868773460388,
        -0.0006405243766494095,
        -0.015858618542551994,
        0.0021420244593173265,
        -0.01892758160829544,
        0.010408086702227592,
        0.008061232976615429,
        -0.02448226511478424,
        0.013942253775894642,
        -0.0003929504018742591,
        0.027329038828611374,
        -0.006922523491084576,
        -0.007026673760265112,
        0.00952628068625927,
        -0.0023190800566226244,
        -0.02694021165370941,
        -0.004159068688750267,
        -0.015580885112285614,
        0.005210986826568842,
        0.019108109176158905,
        -0.029856421053409576,
        0.04318765923380852,
        0.01980244368314743,
        -0.0069190519861876965,
        0.008477834984660149,
        0.02988419309258461,
        0.019788557663559914,
        -0.028828803449869156,
        -0.0011821059742942452,
        0.005884492304176092,
        -0.003195678349584341,
        -0.010359483771026134,
        0.02868993766605854,
        0.02539878711104393,
        -1.2225455066072755e-05,
        -0.010380313731729984,
        -0.01576141268014908,
        0.0004960158257745206,
        -0.006828788202255964,
        0.012414716184139252,
        -0.0027634548023343086,
        -9.232490265276283e-05,
        0.014261648058891296,
        0.02063564583659172,
        -0.0040757483802735806,
        -0.001805271953344345,
        -0.0064607905223965645,
        0.012109208852052689,
        0.0059018502943217754,
        0.00024128153745550662,
        -0.018274907022714615,
        -0.019135883077979088,
        0.012005058117210865,
        -0.012435546144843102,
        -0.024871092289686203,
        0.024871092289686203,
        -0.014692136086523533,
        -0.0002451871696393937,
        0.008304250426590443,
        0.01017895620316267,
        -0.01367146335542202,
        0.00936658401042223,
        -0.0032755269203335047,
        -0.0028554541058838367,
        -0.01960803009569645,
        0.007755726110190153,
        0.010095636360347271,
        0.0004712801310233772,
        -0.00016251787019427866,
        -0.04329875111579895,
        0.011192685924470425,
        0.012866034172475338,
        0.0019510823767632246,
        -6.0320384363876656e-05,
        -0.012928524054586887,
        -0.019177542999386787,
        -0.004540953319519758,
        -0.012032832019031048,
        -0.01163011696189642,
        0.0005055629299022257,
        -0.04104910418391228,
        0.0031574899330735207,
        -0.008776399306952953,
        -0.00756825553253293,
        0.0043777842074632645,
        0.019816331565380096,
        -0.03885500505566597,
        -0.007984856143593788,
        0.00944296084344387,
        0.0029387744143605232,
        0.003129716496914625,
        0.042798832058906555,
        -0.00012617374886758626,
        -0.015150397084653378,
        0.009908165782690048,
        0.011456533335149288,
        1.1099872608610895e-05,
        0.012560526840388775,
        0.01698344200849533,
        -0.013463162817060947,
        -0.007943196222186089,
        -0.0014147083275020123,
        -0.03952156752347946,
        0.025815388187766075,
        4.763384822581429e-06,
        0.013664519414305687,
        -0.01678902842104435,
        0.030217474326491356,
        0.02182990312576294,
        0.003343224758282304,
        -0.0066274311393499374,
        0.024968300014734268,
        0.006582299247384071,
        -0.005641474854201078,
        -0.006464262027293444,
        0.011060762219130993,
        0.008845832198858261,
        0.0019979500211775303,
        -0.016122465953230858,
        0.021329982206225395,
        -0.016677934676408768,
        0.009776242077350616,
        0.0008870133897289634,
        0.019733009859919548,
        -0.012255018576979637,
        0.0337446965277195,
        -0.041687894612550735,
        -0.0047006504610180855,
        0.012157811783254147,
        0.00042094080708920956,
        -0.005082534626126289,
        -0.0020587043836712837,
        -0.011720380745828152,
        -0.01888592168688774,
        -0.0001436406309949234,
        -0.024996072053909302,
        0.0048811775632202625,
        0.012845204211771488,
        0.0015388206811621785,
        -0.00930409412831068,
        0.013435388915240765,
        -0.003266847925260663,
        0.014942096546292305,
        0.010456690564751625,
        -0.004273633938282728,
        -0.009137453511357307,
        -0.023635175079107285,
        0.017594458535313606,
        0.022288164123892784,
        0.00865141861140728,
        -0.01956637017428875,
        -0.0033605832140892744,
        -0.03468899428844452,
        0.003575826995074749,
        0.016997329890727997,
        -0.001051918021403253,
        -0.025787614285945892,
        0.0036799772642552853,
        -0.0364387184381485,
        0.008089006878435612,
        0.015386471524834633,
        0.010012315586209297,
        0.026134783402085304,
        -0.02475999854505062,
        0.019552484154701233,
        0.008880549110472202,
        -0.020691193640232086,
        0.00944296084344387,
        0.03246711939573288,
        -0.008943038992583752,
        -0.0033779414370656013,
        0.045937225222587585,
        0.02238537184894085,
        0.025607088580727577,
        0.02345464751124382,
        -0.008963868953287601,
        0.028203902766108513,
        0.014650476165115833,
        0.006026830989867449,
        -0.013983913697302341,
        0.006901693530380726,
        0.003860504599288106,
        0.005957397166639566,
        -0.004599971696734428,
        0.0064850919879972935,
        0.00463468860834837,
        0.0053637404926121235,
        0.05263061821460724,
        0.007484935224056244,
        0.013143768534064293,
        -0.001179502229206264,
        -0.0021645904053002596,
        -0.058435264974832535,
        0.00013268314069136977,
        -0.022746426984667778,
        0.023871248587965965,
        0.016080806031823158,
        -0.0020205159671604633,
        -0.027398472651839256,
        -0.016955669969320297,
        -0.008443118073046207,
        -0.026523610576987267,
        0.01242165919393301,
        0.0019719123374670744,
        0.0034942426718771458,
        0.0008865794516168535,
        0.004856875631958246,
        -0.004263218957930803,
        -0.033633604645729065,
        0.027731753885746002,
        0.00783904641866684,
        -0.0392160601913929,
        0.004676348529756069,
        -0.00023043254623189569,
        0.028065035119652748,
        0.0037632975727319717,
        0.0014919530367478728,
        0.017927737906575203,
        0.02580150216817856,
        0.018983129411935806,
        0.0064607905223965645,
        0.010151183232665062,
        0.0073599545285105705,
        0.03616098687052727,
        -0.01758057065308094,
        0.02971755340695381,
        0.016400201246142387,
        -0.0051727984100580215,
        0.022413145750761032,
        0.027828961610794067,
        -0.011616230010986328,
        0.011400986462831497,
        0.004561783280223608,
        0.02349630743265152,
        -0.0064850919879972935,
        -0.012734110467135906,
        -0.0011682192562147975,
        0.005992114078253508,
        0.012525809928774834,
        -0.01881648786365986,
        0.003982013091444969,
        -0.001005918369628489,
        -0.015455905348062515,
        0.018191585317254066,
        0.009241603314876556,
        0.009130509570240974,
        0.013456218875944614,
        -0.009151339530944824,
        0.0047700838185846806,
        0.017566684633493423,
        0.0026297951117157936,
        0.004728423897176981,
        0.0035497895441949368,
        0.012102264910936356,
        0.009359641000628471,
        -0.020024631172418594,
        -0.0014693872071802616,
        0.0031731126364320517,
        -0.013720066286623478,
        -0.009679034352302551,
        -0.030384115874767303,
        0.011095479130744934,
        -0.011074649170041084,
        -0.0007364294142462313,
        -0.007186370901763439,
        0.0015266698319464922,
        0.025287693366408348,
        -0.031772784888744354,
        -0.007540482096374035,
        -0.02524603344500065,
        0.0029509251471608877,
        -0.01083163172006607,
        -0.011616230010986328,
        -0.024357283487915993,
        0.014185271225869656,
        0.005023516248911619,
        -0.012921581044793129,
        0.009679034352302551,
        0.013990857638418674,
        -0.011262119747698307,
        -0.004988799337297678,
        -0.026259763166308403,
        0.005200571846216917,
        0.009672091342508793,
        -0.01246331911534071,
        -0.017038989812135696,
        -0.008311194367706776,
        0.00714471098035574,
        -0.0012341811088845134,
        0.009352697059512138,
        -0.02548210695385933,
        0.017441704869270325,
        -0.007436331827193499,
        -0.027273492887616158,
        -0.012130038812756538,
        0.0029057934880256653,
        0.004922837484627962,
        0.00463468860834837,
        -0.0016542539233341813,
        -0.01710842363536358,
        0.010435860604047775,
        0.019260862842202187,
        -0.003579298732802272,
        0.007297464646399021,
        0.0019163655815646052,
        0.03666090592741966,
        0.00958182755857706,
        0.004898536019027233,
        -0.006762826349586248,
        -0.019830217584967613,
        0.021954884752631187,
        0.050936441868543625,
        0.017747212201356888,
        -0.006964183412492275,
        -0.007332181092351675,
        0.004895064048469067,
        -0.008102893829345703,
        -0.006023359019309282,
        -0.011595400050282478,
        0.01821935921907425,
        -0.008859719149768353,
        -0.019108109176158905,
        -0.01864984817802906,
        -0.003697335720062256,
        -0.003520280122756958,
        0.0031800558790564537,
        -0.008741682395339012,
        -0.007186370901763439,
        -0.012386942282319069,
        0.004617330152541399,
        -0.012025888077914715,
        -0.017927737906575203,
        0.01097049843519926,
        0.020788399502635002,
        0.012498036026954651,
        0.014192214235663414,
        -0.014817116782069206,
        0.0278983935713768,
        0.024357283487915993,
        0.01599748618900776,
        -0.010324766859412193,
        -0.004277105908840895,
        0.010109522379934788,
        0.001904214732348919,
        0.016289107501506805,
        0.004759668838232756,
        0.024676678702235222,
        0.01758057065308094,
        -0.008436174131929874,
        0.017955511808395386,
        -0.007519651670008898,
        -0.001786177745088935,
        0.008186213672161102,
        0.01646963506937027,
        -0.01381033007055521,
        -0.0036730340216308832,
        -0.005936567205935717,
        -0.0020153082441538572,
        0.016636274755001068,
        0.0010892385616898537,
        -0.013699236325919628,
        0.01785830594599247,
        -0.006929466966539621,
        -0.017677778378129005,
        -0.022565899416804314,
        0.002133345464244485,
        0.022232618182897568,
        0.014261648058891296,
        0.006592714227735996,
        -0.02187156304717064,
        -0.0529361255466938,
        -0.017205629497766495,
        -0.01956637017428875,
        0.02302416041493416,
        0.00021578640735242516,
        -0.031772784888744354,
        0.01083163172006607,
        -0.052880581468343735,
        -0.0027808130253106356,
        -0.03874391317367554,
        0.0053081936202943325,
        -0.041215747594833374,
        -0.011164912022650242,
        -0.01885814778506756,
        0.010095636360347271,
        0.02988419309258461,
        0.015691978856921196,
        0.005690078251063824,
        -0.0072349742986261845,
        -0.007970970124006271,
        -0.00326337618753314,
        -0.01301878783851862,
        -0.010359483771026134,
        -0.007165540941059589,
        -0.01606692001223564,
        -0.01749725081026554,
        0.015900280326604843,
        0.0023711551912128925,
        -0.007443274836987257,
        -0.0006639581988565624,
        0.005898378789424896,
        -0.012039775028824806,
        -0.004068805370479822,
        0.012692450545728207,
        -0.004044503439217806,
        -0.00872779544442892,
        0.009727638214826584,
        0.029162084683775902,
        0.010880234651267529,
        -0.0011673512635752559,
        -0.020010745152831078,
        -0.0013478784821927547,
        -0.01307433471083641,
        -0.0016204051207751036,
        -0.004846460651606321,
        0.014761569909751415,
        -0.015691978856921196,
        0.016997329890727997,
        0.01434496883302927,
        -0.006662147585302591,
        0.005999057553708553,
        0.015303150750696659,
        -0.01976078376173973,
        0.00934575404971838,
        0.016358541324734688,
        0.003995900042355061,
        0.017400043085217476,
        -0.005887963809072971,
        0.015372584573924541,
        -0.006127509288489819,
        0.007064862176775932,
        -0.007193314377218485,
        -0.017483364790678024,
        0.009186056442558765,
        -0.0036660905461758375,
        -0.0075821420177817345,
        0.019857991486787796,
        -0.0010571256279945374,
        -0.02103836089372635,
        -0.00648856395855546,
        0.010977442376315594,
        -0.019316408783197403,
        0.02214929834008217,
        -0.002768662292510271,
        -0.01933029666543007,
        -0.04116019979119301,
        -0.01079691480845213,
        -0.012914637103676796,
        0.01317848451435566,
        -0.012970183975994587,
        -0.01369229331612587,
        0.008901379071176052,
        -0.014358854852616787,
        0.00645037554204464,
        -0.017969399690628052,
        0.00934575404971838,
        -0.02099670097231865,
        -0.003351903986185789,
        -0.010067862458527088,
        0.00874862540513277,
        0.023190800100564957,
        0.0025048148818314075,
        0.014817116782069206,
        -0.017608344554901123,
        -0.0037910710088908672,
        -0.023718494921922684,
        -0.01706676371395588,
        -0.0031054147984832525,
        -0.014171384274959564,
        0.015511452220380306,
        0.02905099093914032,
        0.04479851573705673,
        -0.020496780052781105,
        0.01235916931182146,
        0.018997015431523323,
        -0.016122465953230858,
        0.00787376333028078,
        -0.024260077625513077,
        -0.005509551148861647,
        -0.008186213672161102,
        0.009713751263916492,
        0.017122309654951096,
        -0.006846146658062935,
        0.0035220161080360413,
        -0.028939897194504738,
        0.029939740896224976,
        0.02663470432162285,
        -0.0009720695088617504,
        0.007776556070894003,
        -0.0017132725333794951,
        -0.006912108510732651,
        -0.012886864133179188,
        0.004829102195799351,
        -0.00011803700908785686,
        0.015886392444372177,
        0.009116623550653458,
        -0.013421501964330673,
        0.024301737546920776,
        0.003126244992017746,
        0.01089412160217762,
        0.008866662159562111,
        0.013150711543858051,
        -0.0036556755658239126,
        0.006391356699168682,
        0.007686292286962271,
        0.016011374071240425,
        -0.018566526472568512,
        0.009068019688129425,
        -0.01235916931182146,
        -0.007165540941059589,
        0.022399257868528366,
        0.003683449001982808,
        0.01615023985505104,
        -0.007602971978485584,
        -0.00658924225717783,
        -0.002970019355416298,
        -0.02512105368077755,
        -0.047214802354574203,
        -0.01896924152970314,
        -0.01218558568507433,
        0.0065302238799631596,
        -0.017719438299536705,
        -0.010067862458527088,
        -0.019830217584967613,
        -0.004485406447201967,
        -0.0008583720773458481,
        0.0014233874389901757,
        -0.005349854007363319,
        0.02896767109632492,
        -0.012150868773460388,
        -0.01367146335542202,
        -0.009880391880869865,
        -0.005825473461300135,
        0.032717082649469376,
        -0.0033466964960098267,
        0.005217930302023888,
        0.006137924734503031,
        0.014886549673974514,
        -0.007734895683825016,
        -0.018983129411935806,
        -0.005356797017157078,
        0.007186370901763439,
        0.03016192838549614,
        0.011519023217260838,
        -0.006912108510732651,
        -0.01988576538860798,
        0.009665148332715034,
        0.025787614285945892,
        -0.018038831651210785,
        -0.03977153077721596,
        0.01158845704048872,
        -0.005658833310008049,
        0.008359797298908234,
        -0.019413616508245468,
        -0.022093750536441803,
        -0.01841377280652523,
        0.01508096419274807,
        -0.015650318935513496,
        0.03235602751374245,
        -0.007845989428460598,
        -0.0022392314858734608,
        -0.0014789343113079667,
        0.0005333363660611212,
        -0.03449457883834839,
        0.00687392009422183,
        0.008526437915861607,
        -0.017719438299536705,
        -0.013553425669670105,
        0.027731753885746002,
        -0.023912910372018814,
        -0.012671620585024357,
        0.00304118893109262,
        0.03657758608460426,
        -0.013428445905447006,
        -0.013796443119645119,
        -0.0008982963627204299,
        0.020191272720694542,
        -0.01456715539097786,
        -0.0014346704119816422,
        -0.01721951737999916,
        0.028162240982055664,
        -0.029495365917682648,
        -0.003947296645492315,
        0.00857504177838564,
        0.0043534827418625355,
        0.01513651106506586,
        0.011102422140538692,
        -0.012178641743957996,
        -0.015497565269470215,
        0.00502004474401474,
        0.0013687085593119264,
        0.012650789692997932,
        -0.0004391671100165695,
        -0.011234345845878124,
        0.0021767413709312677,
        -0.003318923059850931,
        -0.029467592015862465,
        0.004506236407905817,
        -0.0040063150227069855,
        0.010290049947798252,
        -0.024537811055779457,
        0.0012984070926904678,
        0.023121368139982224,
        0.019455276429653168,
        0.0013522180961444974,
        -0.0017722910270094872,
        0.0035081293899565935,
        0.0011265591019764543,
        0.024898866191506386,
        0.002687077736482024,
        0.003620958887040615,
        0.00030268682166934013,
        -0.013539539650082588,
        0.0014294629218056798,
        0.027926167473196983,
        -0.027690093964338303,
        0.0033709981944411993,
        0.012782713398337364,
        -0.020843947306275368,
        -0.004922837484627962,
        0.016914010047912598,
        0.0026558327954262495,
        0.008345911279320717,
        -0.006092792842537165,
        0.00026232856907881796,
        0.030467435717582703,
        -0.00293703842908144,
        0.020024631172418594,
        0.014539382420480251,
        -0.020968927070498466,
        0.0033449605107307434,
        -0.02655138447880745,
        0.005502607673406601,
        0.02083006128668785,
        -0.010421973653137684,
        -0.0024492680095136166,
        -0.011442646384239197,
        0.0005819398211315274,
        0.003343224758282304,
        -0.02388513647019863,
        -0.0019823273178189993,
        -0.00515891145914793,
        0.02401011623442173,
        -0.0004986195708625019,
        -0.022524239495396614,
        -0.0030724338721483946,
        -0.0037875992711633444,
        -0.00807511992752552,
        0.045020703226327896,
        0.02377404272556305,
        -0.0004339595907367766,
        0.0024857206735759974,
        0.043076563626527786,
        0.011282949708402157,
        0.006610072683542967,
        0.0020378741901367903,
        -0.013956140726804733,
        -0.016122465953230858,
        -0.015483678318560123,
        -0.012289735488593578,
        -0.014872663654386997,
        -0.03485563397407532,
        0.026162555441260338,
        0.002582927467301488,
        -0.01655295491218567,
        -0.028912123292684555,
        -0.018163813278079033,
        0.0031800558790564537,
        -0.008109836839139462,
        0.003620958887040615,
        -0.002457947237417102,
        0.006276791449636221,
        0.00728357769548893,
        -0.0006444299942813814,
        0.021288322284817696,
        0.00428752088919282,
        0.013824217021465302,
        -0.031689465045928955,
        0.00426669092848897,
        0.017483364790678024,
        0.011005215346813202,
        0.01081080175936222,
        0.002749568084254861,
        -0.048520155251026154,
        -0.01992742531001568,
        0.012602186761796474,
        0.020732853561639786,
        0.00045956321991980076,
        0.021843791007995605,
        0.020968927070498466,
        -0.0029908495489507914,
        -0.01651129499077797,
        -7.946885307319462e-05,
        -0.014914323575794697,
        0.003058547154068947,
        0.023246347904205322,
        -0.013435388915240765,
        -0.023746268823742867,
        -0.009512394666671753,
        -0.00620041461661458,
        -0.033522509038448334,
        0.011741210706532001,
        0.01860818825662136,
        -0.002605493413284421,
        -0.010442803613841534,
        -0.01619189977645874,
        -0.029939740896224976,
        -0.00876945536583662,
        -0.007380784954875708,
        0.02559320069849491,
        0.026343083009123802,
        -0.025884822010993958,
        0.005033931229263544,
        0.0030064720194786787,
        -0.00865141861140728,
        -0.0066968644969165325,
        -0.006773241329938173,
        -0.022163184359669685,
        0.011400986462831497,
        0.00994288269430399,
        -0.002680134493857622,
        -0.022607559338212013,
        -0.012775770388543606,
        0.008325081318616867,
        -0.02083006128668785,
        0.005578984506428242,
        0.01864984817802906,
        -0.02475999854505062,
        0.0030845848377794027,
        0.022593671455979347,
        0.03380024433135986,
        -0.03854949772357941,
        0.002435381291434169,
        -0.002152439672499895,
        -0.025829274207353592,
        -0.00683573167771101,
        -0.0034039791207760572,
        -0.01307433471083641,
        -0.03305036202073097,
        0.010887178592383862,
        -0.00858892872929573,
        -0.010901064611971378,
        -0.016344653442502022,
        -0.021121680736541748,
        -0.008457005023956299,
        -0.0075265951454639435,
        0.002671455265954137,
        0.20663419365882874,
        -0.01365063339471817,
        -0.010394199751317501,
        0.013935310766100883,
        -0.005603286437690258,
        0.006089320871978998,
        0.014608816243708134,
        0.012386942282319069,
        -0.006044189445674419,
        0.005509551148861647,
        0.0028953785076737404,
        -0.008283420465886593,
        -0.02106613479554653,
        -0.0056310598738491535,
        -0.004995742812752724,
        -0.0008739946060813963,
        -0.011782870627939701,
        -0.03007860668003559,
        -0.009630431421101093,
        0.0007481463253498077,
        0.01777498424053192,
        -0.017372271046042442,
        0.012775770388543606,
        -0.002593342447653413,
        0.011755097657442093,
        -0.00788070634007454,
        -0.0004717140691354871,
        -0.014213044196367264,
        0.010977442376315594,
        0.01638631522655487,
        -0.018483206629753113,
        -0.005356797017157078,
        -0.0007954479660838842,
        0.017136195674538612,
        0.003162697423249483,
        -0.002070855116471648,
        0.02155216969549656,
        -0.013588142581284046,
        0.028939897194504738,
        0.010234503075480461,
        -0.0031904708594083786,
        -0.0016664048889651895,
        -0.0006852222140878439,
        -0.012866034172475338,
        -0.02802337519824505,
        0.006172641180455685,
        0.002582927467301488,
        -0.01563643291592598,
        0.008818059228360653,
        -0.01297712791711092,
        -0.010352539829909801,
        0.012942411005496979,
        0.03868836537003517,
        0.020982814952731133,
        0.005377627443522215,
        -0.003641788847744465,
        -0.007929309271275997,
        0.006828788202255964,
        -0.00361054390668869,
        0.011741210706532001,
        -0.0015752733452245593,
        0.022246504202485085,
        -0.02988419309258461,
        0.00728357769548893,
        0.007547425106167793,
        0.01531703770160675,
        -0.009095792658627033,
        -0.0003807995526585728,
        0.020691193640232086,
        -0.017677778378129005,
        0.002483984688296914,
        -0.009651261381804943,
        -0.01721951737999916,
        0.01687234826385975,
        0.0036036004312336445,
        -0.020580099895596504,
        0.020455120131373405,
        0.03671645373106003,
        0.00379454274661839,
        0.03596657142043114,
        -0.012761883437633514,
        0.016886236146092415,
        0.0037910710088908672,
        -0.03518891707062721,
        -0.013289578258991241,
        -0.02337132766842842,
        0.035216689109802246,
        -0.013803387060761452,
        -0.02020515874028206,
        -0.0066066007129848,
        0.0011873134644702077,
        -0.048992302268743515,
        -0.008866662159562111,
        0.02277419902384281,
        0.013331239111721516,
        0.016094693914055824,
        0.010505293495953083,
        0.006679506041109562,
        -0.03274485468864441,
        -0.04693707078695297,
        -0.01781664602458477,
        0.020010745152831078,
        -0.003520280122756958,
        0.03360583260655403,
        -0.014247761107981205,
        -0.023149140179157257,
        -0.02162160351872444,
        0.005703964736312628,
        0.01721951737999916,
        -0.017830532044172287,
        0.0005958265392109752,
        -0.014983756467700005,
        0.013838103972375393,
        0.01152596715837717,
        0.0029995287768542767,
        0.011359326541423798,
        -0.026843003928661346,
        -0.021343868225812912,
        0.002801643218845129,
        0.010248390026390553,
        -0.012845204211771488,
        -0.03960488736629486,
        0.0014338025357574224,
        0.009311037138104439,
        0.015969712287187576,
        -0.007186370901763439,
        -0.014199158176779747,
        0.009685978293418884,
        -0.004728423897176981,
        -0.007158597465604544,
        0.01077608484774828,
        -0.03577215597033501,
        0.023746268823742867,
        -0.02083006128668785,
        -0.007464105263352394,
        -0.002851982368156314,
        -0.011130196042358875,
        -0.007061390671879053,
        -0.029495365917682648,
        0.01285909116268158,
        -0.00326337618753314,
        -6.411752838175744e-05,
        0.0033206588122993708,
        -0.0015518395230174065,
        0.017525024712085724,
        -0.03449457883834839,
        0.03207829222083092,
        0.03185610473155975,
        -0.036049891263246536,
        -0.02182990312576294,
        -0.008359797298908234,
        -0.0009356169030070305,
        -0.021343868225812912,
        -0.010366426780819893,
        0.03527223691344261,
        -0.021691035479307175,
        -0.04282660409808159,
        -0.011762040667235851,
        -0.012449433095753193,
        0.011074649170041084,
        -0.042604416608810425,
        -0.03421684727072716,
        0.008623644709587097,
        -0.004804800730198622,
        -0.02555154077708721,
        -0.002805114723742008,
        -0.18163812160491943,
        0.009158283472061157,
        0.019510824233293533,
        -0.013796443119645119,
        0.017691664397716522,
        0.0035081293899565935,
        0.026454176753759384,
        0.008283420465886593,
        -0.015566998161375523,
        -0.0026957569643855095,
        0.01323403138667345,
        -0.012053661979734898,
        -0.02825944870710373,
        -0.026398630812764168,
        0.006040717475116253,
        -0.010963555425405502,
        -0.008359797298908234,
        0.017136195674538612,
        0.02198265679180622,
        0.015511452220380306,
        0.009928995743393898,
        -0.02364906296133995,
        -0.009068019688129425,
        0.0023971928749233484,
        0.009901221841573715,
        0.010012315586209297,
        -0.004089635331183672,
        0.010144239291548729,
        -0.01081080175936222,
        -0.007450218312442303,
        -0.014199158176779747,
        -0.002055232645943761,
        0.02087172120809555,
        -0.0030203587375581264,
        0.008255647495388985,
        0.013588142581284046,
        0.004926309455186129,
        -0.008561154827475548,
        -0.011671776883304119,
        -0.005898378789424896,
        0.021205002442002296,
        0.01666404865682125,
        -0.009727638214826584,
        0.022121524438261986,
        0.0015943675534799695,
        0.008158440701663494,
        0.01928863674402237,
        -0.018399886786937714,
        0.009061076678335667,
        0.00940824393182993,
        0.015553112141788006,
        -0.02837054245173931,
        0.01307433471083641,
        0.0038813345599919558,
        -0.00048126120236702263,
        0.0132132014259696,
        0.01242165919393301,
        -0.0008384099346585572,
        -0.009019415825605392,
        -0.011289892718195915,
        0.0032529612071812153,
        -0.013150711543858051,
        0.017122309654951096,
        -0.006165697705000639,
        -0.026093121618032455,
        0.0008496929076500237,
        -0.009519337676465511,
        0.00787376333028078,
        -0.0010189370950683951,
        0.009179113432765007,
        0.0009113151463679969,
        0.00011651815293589607,
        0.013615916483104229,
        -0.011269062757492065,
        0.008047346957027912,
        0.014192214235663414,
        0.0010276163229718804,
        0.010109522379934788,
        0.010484463535249233,
        -0.009908165782690048,
        -0.011963398195803165,
        0.038355085998773575,
        -0.015969712287187576,
        0.01301878783851862,
        0.03118954412639141,
        0.018510980531573296,
        0.01813603937625885,
        0.01591416634619236,
        -0.011581514030694962,
        -0.010095636360347271,
        0.01521983090788126,
        -0.012157811783254147,
        -0.009894278831779957,
        0.008026516996324062,
        -0.002444060519337654,
        0.008706965483725071,
        0.0009000321733765304,
        -0.007373841479420662,
        0.006419130135327578,
        -0.002421494573354721,
        0.006051132455468178,
        0.0014311987906694412,
        -0.01222030259668827,
        0.0292454045265913,
        0.02520437352359295,
        0.014775455929338932,
        0.003299828851595521,
        0.021649375557899475,
        0.03255044296383858,
        -0.01992742531001568,
        -0.020260704681277275,
        -0.0014294629218056798,
        0.009033302776515484,
        0.021093908697366714,
        0.023996230214834213,
        0.012116151861846447,
        0.004169483669102192,
        -0.006283734925091267,
        0.022829746827483177,
        0.007443274836987257,
        0.049825504422187805,
        -0.005332495551556349,
        0.0011187478667125106,
        0.004842989146709442,
        0.02798171527683735,
        -0.026009801775217056,
        -0.12520255148410797,
        -0.012511922977864742,
        0.001989270793274045,
        0.019219202920794487,
        -0.002822473179548979,
        0.002749568084254861,
        0.011192685924470425,
        0.026329196989536285,
        -0.018386000767350197,
        0.015803072601556778,
        0.002506550634279847,
        0.0015683299861848354,
        -0.009498507715761662,
        0.0007867687381803989,
        0.008373684249818325,
        0.02055232599377632,
        0.0064850919879972935,
        -0.006304564885795116,
        -0.014747682958841324,
        0.01969134993851185,
        0.0034872991964221,
        0.01710842363536358,
        0.021246662363409996,
        0.0032859421335160732,
        -0.006512865424156189,
        0.004540953319519758,
        -0.02770397998392582,
        0.014372741803526878,
        0.01006091944873333,
        -0.010345596820116043,
        0.02313525415956974,
        -0.009887335821986198,
        -0.010908008553087711,
        -0.012428603135049343,
        -0.0019736483227461576,
        -0.011539853177964687,
        -0.029467592015862465,
        -0.005825473461300135,
        0.010394199751317501,
        -0.01378950010985136,
        -0.0008045610738918185,
        -0.003870919579640031,
        0.024773884564638138,
        0.015275377780199051,
        0.021135568618774414,
        -0.014581042341887951,
        -0.01576141268014908,
        -0.0025412673130631447,
        0.007130824029445648,
        -0.022829746827483177,
        -0.023760154843330383,
        -0.018469320610165596,
        -0.023760154843330383,
        -0.02191322296857834,
        0.02106613479554653,
        0.012317509390413761,
        0.00996371265500784,
        0.00954711064696312,
        -0.018080493435263634,
        0.005926152225583792,
        -0.00029704533517360687,
        -0.012005058117210865,
        -0.015330924652516842,
        0.014185271225869656,
        0.00536721246317029,
        0.007373841479420662,
        -0.03441125899553299,
        -0.02794005535542965,
        0.009026359766721725,
        -0.007304408121854067,
        -0.0002703568316064775,
        0.03746633604168892,
        -0.017136195674538612,
        0.017747212201356888,
        -0.011067705228924751,
        -0.0014997643884271383,
        -0.01299795787781477,
        -0.006985013838857412,
        -0.0024562112521380186,
        -0.0021055720280855894,
        -0.01150513719767332,
        -0.01702510192990303,
        -0.0012471998343244195,
        -0.010595557279884815,
        0.019496936351060867,
        0.021843791007995605,
        0.027828961610794067,
        -0.006401772145181894,
        -0.01762223057448864,
        -0.015553112141788006,
        0.003539374563843012,
        0.0035966571886092424,
        -0.025287693366408348,
        -0.013518709689378738,
        -0.04374312609434128,
        0.010630274191498756,
        -0.01535869762301445,
        -0.017136195674538612,
        0.008665305562317371,
        -0.005374155472964048,
        -0.013740896247327328,
        -0.013803387060761452,
        -0.014039460569620132,
        0.022246504202485085,
        -0.02071896754205227,
        -0.00942907389253378,
        -0.0007893724832683802,
        -0.018747054040431976,
        -0.0035497895441949368,
        -0.00062273204093799,
        -0.037605203688144684,
        0.0074710482731461525,
        -0.0007399010937660933,
        0.004138238728046417,
        -0.03321700170636177,
        -0.024468377232551575,
        -0.010553897358477116,
        0.005131138022989035,
        0.01163011696189642,
        -0.003971598111093044,
        0.018358226865530014,
        0.014775455929338932,
        -0.02108002081513405,
        -0.007033617235720158,
        0.023232460021972656,
        0.01789996586740017,
        -0.024746112525463104,
        0.002313872566446662,
        -0.037160828709602356,
        0.027079079300165176,
        -0.0020812703296542168,
        0.0005910529871471226,
        0.0068079582415521145,
        -0.027842847630381584,
        -0.005693549755960703,
        0.0038986930157989264,
        -0.0009989750105887651,
        -0.009734581224620342,
        0.015622545033693314,
        0.0034334883093833923,
        0.014678249135613441,
        0.007186370901763439,
        -0.03616098687052727,
        -0.015303150750696659,
        -0.005638002883642912,
        -0.0001451594871468842,
        -0.02896767109632492,
        0.004603443201631308,
        0.002421494573354721,
        0.003985485062003136,
        0.017552798613905907,
        -0.0038813345599919558,
        0.03535555675625801,
        0.013185428455471992,
        0.03210606798529625,
        -0.04179898649454117,
        -0.01027616299688816,
        0.0037355241365730762,
        0.0030359814409166574,
        0.0017358383629471064,
        0.0031488107051700354,
        -0.016136353835463524,
        0.016289107501506805,
        0.00610320782288909,
        0.02968977950513363,
        -0.011060762219130993,
        -0.01939973048865795,
        0.011810644529759884,
        0.016330767422914505,
        -0.012907694093883038,
        -0.004728423897176981,
        -0.03624430671334267,
        -0.006748939398676157,
        0.0021385529544204473,
        0.01218558568507433,
        0.01010257937014103,
        0.016011374071240425,
        0.0025881349574774504,
        0.0009382206480950117,
        0.005256118718534708,
        -0.01462270226329565,
        0.015553112141788006,
        0.01442828867584467,
        0.0022531182039529085,
        -0.01678902842104435,
        -0.0018278377829119563,
        0.02706519141793251,
        0.010331709869205952,
        0.004624273627996445,
        0.004148653708398342,
        0.004096578806638718,
        0.014608816243708134,
        -0.021121680736541748,
        -0.0010571256279945374,
        0.008082063868641853,
        0.005651889834553003,
        0.0074155014008283615,
        0.028356656432151794,
        -0.019316408783197403,
        0.012741053476929665,
        -0.009679034352302551,
        0.016455747187137604,
        -0.003558468772098422,
        0.006922523491084576,
        -0.012102264910936356,
        -0.0030863205902278423,
        -0.006599657703191042,
        -0.0077626691199839115,
        -0.014692136086523533,
        0.0024076078552752733,
        0.007776556070894003,
        0.012511922977864742,
        0.0036487323231995106,
        0.006717694457620382,
        0.01721951737999916,
        0.01873316802084446,
        -0.038716137409210205,
        0.022913066670298576,
        -0.001071880222298205,
        -0.012171698734164238,
        -0.010373369790613651,
        0.03666090592741966,
        0.02591259591281414,
        0.008547267876565456,
        0.012560526840388775,
        0.01083163172006607,
        0.03671645373106003,
        0.006332338321954012,
        0.0014268591767176986,
        -0.01089412160217762,
        0.029162084683775902,
        0.008561154827475548,
        0.002959604375064373,
        -0.01638631522655487,
        -0.00791542325168848,
        -0.01738615706562996,
        -0.021649375557899475,
        -0.027329038828611374,
        -0.0026037576608359814,
        0.05096421390771866,
        -0.009769298136234283,
        0.06021276116371155,
        0.0010076541220769286,
        -0.021260548382997513,
        0.012157811783254147,
        -0.008665305562317371,
        0.027787301689386368,
        -0.0057109082117676735,
        0.009102736599743366,
        -0.004259747453033924,
        -0.008922209031879902,
        0.011206572875380516,
        -0.016761254519224167,
        0.0040202015079557896,
        -0.0446874238550663,
        -0.013088221661746502,
        -0.024787772446870804,
        -0.0007615991053171456,
        0.004818687215447426,
        -0.016302993521094322,
        -0.008450061082839966,
        0.033522509038448334,
        -0.009699865244328976,
        0.017038989812135696,
        0.006124037783592939,
        -0.007464105263352394,
        -0.014095007441937923,
        0.013935310766100883,
        -0.04299324378371239,
        -0.018247133120894432,
        -0.03402243182063103,
        -0.0015110473614186049,
        -0.008547267876565456,
        -0.029078764840960503,
        -0.019857991486787796,
        -0.01214392576366663,
        0.030300794169306755,
        0.00403755996376276,
        -0.011942568235099316,
        0.01599748618900776,
        0.013636746443808079,
        -0.00803346000611782,
        0.00869307853281498,
        -0.01226196251809597,
        -0.027454020455479622,
        0.00381537270732224,
        -0.018760941922664642,
        -0.01762223057448864,
        0.00030984714976511896,
        -0.006436488591134548
      ],
      "index": 1,
      "object": "embedding"
    }
  ],
  "model": "text-embedding-ada-002-v2",
  "object": "list",
  "usage": {
    "prompt_tokens": 13,
    "total_tokens": 13
  }
}
print(f"vector 0: {len(res['data'][0]['embedding'])}\nvector 1: {len(res['data'][1]['embedding'])}")
vector 0: 1536
vector 1: 1536
# we can extract embeddings to a list
embeds = [record['embedding'] for record in res['data']]
len(embeds)
2

Next, we initialize our index to store vector embeddings with Pinecone.

len(embeds[0])
1536
import pinecone

index_name = 'semantic-search-openai'

# initialize connection to pinecone (get API key at app.pinecone.io)
pinecone.init(
    api_key="XXX",
    environment="us-central1-gcp"  # find next to api key in console
)
print(pinecone.list_indexes())
# check if 'openai' index already exists (only create index if not)
if index_name not in pinecone.list_indexes():
    pinecone.create_index(index_name, dimension=len(embeds[0]))
# connect to index
index = pinecone.Index(index_name)
['openai-trec']

Populating the Index

Now we will take 1K questions from the TREC dataset

from datasets import load_dataset

# load the first 1K rows of the TREC dataset
trec = load_dataset('trec', split='train[:1000]')
trec
WARNING:datasets.builder:Found cached dataset trec (/root/.cache/huggingface/datasets/trec/default/2.0.0/f2469cab1b5fceec7249fda55360dfdbd92a7a5b545e91ea0f78ad108ffac1c2)
Dataset({
    features: ['text', 'coarse_label', 'fine_label'],
    num_rows: 1000
})
trec[0]
{'text': 'How did serfdom develop in and then leave Russia ?',
 'coarse_label': 2,
 'fine_label': 26}

Then we create a vector embedding for each phrase using OpenAI, and upsert the ID, vector embedding, and original text for each phrase to Pinecone.

from tqdm.auto import tqdm

count = 0  # we'll use the count to create unique IDs
batch_size = 32  # process everything in batches of 32
for i in tqdm(range(0, len(trec['text']), batch_size)):
    # set end position of batch
    i_end = min(i+batch_size, len(trec['text']))
    # get batch of lines and IDs
    lines_batch = trec['text'][i: i+batch_size]
    ids_batch = [str(n) for n in range(i, i_end)]
    # create embeddings
    res = openai.Embedding.create(input=lines_batch, engine=MODEL)
    embeds = [record['embedding'] for record in res['data']]
    # prep metadata and upsert batch
    meta = [{'text': line} for line in lines_batch]
    to_upsert = zip(ids_batch, embeds, meta)
    # upsert to Pinecone
    index.upsert(vectors=list(to_upsert))

Querying

With our data indexed, we’re now ready to move onto performing searches. This follows a similar process to indexing. We start with a text query, that we would like to use to find similar sentences. As before we encode this with OpenAI’s text similarity Babbage model to create a query vector xq. We then use xq to query the Pinecone index.

query = "What caused the 1929 Great Depression?"

xq = openai.Embedding.create(input=query, engine=MODEL)['data'][0]['embedding']

Now query…

res = index.query([xq], top_k=5, include_metadata=True)
res
{'matches': [{'id': '932',
              'metadata': {'text': 'Why did the world enter a global '
                                   'depression in 1929 ?'},
              'score': 0.918042541,
              'values': []},
             {'id': '787',
              'metadata': {'text': "When was `` the Great Depression '' ?"},
              'score': 0.871837378,
              'values': []},
             {'id': '400',
              'metadata': {'text': 'What crop failure caused the Irish Famine '
                                   '?'},
              'score': 0.812031388,
              'values': []},
             {'id': '775',
              'metadata': {'text': 'What historical event happened in Dogtown '
                                   'in 1899 ?'},
              'score': 0.79880774,
              'values': []},
             {'id': '481',
              'metadata': {'text': 'What caused the Lynmouth floods ?'},
              'score': 0.792296052,
              'values': []}],
 'namespace': ''}

The response from Pinecone includes our original text in the metadata field, let’s print out the top_k most similar questions and their respective similarity scores.

for match in res['matches']:
    print(f"{match['score']:.2f}: {match['metadata']['text']}")
0.92: Why did the world enter a global depression in 1929 ?
0.87: When was `` the Great Depression '' ?
0.81: What crop failure caused the Irish Famine ?
0.80: What historical event happened in Dogtown in 1899 ?
0.79: What caused the Lynmouth floods ?

Looks good, let’s make it harder and replace “depression” with the incorrect term “recession”.

query = "What was the cause of the major recession in the early 20th century?"

# create the query embedding
xq = openai.Embedding.create(input=query, engine=MODEL)['data'][0]['embedding']

# query, returning the top 5 most similar results
res = index.query([xq], top_k=5, include_metadata=True)

for match in res['matches']:
    print(f"{match['score']:.2f}: {match['metadata']['text']}")
0.88: Why did the world enter a global depression in 1929 ?
0.83: When was `` the Great Depression '' ?
0.81: What crop failure caused the Irish Famine ?
0.80: When did World War I start ?
0.80: What were popular songs and types of songs in the 1920s ?

And again…

query = "Why was there a long-term economic downturn in the early 20th century?"

# create the query embedding
xq = openai.Embedding.create(input=query, engine=MODEL)['data'][0]['embedding']

# query, returning the top 5 most similar results
res = index.query([xq], top_k=5, include_metadata=True)

for match in res['matches']:
    print(f"{match['score']:.2f}: {match['metadata']['text']}")
0.90: Why did the world enter a global depression in 1929 ?
0.84: When was `` the Great Depression '' ?
0.80: When did World War I start ?
0.80: What crop failure caused the Irish Famine ?
0.80: When did the Dow first reach ?
#Trying amazon document
query = "When Amazon will be net-zero?"

# create the query embedding
xq = openai.Embedding.create(input=query, engine=MODEL)['data'][0]['embedding']

# query, returning the top 5 most similar results
res = index.query([xq], top_k=5, include_metadata=True)

for match in res['matches']:
    print(f"{match['score']:.2f}: {match['metadata']['text']}")
0.85: Supporting  Nature-Based  Solutions Climate science is telling us  that, even with aggressive  decarbonization efforts, companies  will need to go beyond their  own operations to reach net- zero emissions by 2050. We  believe that companies, including  Amazon, can drastically reduce  their own emissions while also  investing outside their operations  in initiatives that significantly  contribute to achieving the Paris  Agreement. One way we are doing  this is by investing in nature-based  solutions that conserve, restore, and  improve land management activities  to increase carbon storage in a  variety of habitats.Our Approach In 2019, Amazon created the Right Now Climate Fund, a  $100 million fund for nature-based solutions to restore and  conserve forests, wetlands, and grasslands around the world.  Amazon uses nature-based solutions to mitigate carbon  emissions outside of our value chain and supplement the
0.85: demand signal that is shifting the market to meet not only  our needs, but also the needs of other companies around  the world.  We announced in November that, in the city of Paris,  two-thirds of our shipments are delivered using zero- emission transport such as EVs, electric cargo bikes, and  on-foot deliveries. We also are exploring green hydrogen technologies: Amazon’s Climate Pledge Fund—a corporate  venture fund that invests in sustainability—recently  announced it has invested in EH2 in the U.S. and Sunfire  in Germany, two companies helping to push the green  hydrogen industry forward. It will take time to remove carbon emissions from heavy  transportation systems, including ocean shipping, aviation,  and trucking. Governments and the private sector need  to come together on this important work. Amazon is at  the heart of such industry initiatives and government  partnerships, including the Cargo Owners for Zero Emission
0.85: Learn more about the science  and technology behind our carbon footprint in our  Carbon Methodology . Our carbon footprint , including Scope 1, Scope 2, and  Scope 3 greenhouse gas emissions, is available on page 97. Amazon co-founded The Climate Pledge—a commitment  to be net-zero carbon across our business by 2040. We have  a goal to deliver 50% of Amazon shipments with net-zero  carbon by 2030. We are also on a path to powering our  operations with 100% renewable energy by 2025—five  years ahead of our original target of 2030. See our public  methodology  for more on our approach.  As part of our commitment to The Climate Pledge, we are  proud to have joined the Science Based Targets initiative  (SBTi) and are working toward setting science-based targets.  This reaffirms our commitment to reduce carbon emissions
0.84: Green Building Council. In early 2022, our Amazon Fresh location in Seattle, Washington, became the world’s first grocery store to pursue Zero Carbon Certification from the International Living Future Institute.  Read more about how we incorporate sustainability into our buildings  on pages 22–23.Resource Efficiency; Energy Source;  Resilience Transportation Decarbonizing our transportation network is a key part of meeting The Climate Pledge by 2040 and making 50% of shipments net-zero carbon by 2030, which is why we are actively transforming our fleet network and operations. We are  deploying zero-emission vehicles, using low-carbon fuels, investing in emerging technologies, and collaborating with others to accelerate cross-sector innovation.  In 2019, we ordered 100,000 custom electric delivery vehicles from Rivian and thousands more from global manufacturers such as Stellantis and Mahindra Electric.
0.84: The summit also featured our second crowdsourcing  challenge for Amazon employees to present  innovative ideas on sustainability, which received  89 submissions. 1 Calculation based on CO 2e saved, using the U.S. Environmental Protection  Agency (EPA) carbon calculator .  2021 Sustainability Report       Introduction     I     Environment     I     Society     I     Governance     I     Appendix 23   Decarbonizing  Transportation Delivering for our global customers  requires Amazon to rely on a variety  of transportation solutions for long  and short distances. Decarbonizing  our transportation network is a  key part of meeting The Climate  Pledge by 2040 and making 50%  of Amazon shipments net-zero  carbon by 2030, which is why  we are actively transforming our  fleet network and operations.Our Approach One of the ways we are decarbonizing our transportation  network is by deploying technical solutions including zero-

Looks great, our semantic search pipeline is clearly able to identify the meaning between each of our queries and return the most semantically similar questions from the already indexed questions.

Once we’re finished with the index we delete it to save resources.

pinecone.delete_index(index_name)