Skip to main content

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

Workflow preview

Workflow preview
100%
Vector database as a big data analysis tool for AI agents [2/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 Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.set, n8n-nodes-base.if, n8n-nodes-base.stickynote, n8n-nodes-base.executeworkflowtrigger

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 [2/2 KNN]
Workflow name
Vector database as a big data analysis tool for AI agents [2/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. 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. The first pipeline to upload an image dataset to Qdrant.
  2. This pipeline 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] KNN classification tool

This tool takes any image URL, and as output, it returns a class of the object on the image based on the image uploaded to the Qdrant dataset (lands).

  • An image URL is received via the Execute Workflow Trigger, which is then sent to the Voyage AI Multimodal Embeddings API to fetch its embedding.
  • The image's embedding vector is then used to query Qdrant, returning a set of X similar images with pre-labeled classes.
  • Majority voting is done for classes of neighbouring images.
  • A loop is used to resolve scenarios where there is a tie in Majority Voting, and we increase the number of neighbours to retrieve.
  • When the loop finally resolves, the identified class is returned to the calling workflow.

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 - Embed image

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

Block 2 - Query Qdrant

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

Block 3 - Majority Vote

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

Block 4 - Increase limitKNN

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

Block 5 - Propagate loop variables

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

Block 6 - Image Test URL

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

Block 7 - Return class

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

Block 8 - Check tie

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

Block 9 - Qdrant variables + embedding + KNN neigbours

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

Block 10 - Sticky Note

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

Block 11 - Sticky Note1

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

Block 12 - Execute Workflow Trigger

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

Block 13 - Sticky Note2

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

Block 14 - Sticky Note3

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

Block 15 - Sticky Note4

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

Block 16 - Sticky Note5

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

Block 17 - Sticky Note6

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

Block 18 - Sticky Note10

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

3. Summary Table

Workflow Vector database as a big data analysis tool for AI agents [2/2 KNN]
Complexity advanced
Nodes 18
Categories Engineering, AI Summarization
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/2657/2657.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 [2/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 Summarization use case.