Build and test on-device RAG
Vicaya is a Mac app for developers adding retrieval-augmented generation to an iOS app built with the Foundation Models framework. Drop in your documents, tune how they're split and searched, test against real questions, and export a knowledge bundle for Xcode. You don't need to be an ML specialist.
Coming soon to the Mac App Store.
Build your knowledge base
Add Markdown, PDF and text files, then choose how they're chunked and indexed.
Prove it works
Run a test set, measure retrieval, and see exactly why a question failed.
Ship it
Export one bundle, add it to Xcode, and call a generated Swift API.
See what your model sees
Every step of the pipeline, in one place.
- Preview every document as chunks, with token counts.
- In the Playground, ask a question and see which chunks were retrieved and their scores.
- Inspect the final prompt and its token count, then watch the model's answer stream in.
- See how long each stage took.
Choose how knowledge is built
Tuned for the on-device context window.
- Chunking: fixed size with overlap, by paragraph, or by heading.
- Index: Spotlight, keyword (full-text), vector (on-device embeddings), or hybrid.
- Contextual notes: the model adds a short note to each chunk about where it sits in its document, so look-alike sections stay distinct.
- Tune chunk size, overlap, top-k and context budget.
Choose how questions are answered
Only combinations that work together.
- Direct search with the question as asked.
- Query rewrite, which turns chatty follow-ups into good search queries.
- Tool mode, where the model decides when and what to search.
- Context packing that removes duplicates, orders results, and fits your token budget.
- The Document Q&A template starts you with a sensible default.
Prove it works
Testing is built in, not bolted on.
- Vicaya drafts test questions from your content, and you keep the good ones.
- Measure retrieval with recall and ranking metrics.
- Open any failing question to see what came back instead, and why.
- Change one setting, rebuild in seconds, and see whether your scores went up.
Ship it
Your app runs exactly the pipeline you tested.
- Export a single knowledge bundle and add it to your Xcode project.
- The included build plugin generates a typed Swift API with a ready-made search tool and a one-line answer call.
- A lightweight runtime package powers it in your app.
- The bundle records what it was built and tested with, so debug builds warn you when the device differs.
Built for your workflow
Fits the way you already work.
- One project file holds your sources, settings and test set, and lives in your repo.
- A command-line tool runs the same builds and evaluations in CI.
- Evaluations use Apple's Evaluations framework, so they also run in Xcode.