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

Nodes

3b9f1b78-6b80-4575-aa6c-966987000389a97f27bd-6185-4b9b-bade-f7020a7a1885083a55c9-df56-4154-959f-52737890cad0d2545cc0-4d6d-43fc-bbcc-62005c2452f0+7

Created by

ChCheney Zhang

Last edited 11 days ago

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.

New to n8n?

Need help building new n8n workflows? Process automation for you or your company will save you time and money, and it's completely free!