Skip to main content

Document Q&A system with Voyage-Context-3 embeddings and MongoDB Atlas

Workflow preview

Workflow preview
100%
Document Q&A system with Voyage-Context-3 embeddings and MongoDB Atlas preview
Open on n8n.io

Important notice

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

1. Workflow Overview

On my never ending quest to find the best embeddings model, I was intrigued to come across Voyage Context 3 by MongoDB and was excited to g...

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.httprequest, n8n-nodes-base.extractfromfile, n8n-nodes-base.splitout, n8n-nodes-base.noop, n8n-nodes-base.code, n8n-nodes-base.splitinbatches, n8n-nodes-base.set

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Document Q&A system with Voyage-Context-3 embeddings and MongoDB Atlas
Workflow name
Document Q&A system with Voyage-Context-3 embeddings and MongoDB Atlas

On my never-ending quest to find the best embeddings model, I was intrigued to come across Voyage-Context-3 by MongoDB and was excited to give it a try.

This template implements the embedding model on a Arxiv research paper and stores the results in a Vector store. It was only fitting to use Mongo Atlas from the same parent company. This template also includes a RAG-based Q&A agent which taps into the vector store as a test to helps qualify if the embeddings are any good and if this is even noticeable.

How it works

This template is split into 2 parts. The first part being the import of a research document which is then chunked and embedded into our vector store. The second part builds a RAG-based Q&A agent to test the vector store retrieval on the research paper.

Read the steps for more details.

How to use

  • First ensure you create a Voyage account voyageai.com and a MongoDB database ready.
  • Start with Step 1 and fill in the "Set Variables" node and Click on the Manual Execute Trigger. This will take care of populating the vector store with the research paper.
  • To use the Q&A agent, it is required to publish the workflow to access the public chat interface. This is because "Respond to Chat" works best in this mode and not in editor mode.
  • To use for your own document, edit the "Set Variables" node to define the URL to your own document.
  • This embeddings approach should work best on larger documents.

Requirements

  • Voyageai.com account for embeddings. You may need to add credit to get a reasonable RPM for this workflow.
  • MongoDB database either self-hosted or online at https://www.mongodb.com.
  • OpenAI account for RAG Q&A agent.

Customising this workflow

  • The Voyage embeddings work with any vector store so feel free to swap out to other such as Qdrant or Pinecone if you're not a fan of MongoDB Atlas.
  • If you're feeling brave, instead of the 3 sequential pages setup I have, why not try the whole document! Fair warning that you may hit memory problems if your instance isn't sufficiently sized - but if it is, go head and share the results!

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 ‘Execute workflow’

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

Block 2 - Import Research Paper

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

Block 3 - Extract from File

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

Block 4 - Split Pages

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

Block 5 - Page Ref

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

Block 6 - Chunk Page Text

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

Block 7 - Voyage-Context-3 Embeddings

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

Block 8 - Split Out

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

Block 9 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 10 - Combine Content & Vectors

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

Block 11 - Subworkflow Trigger

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

Block 12 - Batch 10

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 13 - Call Embeddings Subworkflow

Type / Role
n8n-nodes-base.executeWorkflow - executeWorkflow
Config choices
Version 1.2

Block 14 - Done

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

Block 15 - Voyage-Context-3 Embeddings1

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

Block 16 - Perform Similarity Search

Type / Role
n8n-nodes-base.mongoDb - mongoDb
Config choices
Version 1.2

Block 17 - Add Page Number

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

Block 18 - Set Variables

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

Block 19 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 20 - Get Query

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

Block 21 - Aggregate

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

Block 22 - Query Ref

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

Block 23 - Loop Over Questions

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 24 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

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

3. Summary Table

Workflow Document Q&A system with Voyage-Context-3 embeddings and MongoDB Atlas
Complexity advanced
Nodes 53
Categories Engineering, AI RAG
Author Jimleuk
Published 01 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6819/6819.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 Document Q&A system with Voyage-Context-3 embeddings and MongoDB Atlas do?

On my never ending quest to find the best embeddings model, I was intrigued to come across Voyage Context 3 by MongoDB and was excited to g...

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.