Guides · AI Stack · 32

Give AI your company's knowledge: projects, notebooks and RAG

Climb from a project with your key files, to Gemini Notebook for cited answers, to live connectors, to your own RAG bot, then test that the answers are right.

1 hour for steps 1-4, an afternoon for a RAG buildFree to start, then a paid plan or API usageIntermediate

An AI model knows the internet, not your company. To answer questions about your pricing, policies or customers, it needs your documents. There are four ways to give them, from five minutes in a chat app to your own retrieval system. Start on the lowest rung that works.

1Pick the right rung

RungToolsBest forSetup
1. ProjectClaude Projects, ChatGPT Projects, Gemini GemsA few dozen core docs you use every day15 minutes
2. NotebookGemini Notebook (formerly NotebookLM)Answers only from your sources, with citations you can click15 minutes
3. ConnectorsGoogle Drive, Notion, Slack inside your chatbotFinding the latest file or thread, with your own permissions10 minutes per app
4. RAGYour own pipeline: n8n and Supabase, or codeThousands of docs, a bot for your team or site, your access rulesAn afternoon, plus upkeep

Most teams only need rungs 1 to 3. Build RAG when the bot must live outside a chat app, you have more documents than a project holds, or different people must see different documents.

2Put your core docs in a project

Claude ProjectsChatGPT ProjectsGemini Gems
Createclaude.ai/projects, then + New ProjectNew project in the sidebarGems, then New Gem
FilesAll plans (5 projects on Free). Paid plans switch to search mode when files near the context limit, for up to 10x capacity5 files per project on Free, 25 on Go and Plus, 40 on Pro, Business, Enterprise and EduAdd files under Knowledge
Live documentsGoogle Docs added from Drive stay synced (private projects only)Paste Google Drive or Slack links as sourcesDrive files always use the newest version
SharingTeam and Enterprise: Can view or Can editChat or edit access, on every planShare a Gem

As of October 2026 (Anthropic, OpenAI, Google). Give files dated names like pricing-2026-10.pdf, then paste these instructions into the project or Gem.

Instructions for a company knowledge assistant
You answer questions about [Company] using only the files in this project.
Rules:
- Name the file behind every fact, like (pricing-2026-10.pdf).
- If the files don't answer the question, say "Not in the files" and suggest
  who might know. Never fill gaps from general knowledge.
- When two files disagree, trust the newer date in the file name and point
  out the conflict.
- Keep answers under 150 words unless I ask for more.

3Use Gemini Notebook for answers you can check

Google renamed NotebookLM to Gemini Notebook on July 16, 2026. Same product, now at notebook.google.com, and old NotebookLM links redirect there. Its strength: chat answers use only your sources, with citations you can click to jump to the passage.

  1. Click Create new notebook.
  2. Add sources: Google Docs, Slides, Sheets, PDFs, Word files, web pages, YouTube videos or audio, up to 500,000 words or 200 MB each.
  3. Tick only the sources that matter for a question, then ask.
Plan (limits page, October 2026)NotebooksSources per notebook
Standard (no subscription)10050
Google AI Plus200100
Google AI Pro500300
Google AI Ultra500500-600

Drive sources re-sync every few minutes. Google says notebooks aren't used for training unless you send feedback (privacy). You can share as Viewer or Editor, but a "chat view" link doesn't stop viewers from reaching the sources.

Turn your sources into an onboarding FAQ (Gemini Notebook or any project)
Using only the selected sources, write the 15 questions a new hire asks in their first
week, each with a 2-3 sentence answer and a citation. Then list 5 questions the sources
can't answer, so I can fill the gaps.

4Connect Drive, Notion and Slack

A connector lets the AI search your live apps when you ask, with your own permissions. Answers are only as good as that search, so name the app in your prompt ("Search Drive for our latest refund policy").

ClaudeChatGPTGemini
Set upCustomize > ConnectorsSettings > Plugins, then the appAsk about Gmail, Docs or Drive, and accept the offer to connect
AppsGoogle Drive (all plans), Notion, Slack (paid plans), Microsoft 365Google Drive, SharePoint, Slack, Notion, Box and moreGmail, Docs, Drive, Calendar, Keep, Tasks
TrainingAnthropic doesn't train on Drive, Gmail or Calendar connector dataMay be used on Free, Go, Plus and Pro if Improve the model for everyone is on. Not by default on Business and EnterpriseNeeds Keep Activity on

5Understand RAG in 30 lines of code

RAG (retrieval-augmented generation) is what Claude Projects does behind the scenes once you add many files. Five parts:

  1. Chunks: split documents into passages. n8n's guide suggests 200-500 tokens, with some overlap.
  2. Embeddings: a model turns each chunk into numbers that capture its meaning. Similar meaning, similar numbers.
  3. Vector store: a database of chunks, their numbers and metadata (file, date, audience).
  4. Retrieval: your question becomes numbers with the same model, and the store returns the closest chunks.
  5. Generation with citations: the chat model answers from only those chunks and names them.

This script does all five over a docs folder of .md and .txt files, free and private on Ollama (setup). For OpenAI instead, delete the base_url and api_key arguments so it reads OPENAI_API_KEY from your environment, and set EMBED = "text-embedding-3-small" and CHAT to a model from OpenAI's list.

rag.py (pip install openai numpy)
from pathlib import Path
import numpy as np
from openai import OpenAI

