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

n8n AI Data Management Research

Contributed by Sabrina Ramonov 🍄. From the community directory at agents.sabrina.dev, republished with permission and full credit.

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 and Processing

- Set up a Milvus server using the official guide.

- Create a collection named "my_collection."

- 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.

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.

Tools used: Milvus, OpenAI

Download the workflow template (JSON)

Original tutorial

Want this running in your business? KOBA42 builds and operates automations like this one.