Session 11 of 15
RAG β An Organizational Knowledge Base with Embeddings and a Vector Store
How to make AI answer from the organization's documents and not from imagination: agents' knowledge in Make, and a full RAG β splitting into chunks, embeddings, a vector store (Pinecone / Supabase pgvector), retrieval and an answer that cites its sources.
β±οΈ 3 hoursπ οΈ An organizational knowledge bot: Drive β chunks β embeddings β vector store β an agent that cites sources
π― Session goals
- Explain what RAG is and why it reduces hallucinations.
- Tell an agent's knowledge files apart from a full RAG β and when to use each.
- Understand embeddings and semantic similarity (cosine similarity).
- Split documents into chunks with overlap and keep metadata.
- Build an ingestion scenario from Google Drive into a vector store.
- Build a query scenario: a question β retrieval β an answer with sources.
- Connect the store as a tool for the agent and update it when documents change.
π§ͺ Today's scenario β a live run
ποΈ The agenda
- 00:00β00:15 Review: Noa
- 00:15β00:40 What RAG is and why
- 00:40β01:05 Embeddings and vector stores
- 01:05β01:20 β Break
- 01:20β01:50 Ingestion: Drive β chunks β vectors
- 01:50β02:15 Query + citing sources
- 02:15β02:50 Building together: an organizational knowledge bot
- 02:50β03:00 Summary and practice
What is RAG?
- Retrieval + generation
- Retrieve passages β put them in the prompt
- Fewer hallucinations, more up to date
- Citing sources
An agent's knowledge or a full RAG?
- Knowledge: fast, a few fixed documents
- RAG: scope, automatic updates, control
- Start simple
Embeddings β meaning as numbers
- Embedding = a vector of meaning
- Cosine similarity
- Top K + metadata
- The same model for storing and querying
Ingestion β putting documents into the store
- Watch files β text β chunks β embeddings β upsert
- A 500β1000 chunk + overlap
- A fixed ID for updates
- Metadata for citing
Query β retrieval and an answer with sources
- An embedding for the question β query top K
- Text aggregator β context with sources
- "Only from the passages" + "I didn't find it"
- A similarity threshold
RAG as a tool for the agent
- Query as a tool for the agent
- Permissions through metadata
- Updating and deleting
- Test questions
βοΈ Understanding check
π To sum up
- RAG = retrieving relevant passages β the AI answers from them with sources.
- Knowledge files for a few fixed documents; a full RAG for scope and updates.
- Embeddings = meaning as numbers; the same model for storing and querying.
- Ingestion: Drive β chunks β embeddings β upsert with an ID and metadata.
- We built a knowledge bot that cites sources, and connected it to Noa.
ποΈ Time to practice!
The session project: An organizational knowledge bot: Drive β chunks β embeddings β vector store β an agent that cites sources