{
  "name": "Generating image embeddings via textual summarisation",
  "nodes": [
    {
      "id": "141638a4-b340-473f-a800-be7dbdcff131",
      "name": "When clicking \"Test workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        695,
        380
      ]
    },
    {
      "id": "6ccdaca5-f620-4afa-bed6-92f3a450687d",
      "name": "Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        875,
        380
      ]
    },
    {
      "id": "b0c2f7a4-a336-4705-aeda-411f2518aaef",
      "name": "Get Color Information",
      "type": "n8n-nodes-base.editImage",
      "position": [
        1200,
        200
      ]
    },
    {
      "id": "3e42b3f1-6900-4622-8c0d-2d9a27a7e1c9",
      "name": "Resize Image",
      "type": "n8n-nodes-base.editImage",
      "position": [
        1200,
        580
      ]
    },
    {
      "id": "00425bb2-289e-4a09-8fcb-52319281483c",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        2300,
        380
      ]
    },
    {
      "id": "06dbdf39-9d72-460e-a29c-1ae4e9f3552a",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        2300,
        500
      ]
    },
    {
      "id": "139cac42-c006-4c9d-8298-ade845e137a7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1140,
        100
      ],
      "parameters": {
        "width": 372,
        "height": 288,
        "content": "### Get Color Channels\n[Source: https://www.pinecone.io/learn/series/image-search/color-histograms/](https://www.pinecone.io/learn/series/image-search/color-histograms/)"
      }
    },
    {
      "id": "9b8584ae-067c-4515-b194-32986ba3bf8b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1140,
        418
      ],
      "parameters": {
        "width": 376.4067897296865,
        "height": 335.30166772984643,
        "content": "### Generate Image Keywords\n[Source: https://www.pinecone.io/learn/series/image-search/bag-of-visual-words/](https://www.pinecone.io/learn/series/image-search/bag-of-visual-words/)\n\nNote, OpenAI Image"
      }
    },
    {
      "id": "7f2c27d7-9947-42fa-aafb-78f4f95ac433",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        540
      ],
      "parameters": {
        "width": 359.1981770749933,
        "height": 98.40143173756314,
        "content": "⚠️ **Multimodal embedding is not designed analyze medical images for diagnostic features or disease patterns.** Please do not use Multimodal embedding for medical purposes."
      }
    },
    {
      "id": "cb6b4a82-db5f-41f0-94dc-6cfabe0905eb",
      "name": "Combine Image Analysis",
      "type": "n8n-nodes-base.merge",
      "position": [
        1700,
        260
      ]
    },
    {
      "id": "1ba33665-3ebb-4b23-989d-eec53dfd225a",
      "name": "Document for Embedding",
      "type": "n8n-nodes-base.set",
      "position": [
        1860,
        257
      ]
    },
    {
      "id": "5d01a2fd-0190-48fc-b588-d5872c5cd793",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        250.0169327052916
      ],
      "parameters": {
        "width": 418.6907913057789,
        "height": 316.7698949693208,
        "content": "## 1. Get the Source Image\nIn this demo, we just need an image file. We'll pull an image from google drive but you can use all input trigger or source you prefer."
      }
    },
    {
      "id": "4c9825f3-6a2b-4fd2-bdb1-e49f8d947e7a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1098.439755647174,
        -145.1609149026466
      ],
      "parameters": {
        "width": 462.52060804115854,
        "height": 938.3723985625845,
        "content": "## 2. Image Embedding Methods\n[Read more about working with images in n8n](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.editimage)\n\nThere are a [myriad of image embedding techniq"
      }
    },
    {
      "id": "e4035987-16c0-4d03-9e20-5f2042a6a020",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        120
      ],
      "parameters": {
        "width": 418.6907913057789,
        "height": 343.6004071339855,
        "content": "## 3. Generate Embedding Doc\nIt is important to define your metadata for later filtering and retrieval purposes.\n\n"
      }
    },
    {
      "id": "91fe4c5c-c063-48e2-b248-801c11880c69",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2060,
        -11.068945113406585
      ],
      "parameters": {
        "width": 532.5269726975372,
        "height": 665.9365418117011,
        "content": "## 3. Store in Vector Store\n[Read more about vector stores](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreinmemory)\n\nOnce our document is ready, we c"
      }
    },
    {
      "id": "6e8ffa06-ddec-463a-b8d6-581ad7095398",
      "name": "Embeddings OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        2680,
        547
      ]
    },
    {
      "id": "3dea73b2-6aa1-4158-945e-a5d6bea65244",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2620,
        200
      ],
      "parameters": {
        "width": 400.96585774172854,
        "height": 512.739000439197,
        "content": "## 4. Try it out!\n[Read more about vector stores](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreinmemory)\n\nHere's a quick test to use a simple text p"
      }
    },
    {
      "id": "f6a543d4-df3b-456c-8f85-4dca29029b55",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        140
      ],
      "parameters": {
        "width": 359.6648027457353,
        "height": 384.6280362222034,
        "content": "## Try It Out!\n### This workflow does the following:\n* Downloads a selected image from Google Drive.\n* Extracts colour channel information from the image.\n* Generates semantic keywords of the iamge us"
      }
    },
    {
      "id": "724acae9-75d2-4421-b5a3-b920f7bda825",
      "name": "In-Memory Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
      "position": [
        2180,
        200
      ]
    },
    {
      "id": "52afd512-0d55-4ae3-9377-4cb324c571a8",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        2180,
        420
      ]
    },
    {
      "id": "c769f279-22ef-4cb1-aef3-9089bb92a0a4",
      "name": "Search for Image",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
      "position": [
        2680,
        387
      ]
    },
    {
      "id": "9aea3018-1377-4802-a5d0-509c221f4fc7",
      "name": "Get Image Keywords",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1360,
        580
      ]
    }
  ],
  "connections": {
    "Google Drive": {
      "main": [
        [
          {
            "node": "Get Color Information",
            "type": "main",
            "index": 0
          },
          {
            "node": "Resize Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Resize Image": {
      "main": [
        [
          {
            "node": "Get Image Keywords",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "In-Memory Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "Search for Image",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Get Image Keywords": {
      "main": [
        [
          {
            "node": "Combine Image Analysis",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "In-Memory Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Get Color Information": {
      "main": [
        [
          {
            "node": "Combine Image Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Image Analysis": {
      "main": [
        [
          {
            "node": "Document for Embedding",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Document for Embedding": {
      "main": [
        [
          {
            "node": "In-Memory Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Test workflow\"": {
      "main": [
        [
          {
            "node": "Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    }
  }
}