React Native RAG

A React Native RAG library connects LLMs to your knowledge base, with ExecuTorch for on-device inference and SQLite for local vector storage.

Screenshot of React Native RAG website

React Native RAG is a library for developers building mobile AI apps that answer questions using their own knowledge base. It connects retrieval with language model generation so answers can draw on app-specific information.

  • On-device models: The ExecuTorch integration runs language and embedding models on the user's device, keeping inference local.
  • Semantic search: Search by meaning using the embedding and vector store components, independently of answer generation.
  • Local storage: The SQLite plugin saves vector stores on the device, while an in-memory store is also available.
  • Replaceable components: Choose or supply your own language model, embedding model, vector store and text splitter rather than committing to a single backend.

The library is open source under the MIT license. Its on-device inference path uses react-native-executorch and requires iOS 17 or later or Android 13 or later, plus React Native's New Architecture. It also supports Expo development builds. Apps need both a language model and an embedding model; custom integrations can use external services instead of local inference.

Similar to React Native RAG