Skip to content

🚀 Quick RAG v0.7.2 - Official SDK Integration & Stability Release

Choose a tag to compare

@devemree devemree released this 03 Nov 23:13
· 56 commits to main since this release

The easiest way to add RAG to your JavaScript apps with local AI

What's New

Official SDK Integration

We've completely rewritten the core to use official SDKs from Ollama and LM Studio, giving you access to all their powerful features:

  • Real-time streaming - Token-by-token response generation
  • Tool calling & function execution - Build autonomous AI agents
  • Vision model support - Process images alongside text
  • Web search & fetch - Access web content (Ollama account required)
  • Model management - List, pull, push, create, delete models
  • Advanced configuration - Full control over generation parameters

Package Rebranding

  • New name: quick-rag (previously js-rag-local-llm)
  • More memorable and easier to discover
  • Cleaner branding and better SEO

Dual API Support

We support both modern and legacy APIs for smooth migration:

New API (Recommended):

import { OllamaRAGClient, createOllamaRAGEmbedding } from 'quick-rag';

const client = new OllamaRAGClient();
const embed = createOllamaRAGEmbedding(client, 'embeddinggemma');
const vectorStore = new InMemoryVectorStore(embed);

Legacy API (Still Supported):

import { OllamaClient, createOllamaEmbedding } from 'quick-rag';
// Your existing code continues to work

Example Organization

  • Cleaned up examples - From 14 scattered files to 5 focused examples
  • Advanced examples - Moved to example/advanced/ for power users
  • Better documentation - Step-by-step guides for beginners

Bug Fixes

v0.7.2 (Latest)

  • Fixed generateWithRAG() compatibility with both Ollama and LM Studio
  • Added smart client detection for proper API usage
  • Dual API support (new + legacy) for backward compatibility
  • All README examples tested and verified working

v0.7.1

  • Corrected all code examples in documentation
  • Fixed API inconsistencies (vectorStore.addDocuments(), retriever.getRelevant())
  • Updated to use recommended client names (OllamaRAGClient, LMStudioRAGClient)

Installation

npm install quick-rag

Quick Start

Ollama (3 steps!)

import { 
  OllamaRAGClient, 
  createOllamaRAGEmbedding, 
  InMemoryVectorStore, 
  Retriever 
} from 'quick-rag';

// 1. Setup
const client = new OllamaRAGClient();
const embed = createOllamaRAGEmbedding(client, 'embeddinggemma');
const vectorStore = new InMemoryVectorStore(embed);
const retriever = new Retriever(vectorStore);

// 2. Add documents
await vectorStore.addDocuments([
  { text: 'JavaScript is a programming language.' },
  { text: 'Python is great for data science.' }
]);

// 3. Query with streaming
const results = await retriever.getRelevant('What is JavaScript?', 2);
const response = await client.chat({
  model: 'granite4:tiny-h',
  messages: [{ 
    role: 'user', 
    content: `Context: ${results.map(d => d.text).join('\n')}\n\nQuestion: What is JavaScript?` 
  }],
  stream: true // Real-time streaming!
});

for await (const part of response) {
  process.stdout.write(part.message.content);
}

LM Studio (Also 3 steps!)

import { 
  LMStudioRAGClient, 
  createLMStudioRAGEmbedding, 
  InMemoryVectorStore, 
  Retriever 
} from 'quick-rag';

const client = new LMStudioRAGClient();
const embed = createLMStudioRAGEmbedding(client, 'nomic-embed-text-v1.5');
const vectorStore = new InMemoryVectorStore(embed);
const retriever = new Retriever(vectorStore);

// Add your documents and query - same API!

What's Supported

Frameworks

  • React (Vite, CRA)
  • Next.js (App Router, Pages Router)
  • Node.js (Pure JavaScript/TypeScript)
  • Browser (with proxy)

AI Providers

  • Ollama (via official SDK v0.6.2)
  • LM Studio (via official SDK v1.5.0)

Features

  • Vector search with cosine similarity
  • CRUD operations (add, update, delete documents)
  • Dynamic topK retrieval
  • Batch embedding (5x faster)
  • Streaming responses
  • React hooks (useRAG)
  • TypeScript support

Migration Guide

From js-rag-local-llm to quick-rag

# 1. Update package
npm uninstall js-rag-local-llm
npm install quick-rag

# 2. Update imports (find & replace in your code)
# From: 'js-rag-local-llm'
# To:   'quick-rag'

API Changes:

  • Use OllamaRAGClient instead of OllamaClient (recommended)
  • Use createOllamaRAGEmbedding instead of createOllamaEmbedding (recommended)
  • Use vectorStore.addDocuments() not retriever.addDocuments()
  • Use retriever.getRelevant() not retriever.retrieve()

Good News: Legacy APIs still work! Migrate at your own pace.

Performance

  • 5x faster batch embedding
  • ~10ms vector search (10K documents)
  • Real-time streaming with official SDKs
  • Zero latency - everything runs locally

Links

Acknowledgments

Built on top of these amazing projects:

What's Next?

  • More embedding models
  • Persistent storage adapters
  • Advanced reranking
  • Multi-query support

Made with ⚡ by the Quick RAG team

If you find this useful, please ⭐ star the repo!

Full Changelog: https://github.com/emredeveloper/quick-rag/commits/v0.7.2