Skip to main content

Vector database as a big data analysis tool for AI agents [1/3 anomaly][1/2 KNN]

Workflow preview

Workflow preview
100%
Vector database as a big data analysis tool for AI agents [1/3 anomaly][1/2 KNN] preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Vector Database as a Big Data Analysis Tool for AI Agents Workflows from the webinar "Build production ready AI Agents with Qdrant and n8n". This seri...

Best for

  • Engineering automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.googlecloudstorage, n8n-nodes-base.set, n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.stickynote, n8n-nodes-base.filter

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Jenny .

Original n8n.io source

1.1 Workflow description

Title
Vector database as a big data analysis tool for AI agents [1/3 anomaly][1/2 KNN]
Workflow name
Vector database as a big data analysis tool for AI agents [1/3 anomaly][1/2 KNN]

Vector Database as a Big Data Analysis Tool for AI Agents

Workflows from the webinar "Build production-ready AI Agents with Qdrant and n8n".

This series of workflows shows how to build big data analysis tools for production-ready AI agents with the help of vector databases. These pipelines are adaptable to any dataset of images, hence, many production use cases.

  1. Uploading (image) datasets to Qdrant
  2. Set up meta-variables for anomaly detection in Qdrant
  3. Anomaly detection tool
  4. KNN classifier tool

For anomaly detection

1. This is the first pipeline to upload an image dataset to Qdrant. 2. The second pipeline is to set up cluster (class) centres & cluster (class) threshold scores needed for anomaly detection. 3. The third is the anomaly detection tool, which takes any image as input and uses all preparatory work done with Qdrant to detect if it's an anomaly to the uploaded dataset.

For KNN (k nearest neighbours) classification

1. This is the first pipeline to upload an image dataset to Qdrant. 2. The second is the KNN classifier tool, which takes any image as input and classifies it on the uploaded to Qdrant dataset.

To recreate both

You'll have to upload crops and lands datasets from Kaggle to your own Google Storage bucket, and re-create APIs/connections to Qdrant Cloud (you can use Free Tier cluster), Voyage AI API & Google Cloud Storage.

[This workflow] Batch Uploading Images Dataset to Qdrant

This template imports dataset images from Google Could Storage, creates Voyage AI embeddings for them in batches, and uploads them to Qdrant, also in batches. In this particular template, we work with crops dataset. However, it's analogous to uploading lands dataset, and in general, it's adaptable to any dataset consisting of image URLs (as the following pipelines are).

  • First, check for an existing Qdrant collection to use; otherwise, create it here. Additionally, when creating the collection, we'll create a payload index, which is required for a particular type of Qdrant requests we will use later.
  • Next, import all (dataset) images from Google Cloud Storage but keep only non-tomato-related ones (for anomaly detection testing).
  • Create (per batch) embeddings for all imported images using the Voyage AI multimodal embeddings API.
  • Finally, upload the resulting embeddings and image descriptors to Qdrant via batch upload.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Google Cloud Storage

Type / Role
n8n-nodes-base.googleCloudStorage - googleCloudStorage
Config choices
Version 1

Block 3 - Get fields for Qdrant

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - Qdrant cluster variables

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - Embed crop image

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 6 - Create Qdrant Collection

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 7 - Check Qdrant Collection Existence

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 8 - Batches in the API's format

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Batch Upload to Qdrant

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 10 - Split in batches, generate uuids for Qdrant points

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - If collection exists

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 12 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Payload index on crop_name

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 14 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note9

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note11

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Filtering out tomato to test anomalies

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.2

Block 24 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Vector database as a big data analysis tool for AI agents [1/3 anomaly][1/2 KNN]
Complexity advanced
Nodes 25
Categories Engineering, AI RAG
Author Jenny
Published 19 Dec 2024

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2654/2654.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Vector database as a big data analysis tool for AI agents [1/3 anomaly][1/2 KNN] do?

Vector Database as a Big Data Analysis Tool for AI Agents Workflows from the webinar "Build production ready AI Agents with Qdrant and n8n". This seri...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering, AI RAG use case.