Skip to main content

Create a RAG system with Paul Essays, Milvus, and OpenAI for cited answers

Workflow preview

Workflow preview
100%
Create a RAG system with Paul Essays, Milvus, and OpenAI for cited answers preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Create a RAG System with Paul Essays, Milvus, and OpenAI for Cited Answers This workflow automates the process of creating a document based AI retrieval system using Milvus, a...

Best for

  • Internal Wiki 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.html, n8n-nodes-base.splitout, n8n-nodes-base.limit, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter, 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 Cheney Zhang.

Original n8n.io source

1.1 Workflow description

Title
Create a RAG system with Paul Essays, Milvus, and OpenAI for cited answers
Workflow name
Create a RAG system with Paul Essays, Milvus, and OpenAI for cited answers

Create a RAG System with Paul Essays, Milvus, and OpenAI for Cited Answers

This workflow automates the process of creating a document-based AI retrieval system using Milvus, an open-source vector database. It consists of two main steps:

  1. Data collection/processing
  2. Retrieval/response generation

The system scrapes Paul Graham essays, processes them, and loads them into a Milvus vector store. When users ask questions, it retrieves relevant information and generates responses with citations.

Step 1: Data Collection and Processing

  1. Set up a Milvus server using the official guide
  2. Create a collection named "my_collection"
  3. Execute the workflow to scrape Paul Graham essays:
    • Fetch essay lists
    • Extract names
    • Split content into manageable items
    • Limit results (if needed)
    • Fetch texts
    • Extract content
    • Load everything into Milvus Vector Store

This step uses OpenAI embeddings for vectorization.

Step 2: Retrieval and Response Generation

When a chat message is received, the system:

  • Sets chunks to send to the model
  • Retrieves relevant information from the Milvus Vector Store
  • Prepares chunks
  • Answers the query based on those chunks
  • Composes citations
  • Generates a comprehensive response

This process uses OpenAI embeddings and models to ensure accurate and relevant answers with proper citations.

For more information on vector databases and similarity search, visit Milvus documentation.

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 - Fetch Essay List

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

Block 3 - Extract essay names

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

Block 4 - Split out into items

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

Block 5 - Fetch essay texts

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

Block 6 - Limit to first 3

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

Block 7 - Extract Text Only

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

Block 8 - Sticky Note3

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

Block 9 - Sticky Note5

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

Block 10 - Recursive Character Text Splitter1

Type / Role
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - textSplitterRecursiveCharacterTextSplitter
Config choices
Version 1

Block 11 - Generate response

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

Block 12 - Compose citations

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

Block 13 - Answer the query based on chunks

Type / Role
@n8n/n8n-nodes-langchain.informationExtractor - informationExtractor
Config choices
Version 1

Block 14 - Prepare chunks

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

Block 15 - Set max chunks to send to model

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

Block 16 - Embeddings OpenAI2

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

Block 17 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 18 - Sticky Note1

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

Block 19 - Milvus Vector Store in retrieval

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreMilvus - vectorStoreMilvus
Config choices
Version 1.1

Block 20 - Milvus Vector Store

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreMilvus - vectorStoreMilvus
Config choices
Version 1.1

Block 21 - Sticky Note

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

Block 22 - Sticky Note2

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

Block 23 - Embeddings OpenAI

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

Block 24 - Default Data Loader

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1

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

3. Summary Table

Workflow Create a RAG system with Paul Essays, Milvus, and OpenAI for cited answers
Complexity advanced
Nodes 25
Categories Internal Wiki, AI RAG
Author Cheney Zhang
Published 16 Apr 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3573/3573.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 Create a RAG system with Paul Essays, Milvus, and OpenAI for cited answers do?

Create a RAG System with Paul Essays, Milvus, and OpenAI for Cited Answers This workflow automates the process of creating a document based AI retrieval system using Milvus, a...

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 Internal Wiki, AI RAG use case.