Skip to main content

RAG Pipeline Utils v2.4.0: The Complete Node.js RAG Toolkit

· 3 min read
Ali Kahwaji
Creator & Maintainer of RAG Pipeline Utils

RAG Pipeline Utils v2.4.0 is the most significant release yet — transforming the project from a basic RAG toolkit into the most comprehensive Node.js RAG framework available. This release ships 104 public exports, up from 22 in v2.3.1.

What's New

104 Public Exports

v2.4.0 nearly quintuples the public API surface. Every major RAG concern now has first-class support out of the box, from chunking and retrieval through evaluation and deployment.

Smart Chunking Engine

Five strategies cover every document type: sentence, fixed-size, recursive, semantic, and structure-aware chunking. Choose the right strategy for your corpus or let the auto-selector pick one for you.

Citation & Grounding

Source attribution, hallucination detection, and groundedness scoring let you verify that generated answers are actually supported by your retrieved context.

RAG Evaluation Framework

Measure pipeline quality with faithfulness, relevance, context precision/recall, and groundedness metrics. Export results to JSON or CSV for offline analysis.

Agentic RAG

Query planning, iterative retrieval, and self-critique powered by a DAG execution engine. The agent decomposes complex questions, retrieves in multiple passes, and validates its own answers.

Hybrid Retrieval

Combine BM25 keyword search with vector similarity and merge results using Reciprocal Rank Fusion for consistently better recall.

3-Layer Guardrails

Pre-retrieval input validation, retrieval-time content filtering, and post-generation safety checks keep your pipeline safe in production.

GraphRAG

Build knowledge graphs from your documents with automatic entity extraction, then run graph-based retrieval to surface connections that vector search alone would miss.

Streaming Embeddings

Process large corpora in real time with backpressure-aware streaming. Ideal for ingestion pipelines that need to stay responsive under load.

Advanced Reranking

BM25 scoring, embedding-based reranking, and cascade rerankers let you stack multiple relevance signals for higher precision.

Performance Dashboard

Generate self-contained HTML dashboards with SVG charts to visualise latency, throughput, and quality metrics at a glance.

Cost Management

Track token usage per request, enforce budget limits, and compare provider pricing to keep costs predictable.

Provider Connectors

Seven connectors ship out of the box: OpenAI, Anthropic, Cohere, Ollama, LocalEmbedder, MemoryRetriever, and HuggingFace.

MCP Integration

Expose any pipeline as a Model Context Protocol tool so that AI agents can call your RAG system directly.

Quick Start Templates

Four project scaffolds get you running in seconds: document-qa, chatbot, code-search, and customer-support.

Getting Started

npm install @devilsdev/rag-pipeline-utils

What's Next

v3.0.0 will focus on intelligent caching, native Rust bindings, a Kubernetes operator, and edge deployment. Follow the GitHub repository for updates.


Upgrade today and let us know what you build with v2.4.0.