Redsprint Start a project

Guide · Private AI

How do I build a private RAG on my Mac?

For small business owners who want an AI that answers from their own files, names the file it used, and keeps every document on the Mac.

Checked on 13 October 2026

The short answer

Install Ollama to run free open models on the Mac and AnythingLLM Desktop to read your files. Pick a chat model that fits your memory, set the embedding model before the first upload, switch on query mode, then test with ten questions you already know. With cloud features off, files and questions stay on the Mac.

Remember

  • Set the embedding model before you upload a single file.
  • Search works by meaning, so exact part codes and totals need other handling.
  • Remove the old version of a file before you upload the new one.

General guidance on software, checked on 13 October 2026. Settings and model names change between versions, so check the documentation of the version you install.

How to build it

RAG, short for retrieval-augmented generation, means the app finds the passages of your files that match a question and hands only those to the AI model. It cuts your files into small passages, turns each one into numbers that capture its meaning, and stores them on your disk. Your question goes through the same process, and the closest passages come back.

  1. Check your Mac

    Open the Apple menu and choose About This Mac. Ollama needs macOS Sonoma 14 or newer, and on an Apple M-series chip it uses the graphics chip as well as the processor. AnythingLLM recommends 16 GB of memory for running a model on the same computer. Our advice is to skip this build on a Mac with 8 GB.

  2. Install Ollama and keep it local

    Download Ollama for Mac and drag it into Applications. Ollama is the app that runs AI models on your Mac. Its documentation says it runs in local only mode once you turn off its cloud features, at the cost of its cloud models and web search. Turn them off in Ollama's settings. Ollama listens only to your own Mac by default, so leave the option that exposes it to the network off.

  3. Download a chat model and an embedding model

    Open Terminal. With 16 or 24 GB of memory, type ollama pull qwen3.5:9b, a download of about 7 GB. With 32 GB, our pick is gemma4:26b, and with 64 GB or more, qwen3.6:35b. Then type ollama pull qwen3-embedding:0.6b, a 639 MB embedding model, the model that turns text into numbers. To see your speed, type ollama run qwen3.5:9b --verbose, ask anything, and read the timings under the answer. Type /bye to leave.

  4. Install AnythingLLM and set the embedder first

    Download AnythingLLM Desktop for Apple Silicon. Keep Ollama running, and in the setup choose Ollama and your chat model. Before any upload, open Settings, AI Providers, Embedder, and choose Ollama with qwen3-embedding:0.6b. Numbers from two embedding models don't line up, so a change later means you delete every document and embed it again. Leave the vector database on LanceDB, the built-in one.

  5. Set the chunk size and turn off telemetry

    A chunk is one passage of a file. Under Text Splitter and Chunking, the defaults are 1,000 characters per chunk with 20 characters of overlap. We suggest 1,500 and 150, so a passage holds a full clause and nothing gets lost at the cut. The change applies only to files you embed after it. Then turn off anonymous telemetry, the usage statistics the app sends. AnythingLLM says your chats and documents never leave your Mac.

  6. Upload your files

    Create a workspace, upload your files, move them into the workspace and choose Save and Embed. A scanned PDF holds pictures of pages with no text in them. AnythingLLM reads it with OCR, text recognition, only when it finds no text anywhere in the file. In a PDF with typed and scanned pages, the scanned pages are skipped, so save those pages as a PDF of their own.

  7. Set the rules

    In the workspace's chat settings, set the chat mode to Query. Query mode answers only from your documents and tells you when it finds nothing. Write your own refusal message, and a system prompt, the standing instructions the model reads first: answer only from the context, name the file, copy prices and dates exactly, never guess. In the Vector Database tab, set the search preference to Accuracy Optimized, which pulls a larger set of matches and scores them again. Set Max Context Snippets to 6.

  8. Test it, then cut the Wi-Fi

    Write ten questions you already know the answers to: a policy, a price, a line from a scanned page, a number in a table, one that needs two files, one in new words, and one your files don't cover. Under each answer, open Sources to see the passages the model was given. Our pass mark is eight right and a refusal on the last. Ask once online, since the app fetches its reranking model on first use, then turn off the Wi-Fi and ask again. Last, check that FileVault is on in System Settings, Privacy and Security.

Which chat model fits your memory

A scale of Mac memory from 8 GB to 64 GB and more. Under 16 GB is too tight for this build. From 16 to 24 GB, qwen3.5:9b fits. From 32 GB, gemma4:26b. From 64 GB, qwen3.6:35b.

The model for each memory size is our advice. AnythingLLM recommends 16 GB for running a local model.

