ondevice-rag-engine

Index and search meeting notes locally with on-device embeddings.

5|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/nsnguyen/ios_app_rag_calendar --skill ondevice-rag-engine
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ondevice-rag-engine
Source: https://github.com/nsnguyen/ios_app_rag_calendar/tree/main/.claude/skills/ondevice-rag-engine
Command: npx skills add https://github.com/nsnguyen/ios_app_rag_calendar --skill ondevice-rag-engine

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a complete on-device retrieval-augmented generation (RAG) pipeline, enabling semantic search, embedding generation, chunking, indexing, and vector similarity without sending data to external services.

Core Features & Use Cases

  • On-device embeddings: Generate sentence embeddings using Apple's NaturalLanguage framework for private data.
  • Local vector store: Store vectors in SwiftData with deterministic and queryable indexing.
  • Fast similarity search: Use cosine similarity powered by Accelerate for efficient retrieval.
  • Chunking strategies: Break meetings and notes into context-preserving chunks for accurate matching.
  • Use case: Planner apps can semantically search meetings, notes, and decisions entirely offline.

Quick Start

Index your first MeetingRecord by chunking content and storing embeddings locally, then run a query like "What were the key decisions from the last meeting?" to retrieve relevant chunks. Ensure embedding model is available on-device and do not perform any network calls.

Frequently Asked Questions about ondevice-rag-engine

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

FAQPage Schema
How do I implement on-device semantic search for iOS notes and meetings?

On-device semantic search uses Apple's NaturalLanguage framework to generate embeddings locally and SwiftData to store indexed chunks, enabling private retrieval of iOS notes and meetings without network calls.

Can I perform offline retrieval-augmented generation using SwiftData?

Yes, offline retrieval-augmented generation is possible by storing embeddings in SwiftData and using Accelerate-based cosine similarity to retrieve relevant text chunks locally without any network connectivity.

How does local vector similarity search work with NaturalLanguage embeddings?

Local vector similarity search computes cosine similarity between NaturalLanguage-generated embedding vectors using the Accelerate framework, matching user queries against locally indexed text chunks stored in SwiftData.

What is the best way to chunk notes for a private offline RAG pipeline?

The best way to chunk notes for a private offline RAG pipeline is to break meeting records and notes into context-preserving segments before generating NaturalLanguage embeddings for accurate local semantic matching.

Do I need a network connection to run semantic search on my planner app data?

No network connection is needed to run semantic search on planner app data because the embedding generation, SwiftData vector storage, and Accelerate similarity retrieval operate entirely on-device for maximum privacy.

When should I not use an on-device RAG engine for semantic search?

You should not use an on-device RAG engine for semantic search if your text corpus exceeds local storage limits or requires cross-device synchronization, as this pipeline is designed for offline, single-device SwiftData retrieval.