client = OpenAI(base_url="http://localhost:11434/v1", api_key="ollama")  # local Ollama, free
EMBED, CHAT = "embeddinggemma", "qwen3.5:4b"  # first: ollama pull embeddinggemma && ollama pull qwen3.5:4b

def embed(texts):
    data = client.embeddings.create(model=EMBED, input=texts).data
    v = np.array([d.embedding for d in data])
    return v / np.linalg.norm(v, axis=1, keepdims=True)  # normalized, so dot product = similarity

# 1. Chunk: ~200-word pieces with 50 words of overlap, each tagged with its source
chunks = []
for f in sorted(Path("docs").rglob("*")):
    if f.suffix in {".md", ".txt"}:
        words = f.read_text().split()
        for n, i in enumerate(range(0, len(words), 150), start=1):
            chunks.append((f"{f.name}#{n}", " ".join(words[i:i + 200])))

# 2. Embed every chunk once. This matrix is your (tiny) vector store.
vectors = embed([text for _, text in chunks])

def ask(question, k=4):
    # 3. Retrieve: the k chunks closest in meaning to the question
    scores = vectors @ embed([question])[0]
    top = [chunks[i] for i in np.argsort(-scores)[:k]]
    sources = "\n\n".join(f"[{src}]\n{text}" for src, text in top)
    # 4. Generate: answer only from those chunks, and cite them
    rules = ("Answer only from the sources below. Cite every claim like [refunds.md#1]. "
             "If the sources don't answer the question, say you don't know.\n\n")
    reply = client.chat.completions.create(model=CHAT, messages=[
        {"role": "system", "content": rules + sources},
        {"role": "user", "content": question}])
    return reply.choices[0].message.content

print(ask("How long do customers have to get a refund?"))

The "vector store" here is a matrix rebuilt on every run: fine for a few hundred files. Beyond that, use a database (next step) or a hosted service that chunks, indexes and cites for you: OpenAI file search or Gemini File Search.

6Build a no-code RAG bot with n8n and Supabase

  1. Database: create a free Supabase project ($0, 500 MB, paused after a week without activity). In the SQL Editor, run the SQL from the vector store quickstart: a documents table for 1536-number embeddings (what text-embedding-3-small makes) and a match_documents function.
  2. Credentials in n8n: Supabase (Project URL as Host, plus a secret key from Project Settings > API Keys, per n8n's docs) and OpenAI (see Get API keys).
  3. Ingest workflow: a Google Drive Trigger that watches a folder, then a Google Drive node that downloads the file (or a form upload), feeds a Supabase Vector Store node set to Insert Documents. Attach Embeddings OpenAI (text-embedding-3-small, $0.02 per million tokens as of October 2026) and a Default Data Loader with the Recursive Character Text Splitter. Add file name and date as metadata.
  4. Chat workflow: a Chat Trigger into an AI Agent with a chat model. Add the Supabase Vector Store in Retrieve Documents (As Tool for AI Agent) mode, with a plain description ("Company policies and pricing"), a limit of 4 and the same embedding model.
  5. Rules: paste the Step 2 instructions into the agent's System Message, with "documents tool" in place of "files in this project."

Just exploring? n8n's RAG Starter Template skips Supabase, but its in-memory store loses everything when n8n restarts.

7Keep it fresh, scoped and clean

Fresh: prefer live links to uploads (Google Docs in Claude projects, Drive sources in Gemini Notebook). Date file names and delete old versions. In a RAG store, delete a file's old chunks before inserting the new version, or the bot will quote last year's price list.

Scoped:

  • Shared projects: ChatGPT's "Anyone with a link" lets any signed-in user with the link join. Use "Only those invited."
  • Notebooks: every viewer can reach every source.
  • Connectors: each person connects their own account and sees only what they already can.
  • Your RAG bot: anyone who can chat with it can retrieve any chunk. Use separate stores, or metadata filters, per audience.

Clean: never upload passwords, API keys, bank or card numbers, health records, documents under NDA, or personal data the job doesn't need. On personal plans, check training settings first: Claude's Model Improvement, ChatGPT's Improve the model for everyone, Gemini's Keep Activity. Anthropic's commercial plans, ChatGPT Business and Enterprise, and Google Workspace don't train on your content by default.

8Test the answers before anyone relies on them

Build a 20-question test set, run it on every rung you use, and rerun it after every big change.

Write my test set (works in any chatbot)
Read the attached documents. Write 20 test questions for an AI assistant that will answer
from them: 10 answered by a single document, 3 that need two documents, 3 the documents
don't answer, 2 where documents conflict, and 2 with a false premise. For each, give the
expected answer and the file and section it comes from, or "not answerable". Output a table.
Accuracy test0/8

Grade strictly: a right answer with a wrong citation fails. When an answer is wrong, check retrieval first (did it find the right passage?), then the document, then the instructions.

What's next

Run the RAG script privately with Run AI on your own computer, or put your RAG bot in Slack or Telegram with Build your own AI bot. Go deeper with Give Claude your company's memory with Projects and Set up Gemini, or give an agent your knowledge as a tool with MCP.

Get the next lesson in your inbox

Your free AI path in the right order, plus new guides when they come out.

Free. No card. One click to unsubscribe.

Want it done,not just learned?

The AI Skill Pack: 13 ready Claude Skills for your inbox, weekly report, meetings, content, research, proposals and SOPs. Installed in ten minutes. $27, one time.

See the AI Skill PackOr keep going free: everything in one place