Mistakes to avoid

  • Trusting it with part codes

    AnythingLLM's built-in search compares meaning only, with no keyword match. To that search, codes like H-40 and H-50 look almost the same, so it can pick the wrong row. Pin a short price list: pinning puts the whole file in front of the model on every question. Keep pinned files to a few pages, since the model can read only so much at once.

  • Asking it to add up

    The model sees a handful of passages per question. A question like how many items cost over AED 500 needs the whole list, so it gets a wrong count. Do totals in a spreadsheet.

  • Leaving old versions in place

    An uploaded file keeps the passages it was cut into and never updates itself. When your refund policy changes, remove the old file from the workspace, then upload the new one. With both in place, either can answer.

  • Changing the embedder after the upload

    Every document then has to be deleted and embedded again. Pick the embedding model once, before the first file goes in.

What the evidence says

No study tests the settings in this guide, such as the chunk size, the snippet count, the memory tiers or the pass mark of eight in ten. Treat them as advice. The studies below test how meaning-based search and RAG tools go wrong.

  • Dense retrievers, the meaning-based search this build uses, did far worse than keyword search on simple questions about named things, in a 2021 study by Sciavolino and colleagues at the EMNLP conference.
  • Commercial legal research tools built on RAG gave false or misleading answers between 17% and 33% of the time, in a 2025 study by Magesh and colleagues in the Journal of Empirical Legal Studies. Test any setup with questions you can check before you rely on it.

Sources

  1. AnythingLLM docs: Chatting with documents
  2. AnythingLLM docs: Desktop system requirements
  3. Ollama docs: macOS
  4. Ollama docs: FAQ, local only mode and network binding
  5. Ollama library: qwen3.5
  6. Ollama library: qwen3-embedding
  7. Qwen3.5-9B model card, licence
  8. AnythingLLM docs: Embedder configuration
  9. AnythingLLM docs: Text splitting and chunking
  10. AnythingLLM docs: Desktop privacy
  11. AnythingLLM source code: PDF reader and OCR
  12. AnythingLLM docs: Chat modes
  13. AnythingLLM source code: LanceDB search and reranking
  14. Apple Support: Protect data on your Mac with FileVault
  15. Sciavolino, Zhong, Lee and Chen (2021), Simple entity-centric questions challenge dense retrievers, EMNLP
  16. Magesh et al. (2025), Hallucination-free? Assessing the reliability of leading AI legal research tools, Journal of Empirical Legal Studies

Terms used in this guide

RAG
Retrieval-augmented generation: the app finds the passages of your files that match a question, and the AI model answers from those passages.
Embedding model
A small AI model that turns a passage of text into a list of numbers, so passages with a similar meaning sit close together.
Vector database
The store that holds those lists of numbers and finds the ones closest to a question. In AnythingLLM it is LanceDB, a folder on your Mac.
Chunk
One passage of a file, cut to a set number of characters. The overlap repeats the end of one chunk at the start of the next.
Reranking
A second pass that scores a larger set of matches again and keeps the best few.
Query mode
An AnythingLLM chat mode that answers only from your documents and says when it finds nothing.
OCR
Optical character recognition: reading the letters off a picture of a page.
Pinning
Putting a whole file in front of the model on every question, in place of a search.

Questions people ask

Can I use these models for my business?

The Qwen3.5 9B model card lists the Apache 2.0 licence, which allows commercial use. Check the licence on the model card of any other model before you rely on it.

Does anything leave my Mac?

Ollama says it doesn't see your prompts or data when it runs locally, and it listens only to your own Mac by default. AnythingLLM keeps chats and documents on your Mac. It fetches its reranking model once, and sends usage statistics until you turn telemetry off.

Will it work on an Intel Mac?

Ollama runs on Intel Macs using the processor only, without the graphics chip, so answers come slowly. AnythingLLM has an Intel download. Our advice is a small model, such as a smaller Qwen 3.5 size.

Can it answer from Arabic documents?

Ollama lists 201 languages and dialects for Qwen 3.5 and over 100 languages for the Qwen3 embedding models. Add Arabic questions to your ten test questions and check the answers against the files.

Why does every answer take so long?

Qwen 3.5 can think before it answers, which adds time. If your version of AnythingLLM has a reasoning or thinking setting for the workspace, turn it off. Close other heavy apps, and check your speed with ollama run and --verbose.

When should I run the ten questions again?

After any change to the chat model, the embedder, the chunk size, the snippet count or the files. Fix one thing at a time, then run all ten again.

Get help setting up your private AI

Want this running on your own Macs, with your own files? Email us what you have and what it should answer. We set up the build with you and run the ten-question test before you rely on it.

Made in Dubai by Redsprint

We design and build apps for iPhone, iPad, Mac and the web, from a Dubai free zone company of our own. These answers are free for anyone setting up or running a business in the UAE.