---
title: "Teaching AI your stuff: the written guide"
description: "How AI gets to know your company's documents: embeddings, vector databases, RAG, fine-tuning and memory."
date: "2026-12-03T00:00:00.000Z"
last_reviewed: "2026-12-04"
author: "Tim Benniks"
url: "https://noddingalong.tech/paths/teaching-ai-your-stuff"
markdown_url: "https://noddingalong.tech/paths/teaching-ai-your-stuff.md"
reading_time: "5 min read"
---

# Teaching AI your stuff: the written guide

How AI gets to know your company's documents: embeddings, vector databases, RAG, fine-tuning and memory.

Goal: Understand how AI accesses and adapts to information.

## The episodes, in order

1. [What is a context window?](https://noddingalong.tech/videos/what-is-a-context-window): A context window is how much text an AI model can take in at once, including your whole chat and its own reply.
2. [What are embeddings?](https://noddingalong.tech/videos/what-are-embeddings): Embeddings turn text into lists of numbers so AI can search by meaning instead of exact words.
3. [What is a vector database?](https://noddingalong.tech/videos/what-is-a-vector-database): A vector database stores embeddings and quickly finds the closest matches by meaning.
4. [What is RAG?](https://noddingalong.tech/videos/what-is-rag): RAG (retrieval-augmented generation) lets an AI look things up in your documents before it answers.
5. [What is fine-tuning?](https://noddingalong.tech/videos/what-is-fine-tuning): Fine-tuning trains an existing AI model further on your own examples so it behaves the way you want.

## In short

- A model only knows its training data plus whatever is on its desk right now.
- Embeddings put text on a map of meaning; a vector database finds the nearest spots fast.
- RAG searches your documents and puts the best passages on the desk before the model answers.
- Facts go in the book (RAG). Habits go in the training (fine-tuning).
- Every one of these is only as good as the documents and examples you feed it.

This path is for the moment someone says "can't we just make the AI know our stuff?" Your handbook, your product docs, your support tickets, your tone of voice. It sounds like one request. It's actually several different techniques, and picking the wrong one is how projects end up expensive and disappointing.

By the end, you'll understand how AI accesses and adapts to information, and which approach fits which problem. Each section matches an episode, in an order where each idea sets up the next. One episode, on AI memory, is still in production.

## 1. What is a context window?

Start with the desk. A model knows what it learned in training, which doesn't include your company's internal documents, plus whatever is in its [context window](https://noddingalong.tech/glossary#context-window) right now: the app's instructions, your conversation, any files you added and its own reply.

Everything in this path is ultimately a way of getting the right things onto that desk. And the desk has limits. It's measured in tokens, and when it's full, the app refuses, summarises or drops the oldest material, [as Anthropic's docs explain](https://platform.claude.com/docs/en/build-with-claude/context-windows). Even when everything fits, models handle the middle of a long input worst, according to the [Lost in the Middle](https://arxiv.org/abs/2307.03172) study.

So "just paste all our documents in" doesn't scale. You need a way to pick the right few pages.

**Remember:** a bigger desk isn't a tidier one. [Watch the episode](https://noddingalong.tech/videos/what-is-a-context-window).

## 2. What are embeddings?

Picking the right pages starts with [embeddings](https://noddingalong.tech/glossary#embeddings). An embedding turns a piece of text into a long list of numbers, which you can think of as coordinates on a map of meaning. Bananas land next to pineapples. Your tax return lands far away.

This matters because keyword search misses synonyms. Search for "baby time off" and a keyword search won't find the policy titled "parental leave". On the map of meaning, they're neighbours. [OpenAI's documentation](https://developers.openai.com/api/docs/guides/embeddings) describes it simply: the distance between two of these lists measures how related they are, which makes them useful for search, recommendations and grouping.

Two catches. The map is learned from text written by people, biases included: a [2016 study](https://arxiv.org/abs/1607.06520) found word embeddings trained on news articles reproduced gender stereotypes "to a disturbing extent". And close means related, not correct. The nearest page can still be last year's policy.

**Remember:** embeddings find similar, not true. [Watch the episode](https://noddingalong.tech/videos/what-are-embeddings).

## 3. What is a vector database?

Once every document has coordinates, you need somewhere to keep them and a fast way to find the nearest ones among millions. That's a [vector database](https://noddingalong.tech/glossary#vector-database): a library sorted by meaning, storing the numbers next to the original text.

Measuring the distance to every single item is slow, so most systems search approximately, hopping from neighbour to neighbour towards the question. [Pinecone's explainer](https://www.pinecone.io/learn/vector-database/) is upfront that the trade-off is between accuracy and speed. They can also filter by labels like date or department. And it doesn't have to be a new product: [pgvector](https://github.com/pgvector/pgvector) adds this to Postgres, a database many companies already run.

The catch: it always returns the nearest match, even when nothing relevant is in there, unless somebody sets a cutoff. Ask about parking, get the lunch menu. Garbage in, nearest garbage out.

**Remember:** it searches by vibes, but the vibes are maths. [Watch the episode](https://noddingalong.tech/videos/what-is-a-vector-database).

## 4. What is RAG?

Now the pieces click together. [RAG](https://noddingalong.tech/glossary#rag), retrieval-augmented generation, turns a closed-book exam into an open-book one. A search step, often using embeddings and a vector database, finds a few relevant passages in your documents and puts them on the desk next to your question. The model answers from those pages and can cite them. [AWS's explainer](https://aws.amazon.com/what-is/retrieval-augmented-generation/) walks through the same steps.

Citations are the best part: an answer with a source is an answer you can check. Grounding the model in documents [reduces hallucinations](https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/reduce-hallucinations) but doesn't eliminate them. In 2024, [Stanford researchers tested legal research tools](https://arxiv.org/abs/2405.20362) built this way and found they still got things wrong between 17% and 33% of the time on the questions tested.

**Remember:** RAG is only as good as what it finds. [Watch the episode](https://noddingalong.tech/videos/what-is-rag). There's also an opinion piece on why [most RAG problems are filing problems](https://noddingalong.tech/articles/rag-is-a-filing-problem).

## 5. What is fine-tuning?

[Fine-tuning](https://noddingalong.tech/glossary#fine-tuning) is a different tool altogether. Instead of handing the model a book, you send it to specialist school: you train an existing model further on many examples of the input and output you want, so its habits shift. Its tone, its format, the way it handles a certain kind of request.

The vendors are surprisingly unanimous about when not to do it. Google's documentation says to [start with prompting](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/tune-models). OpenAI recommends [starting with about 50 well-crafted examples](https://developers.openai.com/api/docs/guides/supervised-fine-tuning), and if those make no difference, rethinking the task or the prompt before adding more. It needs lots of good examples, takes time and money, and a fine-tuned model is retired when its base model is. Most importantly, it's poor at teaching new facts: a [2024 study](https://arxiv.org/abs/2405.05904) found models learn new facts slowly through fine-tuning, and that learning them makes hallucination more likely.

**Remember:** facts go in the book. Habits go in the training. [Watch the episode](https://noddingalong.tech/videos/what-is-fine-tuning). The decision guide [prompt, RAG or fine-tuning?](https://noddingalong.tech/guides/prompt-rag-or-fine-tuning) helps you pick.

## 6. AI memory

*Episode coming soon.*

When a chatbot "remembers" your dog's name across chats, that isn't the context window. The desk is cleared when a chat ends. Memory is a separate feature: the app saves notes about you and adds them to future chats. [OpenAI's help pages](https://help.openai.com/en/articles/8983136-what-is-memory) describe saved memories as stored separately from chat history, and temporary chats as not creating any.

So memory is really the app putting something back on the desk for you. Useful, and worth knowing what's been saved.

## Putting it together

Here's the map of this path. The model only sees its desk. Embeddings and vector databases are how you find the right pages for that desk among thousands. RAG is the whole routine: search, put the pages on the desk, answer with sources. Memory is the app saving notes about you and putting them back next time. Fine-tuning is the odd one out: it changes the model's habits rather than what's on its desk, and it's the wrong tool for facts that change.

The common thread is that none of these make your information better. They make it reachable. If the documents are out of date or the examples are sloppy, the AI will serve that back to you, with a citation. The [glossary](https://noddingalong.tech/glossary) has every term from this path.

## The question to ask

> Great, when were those documents last updated?

## Questions people ask

### How do I get AI to know my company's documents?

It's not one technique but several. The model only sees what's in its context window, so you need a way to find the right few pages, usually embeddings and a vector database, and put them in front of it, which is what RAG does.

### Can I just paste all our documents into the chat?

Not at scale. The context window has a size limit, and even when everything fits, models handle the middle of a long input worst. You need a way to pick the right few pages instead.

### What are embeddings used for?

They turn text into lists of numbers that work like coordinates on a map of meaning, so search can find related text even without matching words, like baby time off finding a parental leave policy.

### Why did our AI search return something irrelevant?

A vector database always returns the nearest match, even when nothing relevant is in there, unless someone sets a cutoff. Close in meaning also isn't the same as correct: the nearest page can still be last year's policy.

### Does ChatGPT remember me between chats?

Only through a separate memory feature. Each chat's working space is cleared when it ends; memory means the app saves notes about you and adds them to future chats, and temporary chats don't create any.

---

Written by Tim Benniks (https://timbenniks.dev) for Nodding Along: AI explained for people who work with nerds but aren't one. https://noddingalong.tech
