rag-pipeline

Set up a RAG pipeline with Elasticsearch for vector retrieval.

6|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/patrykkopycinski/elastic-cursor-plugin --skill rag-pipeline-patrykkopycinski
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rag-pipeline
Source: https://github.com/patrykkopycinski/elastic-cursor-plugin/tree/main/.cursor/skills/rag-pipeline
Command: npx skills add https://github.com/patrykkopycinski/elastic-cursor-plugin --skill rag-pipeline-patrykkopycinski

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides engineers to build a retrieval-augmented generation (RAG) workflow that uses Elasticsearch as the vector retrieval backend, removing guesswork around indexing, embedding ingestion, and search integration.

Core Features & Use Cases

  • Index & Schema Provisioning: Create an index with a dense_vector field and appropriate text fields for chunked documents.
  • Embedding Ingestion Options: Support for ingest pipelines that generate embeddings or indexing precomputed vectors from the application side.
  • Integration & Retrieval: Bulk index document chunks, embed queries with the same model, and run kNN searches to return top-k context for LLMs.
  • Use Case: Build a knowledge-base RAG system for customer support where documents are chunked, embedded, and retrieved to provide context-aware responses.

Quick Start

Use the rag-pipeline skill to create an Elasticsearch index with a dense_vector field, load or generate embeddings for document chunks, and run a test kNN query to verify retrieval relevance.

Frequently Asked Questions about rag-pipeline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a RAG pipeline with Elasticsearch for document search?▼

To build a RAG pipeline with Elasticsearch, you create an index with a dense_vector field, chunk and embed your documents, bulk index those chunks, and run kNN vector searches to retrieve top-k context for LLMs.

Can I generate embeddings inside an Elasticsearch ingest pipeline?▼

Yes, you can configure an Elasticsearch ingest pipeline to generate embeddings automatically during indexing, or you can index precomputed vectors from the application side to populate your dense_vector fields.

What is the best way to index document chunks for knowledge-base retrieval?▼

The best way to index document chunks for knowledge-base retrieval is bulk indexing them into an Elasticsearch index provisioned with a dense_vector field to support embedding-based kNN queries at query time.

How do I perform a kNN vector search in Elasticsearch?▼

You perform a kNN vector search in Elasticsearch by embedding your query with the same model used for indexing, then running an embedding-based kNN query against your dense_vector field to return the top-k context.

Does Elasticsearch support dense_vector fields for RAG workflows?▼

Yes, Elasticsearch supports dense_vector fields for RAG workflows by allowing you to provision an index schema that stores embedding vectors and executes kNN searches for context-aware retrieval.