{
  "name": "Build a dual-stage RAG chat assistant with Google Drive, Ollama, Pinecone and Gemini",
  "nodes": [
    {
      "id": "3d7e7d4c-3234-47bc-a200-031f91963395",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -96
      ],
      "parameters": {
        "width": 500,
        "height": 940,
        "content": "## Build a dual-stage RAG chat assistant with Google Drive, Pinecone and Gemini\n\n### How it works\n\nThis workflow implements an enterprise-grade, dual-stage Retrieval-Augmented Generation (RAG) system with Pinecone vector stores and semantic caching. It operates in two synchronized pipelines:\n\n1. **Document Ingestion Pipeline (Top Track)**: Continuously monitors Google Drive for newly uploaded or modified knowledge documents (PDFs, plain text, and Markdown), downloads them, extracts textual content, generates 768-dimensional dense vector embeddings using local Ollama (`nomic-embed-text`), and indexes the documents into a primary Pinecone knowledge base with source metadata.\n2. **Semantic Cache & Conversational AI Pipeline (Bottom Track)**: Intercepts incoming user chat questions and performs an ultra-fast vector similarity lookup in a Pinecone Semantic Cache index (`rag-semantic-cache`). If a semantic match is found (score >= 0.88), the cached answer is returned immediately in under 100ms. On a cache miss, the query is seamlessly routed to an autonomous AI Agent powered by Google Gemini 1.5 Flash, conversational buffer memory, and a Pinecone Vector Store retrieval tool. The AI Agent's grounded response is delivered to the user and automatically indexed into the Pinecone Semantic Cache for future instant retrieval.\n\n### Setup steps\n\n- **Google Drive**: Connect your Google Drive OAuth2 credentials and specify your target Knowledge Base folder ID in the `When File Updated in Drive` and `Search Drive Files` nodes.\n- **Pinecone Vector Database**: Create two Pinecone indexes with dimension `768` and metric `cosine`:\n  - `nomic-embed-text`: Stores document chunks and metadata for knowledge retrieval.\n  - `rag-semantic-cache`: Stores cached Q&A query vectors and answers.\n- **Local Ollama**: Ensure Ollama is running (`ollama pull nomic-embed-text`) and configure the Ollama Base URL in your credentials (e.g., `http://localhost:11434` or `http://host.docker.internal:11434`).\n- **Google Gemini API**: Connect your Google Gemini (PaLM) API credentials and select `models/gemini-1.5-flash` for the agent and tool language models.\n- **Test Workflow**: Use the `Manual Test Trigger` to test knowledge base ingestion, and the `On Chat Message Received` trigger to test chat inference and cache seeding.\n\n### Customization\n\n- Adjust the similarity threshold in `Check Cache Hit` (default: `0.88`) to balance cache precision and hit rate.\n- Modify the AI Agent's system message in `AI Query Response Agent` to enforce custom domain personas or formatting rules.\n- Add additional file format parsers (e.g., DOCX, HTML) in the ingestion pipeline as needed."
      },
      "typeVersion": 1
    },
    {
      "id": "274ff5e0-3878-4d4e-966a-dd860c892b5d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        -96
      ],
      "parameters": {
        "color": 7,
        "width": 688,
        "height": 352,
        "content": "## Ingestion Triggers & File Retrieval\n\nMonitors Google Drive for newly added or updated knowledge documents (or executes manually for testing), searches the specified folder, and downloads the binary content for downstream extraction."
      },
      "typeVersion": 1
    },
    {
      "id": "381dd7fd-836d-4a66-94f3-af814b8b6aa3",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        -96
      ],
      "parameters": {
        "color": 7,
        "width": 768,
        "height": 352,
        "content": "## File Routing & Content Extraction\n\nInspects file extensions to branch processing between PDF documents and plaintext/markdown files, extracts clean text content, and merges the streams for unified vectorization."
      },
      "typeVersion": 1
    },
    {
      "id": "0550958b-15ea-4c70-8537-0faac3b46177",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2224,
        -96
      ],
      "parameters": {
        "color": 7,
        "width": 496,
        "height": 384,
        "content": "## Knowledge Base Vectorization & Storage\n\nGenerates 768-dimensional dense vector embeddings using local Ollama (`nomic-embed-text`), attaches file metadata, and indexes the document chunks into the Pinecone knowledge base."
      },
      "typeVersion": 1
    },
    {
      "id": "7efcd85b-468b-4cf1-95cf-6bca6670c436",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        544,
        416
      ],
      "parameters": {
        "color": 7,
        "width": 496,
        "height": 400,
        "content": "## Chat Trigger & Semantic Cache Lookup\n\nCaptures incoming user queries from interactive chat or webhook, computes query embeddings with local Ollama, and queries the Pinecone semantic cache (`rag-semantic-cache`) with Top-K=1."
      },
      "typeVersion": 1
    },
    {
      "id": "3101a37b-5e17-4f50-af24-d53e305a7015",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        416
      ],
      "parameters": {
        "color": 7,
        "width": 848,
        "height": 288,
        "content": "## Cache Evaluation & Fast Response Routing\n\nEvaluates vector similarity scores, preserves `chatInput` on cache misses, and immediately returns the cached answer if similarity is >= 0.88 for sub-100ms response times without hitting LLM inference."
      },
      "typeVersion": 1
    },
    {
      "id": "3e387347-b3c4-4ad0-909a-94def1a8e898",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1936,
        544
      ],
      "parameters": {
        "color": 7,
        "width": 784,
        "height": 768,
        "content": "## Live RAG AI Agent & Knowledge Retrieval\n\nOn a cache miss, activates an autonomous AI Agent powered by Google Gemini 1.5 Flash, conversational buffer memory, and a Pinecone vector store retrieval tool to search the knowledge base and generate grounded answers."
      },
      "typeVersion": 1
    },
    {
      "id": "6f882102-de43-4cd6-b4e8-28454f3b22af",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2736,
        416
      ],
      "parameters": {
        "color": 7,
        "width": 496,
        "height": 400,
        "content": "## Automatic Semantic Cache Ingestion\n\nAutomatically captures newly generated AI Agent answers, pairs them with the original user query and embeddings, and indexes them into the Pinecone semantic cache for instant future hits."
      },
      "typeVersion": 1
    },
    {
      "id": "80f220ff-a55a-4618-9048-886ec953c244",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        912
      ],
      "parameters": {
        "color": 7,
        "width": 500,
        "height": 512,
        "content": "## Cold-Start & Cache Troubleshooting\n\nIf your Semantic Cache is empty or not returning hits on first setup, follow these steps to seed the initial cache:\n\n1. **Bypass Cache Lookup**: Temporarily connect **On Chat Message Received** directly to **AI Query Response Agent**.\n2. **Run a Test Query**: Submit one test question in the chat (e.g., *\"what is the accuracy of my neural network from scratch\"*).\n3. **Seed Initial Vector Entry**: Let the execution pass through the AI Agent so it generates the response and writes the first entry into Pinecone Semantic Cache (**Store Answer in Semantic Cache**).\n4. **Restore Full Pipeline Wiring**: Reconnect the full pipeline: **On Chat Message Received** \u2192 **Lookup in Semantic Cache** \u2192 **Evaluate JavaScript Cache** \u2192 **Check Cache Hit**."
      },
      "typeVersion": 1
    },
    {
      "id": "16e0800f-15d3-4b53-9f5c-d4f75ec01788",
      "name": "Manual Test Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        752,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "60be6af3-aea7-4b02-aa2f-0081067e5311",
      "name": "When File Updated in Drive",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        752,
        224
      ],
      "parameters": {
        "event": "watchFolderUpdated",
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_DRIVE_FOLDER_ID",
          "cachedResultUrl": "",
          "cachedResultName": "My Knowledge Base Folder"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2a4f95fb-793e-407a-b58b-ebdfb6f2af5f",
      "name": "Search Drive Files",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1008,
        96
      ],
      "parameters": {
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "list",
            "value": "YOUR_GOOGLE_DRIVE_FOLDER_ID",
            "cachedResultUrl": "",
            "cachedResultName": "My Knowledge Base Folder"
          }
        },
        "options": {},
        "resource": "fileFolder"
      },
      "typeVersion": 3
    },
    {
      "id": "c6efcfd0-44c6-4449-ba31-24f03e2bd013",
      "name": "Download Drive File",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1216,
        96
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "typeVersion": 3
    },
    {
      "id": "f8bc0995-8ae5-4ccd-8456-acc93beb3d52",
      "name": "Check If PDF",
      "type": "n8n-nodes-base.if",
      "position": [
        1472,
        112
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "5364ea66-9210-4fb6-acc8-9220e792c588",
              "operator": {
                "type": "string",
                "operation": "endsWith"
              },
              "leftValue": "={{ $json.name }}",
              "rightValue": ".pdf"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "62d8e995-81f1-47fc-817d-6d860fcaf2c7",
      "name": "Extract PDF Content",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1792,
        64
      ],
      "parameters": {
        "options": {},
        "operation": "pdf"
      },
      "typeVersion": 1.1
    },
    {
      "id": "be1ce3fc-7786-4f6d-b6c4-404f8fcbb5bb",
      "name": "Extract Text Content",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1808,
        240
      ],
      "parameters": {
        "options": {},
        "operation": "text",
        "destinationKey": "text"
      },
      "typeVersion": 1.1
    },
    {
      "id": "ef0a04bf-02a3-4703-8f0e-edc81a329a60",
      "name": "Merge Extracted Content",
      "type": "n8n-nodes-base.merge",
      "position": [
        2048,
        80
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "d6602126-39f9-41c2-bf30-e4176ee419dc",
      "name": "Store Knowledge in Pinecone",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        2336,
        80
      ],
      "parameters": {
        "mode": "insert",
        "options": {},
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "nomic-embed-text",
          "cachedResultName": "nomic-embed-text"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "686ad4bc-5820-452b-8f85-6ecdbeae21ee",
      "name": "Generate Ollama Embeddings",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
      "position": [
        2320,
        256
      ],
      "parameters": {
        "model": "nomic-embed-text:latest"
      },
      "typeVersion": 1
    },
    {
      "id": "23cc32ed-6051-492b-b237-892de698030f",
      "name": "Load Data for Ingestion",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        2480,
        256
      ],
      "parameters": {
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "file-name",
                "value": "={{ $('Download Drive File').item.json.name || $json.name || 'document' }}"
              }
            ]
          }
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "34fcabe4-d34a-409b-abcb-bafb07bdcd29",
      "name": "On Chat Message Received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        576,
        592
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.4
    },
    {
      "id": "39d11525-d7d0-484c-96a7-ccd9a65e13c9",
      "name": "Lookup in Semantic Cache",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        784,
        592
      ],
      "parameters": {
        "mode": "load",
        "topK": 1,
        "prompt": "={{ $json.chatInput }}",
        "options": {},
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "rag-semantic-cache",
          "cachedResultName": "rag-semantic-cache"
        }
      },
      "notesInFlow": false,
      "typeVersion": 1.3
    },
    {
      "id": "b004e850-ab3c-4118-828e-aa98be354b0f",
      "name": "Cache Query with Ollama",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
      "position": [
        784,
        768
      ],
      "parameters": {
        "model": "nomic-embed-text:latest"
      },
      "typeVersion": 1
    },
    {
      "id": "5520918b-8569-47f0-8f98-802b15328d48",
      "name": "Evaluate JavaScript Cache",
      "type": "n8n-nodes-base.code",
      "position": [
        1152,
        592
      ],
      "parameters": {
        "jsCode": "// ==========================================================================\n// Semantic Cache Normalizer & Chat Input Preserver\n// Handles empty cache misses gracefully and forwards chatInput downstream\n// ==========================================================================\nconst chatInput = $('On Chat Message Received').item.json.chatInput || '';\nconst items = $input.all();\n\nif (items.length === 0) {\n  // Cache returned 0 items -> output a clean cache-miss object with chatInput\n  return [{\n    json: {\n      score: 0,\n      isCacheMiss: true,\n      chatInput: chatInput\n    }\n  }];\n}\n\n// Pass cache items through with chatInput preserved for downstream AI Agent\nreturn items.map(item => ({\n  json: {\n    ...item.json,\n    chatInput: chatInput\n  }\n}));"
      },
      "typeVersion": 2
    },
    {
      "id": "a7b7aeec-01a3-4d0b-82c0-0b60962990bc",
      "name": "Check Cache Hit",
      "type": "n8n-nodes-base.if",
      "position": [
        1392,
        592
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "0acebd24-7dad-4aad-a1f2-26ee18913820",
              "operator": {
                "type": "number",
                "operation": "gte"
              },
              "leftValue": "={{ $json.score ?? 0 }}",
              "rightValue": 0.88
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "481d56b8-cb3e-4094-817d-4f3d4dde119a",
      "name": "Set Cached Answer",
      "type": "n8n-nodes-base.set",
      "position": [
        1760,
        560
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "301eac3b-15a5-4ed4-9719-0c90133db133",
              "name": "output",
              "type": "string",
              "value": "={{ $('Evaluate JavaScript Cache').item.json.document?.metadata?.answer || $('Lookup in Semantic Cache').item.json.document?.metadata?.answer || 'Cached response retrieved.' }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ea6c13af-23f4-47c7-9aa4-9e5ccdfa99e0",
      "name": "AI Query Response Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2176,
        784
      ],
      "parameters": {
        "text": "={{ $json.chatInput || $('On Chat Message Received').item.json.chatInput }}",
        "options": {
          "systemMessage": "You are an expert, helpful AI assistant with direct access to an indexed document knowledge base. Always search the knowledge base using your vector store tool to answer user questions with accurate, grounded, and concise facts. If the information is not present in the knowledge base, clearly state that you do not have that information based on the provided documents."
        },
        "promptType": "define"
      },
      "retryOnFail": true,
      "typeVersion": 3.1,
      "waitBetweenTries": 2000
    },
    {
      "id": "4d92cf6e-7ae5-4e70-aa19-98f83887f5ec",
      "name": "Google Chat Model for Agent",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1984,
        992
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-1.5-flash"
      },
      "typeVersion": 1.1
    },
    {
      "id": "85b46357-2378-43d1-8ab7-b214d53e0ada",
      "name": "Manage Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        2176,
        992
      ],
      "parameters": {},
      "typeVersion": 1.4
    },
    {
      "id": "2e3e382b-1a43-491a-ae7c-f6b617790834",
      "name": "Vector Store Question Answering",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "position": [
        2384,
        992
      ],
      "parameters": {
        "description": "Contains knowledge base documentation, reference files, and technical notes from the uploaded PDF and text files. Use this tool whenever answering questions that require information from the provided documents."
      },
      "typeVersion": 1.1
    },
    {
      "id": "6e5dc952-c6a5-4468-8ff0-c1032963dd86",
      "name": "Google Chat Model for Tool",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        2480,
        1168
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-1.5-flash"
      },
      "notesInFlow": false,
      "typeVersion": 1.1
    },
    {
      "id": "4d1e20ff-939f-4fb0-9cef-50e3a08be5d3",
      "name": "Retrieve Knowledge from Pinecone",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        2208,
        1152
      ],
      "parameters": {
        "options": {},
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "nomic-embed-text",
          "cachedResultName": "nomic-embed-text"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "db54156d-ff43-43b3-82a8-870fe1806d0b",
      "name": "Fetch Ollama Knowledge Embeddings",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
      "position": [
        2272,
        1328
      ],
      "parameters": {
        "model": "nomic-embed-text:latest"
      },
      "typeVersion": 1
    },
    {
      "id": "63f82865-071a-4b36-9f77-4b242bfb7ed6",
      "name": "Store Answer in Semantic Cache",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        2832,
        656
      ],
      "parameters": {
        "mode": "insert",
        "options": {},
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "rag-semantic-cache",
          "cachedResultName": "rag-semantic-cache"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "48aeef12-2b06-4a2e-b358-3efb9340365b",
      "name": "Store Embeddings in Cache",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
      "position": [
        2832,
        832
      ],
      "parameters": {
        "model": "nomic-embed-text:latest"
      },
      "typeVersion": 1
    },
    {
      "id": "50d5ba9f-4178-4810-b644-7efacf3ba3a6",
      "name": "Cache Storage Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        3024,
        832
      ],
      "parameters": {
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "answer",
                "value": "={{ $json.output }}"
              },
              {
                "name": "original_query",
                "value": "={{ $('On Chat Message Received').item.json.chatInput }}"
              },
              {
                "name": "frequency",
                "value": "1"
              },
              {
                "name": "cached_at",
                "value": "={{ new Date().toISOString() }}"
              }
            ]
          }
        },
        "jsonData": "={{ $('On Chat Message Received').item.json.chatInput }}",
        "jsonMode": "expressionData"
      },
      "typeVersion": 1.1
    }
  ],
  "connections": {
    "Check If PDF": {
      "main": [
        [
          {
            "node": "Extract PDF Content",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract Text Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Cache Hit": {
      "main": [
        [
          {
            "node": "Set Cached Answer",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Query Response Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Drive Files": {
      "main": [
        [
          {
            "node": "Download Drive File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Drive File": {
      "main": [
        [
          {
            "node": "Check If PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract PDF Content": {
      "main": [
        [
          {
            "node": "Merge Extracted Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Test Trigger": {
      "main": [
        [
          {
            "node": "Search Drive Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text Content": {
      "main": [
        [
          {
            "node": "Merge Extracted Content",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Manage Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Query Response Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "AI Query Response Agent": {
      "main": [
        [
          {
            "node": "Store Answer in Semantic Cache",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cache Query with Ollama": {
      "ai_embedding": [
        [
          {
            "node": "Lookup in Semantic Cache",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Load Data for Ingestion": {
      "ai_document": [
        [
          {
            "node": "Store Knowledge in Pinecone",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Merge Extracted Content": {
      "main": [
        [
          {
            "node": "Store Knowledge in Pinecone",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lookup in Semantic Cache": {
      "main": [
        [
          {
            "node": "Evaluate JavaScript Cache",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On Chat Message Received": {
      "main": [
        [
          {
            "node": "Lookup in Semantic Cache",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cache Storage Data Loader": {
      "ai_document": [
        [
          {
            "node": "Store Answer in Semantic Cache",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Evaluate JavaScript Cache": {
      "main": [
        [
          {
            "node": "Check Cache Hit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Embeddings in Cache": {
      "ai_embedding": [
        [
          {
            "node": "Store Answer in Semantic Cache",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Generate Ollama Embeddings": {
      "ai_embedding": [
        [
          {
            "node": "Store Knowledge in Pinecone",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Google Chat Model for Tool": {
      "ai_languageModel": [
        [
          {
            "node": "Vector Store Question Answering",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When File Updated in Drive": {
      "main": [
        [
          {
            "node": "Search Drive Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Chat Model for Agent": {
      "ai_languageModel": [
        [
          {
            "node": "AI Query Response Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Vector Store Question Answering": {
      "ai_tool": [
        [
          {
            "node": "AI Query Response Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Knowledge from Pinecone": {
      "ai_vectorStore": [
        [
          {
            "node": "Vector Store Question Answering",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Ollama Knowledge Embeddings": {
      "ai_embedding": [
        [
          {
            "node": "Retrieve Knowledge from Pinecone",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    }
  },
  "meta": {
    "instanceId": null
  },
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  }
}