Home / use case

Company Brain: a private consultancy RAG on a 16 GB MacBook Air M4 with Ollama and Open WebUI

At a glance
Hardware
macOS on Apple Silicon with 16 GB unified memory (tested on MacBook Air M4)
Models & engines
Ollama with Qwen3.5-4B; larger trials (Gemma 4 12B, Qwen3.5-9B) were dropped because they exceeded memory with the search models loaded
Key gotcha
Faithfulness judge score on the final exam was 0.80 against a ≥0.90 target; planted instructions were resisted 0/2 on the locked set.

What they built

Company Brain is a private AI assistant for a small consultancy: it answers client questions with citations, summarises calls to Word, and drafts methodology-based proposals to PDF, with every step kept on a 16 GB MacBook Air M4 and no cloud APIs.

Documents are ingested with Docling (PDF, Word, photos with OCR), embedded with EmbeddingGemma 2 into PostgreSQL + pgvector, then retrieved with hybrid search and an mMiniLM reranker before Qwen3.5-4B in Ollama writes the answer.

Open WebUI exposes three modes (answer, summarise, draft) through a local Pipe that calls the project’s backend; a per-app firewall (LuLu) is checked on every start so the AI stack stays offline.

Setup

  • macOS on Apple Silicon with 16 GB unified memory (tested on MacBook Air M4)
  • Ollama with Qwen3.5-4B; larger trials (Gemma 4 12B, Qwen3.5-9B) were dropped because they exceeded memory with the search models loaded
  • uv for Python deps, Postgres.app with pgvector, Open WebUI for the chat UI
  • Test corpus: 60 fictional + 17 public documents; evaluation set on Hugging Face AHAcosta/company-brain-eval

How it works

  1. Install uv, Ollama, Postgres.app with pgvector, and Open WebUI, then run uv sync and uv run pytest.
  2. Set the documents folder in config/sources.toml and use the double-click launchers in launchers/ (Start AI, Stop AI, Check health, Update documents).
  3. Start AI checks the firewall, starts the stack, opens http://127.0.0.1:8080, and refreshes documents in the background; pick a mode and a client before asking.
  4. Nightly document update at 01:30 and encrypted signed backup at 02:00 are described in the user guide.

Results & numbers

  • Final exam on 6 November 2026 with the frozen config: 16/22 questions passed, recall@5 15/16 (94%), no unsourced figures, 0 hard blockers such as client leaks.
  • Blind human rating of 20 answers averaged 4.8/5 (English 4.9, Spanish 4.7).
  • Author’s verdict: pilot, below target — safe for drafts a person reviews, not yet for unsupervised use; weak points include planted-instruction resistance and relevance 0.70.

Gotchas

  • Faithfulness judge score on the final exam was 0.80 against a ≥0.90 target; planted instructions were resisted 0/2 on the locked set.
  • Never switch the firewall off to bypass a failed start check; Start AI refuses to launch if the firewall check fails.
  • Repo documents are fictional or public only — it holds no real client data.
“Verdict: pilot, below target. Safe to use for drafts that a person reviews”— Ángeles Hernández Acosta

Do it yourself

  1. Clone https://github.com/angelescacosta/company-brain and install uv, Ollama, Postgres.app with pgvector, and Open WebUI on Apple Silicon.
  2. Run uv sync && uv run pytest.
  3. Point config/sources.toml at a documents folder of licensed test or your own private files.
  4. Double-click launchers/Start AI, open http://127.0.0.1:8080, pick Company Brain mode, choose a client, and ask a question that should cite a source.
Source: GitHub · Published 2026-11-06 · Added 2026-11-06. This write-up summarizes the original source; see it for full details.

Similar setups

Hearth: a household assistant on Ollama, and proving nothing leaves the house

Hearth answers family questions from manuals and papers with citations, handles voice, notes and reminders, and runs on one home computer; its builders tested small models, prompt injection, and three ways of proving no data leaves.

DEV Community (WeekendAiProjects) · 2026-11-23

Cutting a local Qwen coding agent's wait on a 16GB Mac with a memory hook

A developer running a coding agent on qwen3.5:9b through Ollama replaced its always-loaded memory index with a hook that attaches only relevant memory lines, and cut median answer time from 90.4s to 56.4s.

DEV Community (JustJinoIT) · 2026-12-02

OzAI: a self-hosted ChatGPT on a 16 GB MacBook with Ollama, LiteLLM and Open WebUI, and what broke

A DevOps engineer served Qwen3 8B and Qwen2.5-Coder 3B from one M1 Pro laptop as a small private platform with per-user keys, rate limits, local web search and IDE chat, and documented seven silent failures.

Ahmet Ozan GAZİ (DEV Community) · 2026-11-03

A private ChatGPT for a family of four on a Mac mini

One always-on M4 Mac mini serves Open WebUI to every phone and laptop in the house. Kids get a tutor preset, and three AI subscriptions are gone.

Think Different · 2026-10-18