RAG agent
A two-part AI system that automatically vectorises documents from Google Drive into Pinecone, then lets users ask questions through a conversational AI agent grounded in that knowledge base.
The problem this solves
Teams drown in documents but can't get fast, accurate answers from them. This agent turns static files into a searchable knowledge base in under a minute.
Instead of reading through PDFs or searching folders manually, a user simply asks a question and the agent retrieves only the relevant passages from the vector store to answer it.
The project
Most teams store important information in documents that sit in shared drives. When someone needs an answer, they open the folder, skim through files, and hope they find the right paragraph. The bigger the knowledge base grows, the longer this takes, and the more context gets missed.
This project solves that with two connected workflow pipelines. The first watches a Google Drive folder for new files, downloads each PDF, splits it into overlapping chunks of 850 characters, generates OpenAI embeddings, and inserts them into a Pinecone vector index. The second workflow is a chat-based AI agent: it receives a user question, queries the vector store for the most relevant passages, and returns a grounded answer using only the stored content. No hallucination, no guessing, no external sources.
The demo uses iOS 26 documentation as the knowledge base, but the architecture works for any domain: internal policies, product specs, research papers, or training materials.
By the numbers
2
connected workflows
One for ingestion (vectorise), one for retrieval (chat agent). They share the same Pinecone index and namespace.
14
total nodes
6 nodes handle the vectorisation pipeline; 8 nodes power the conversational agent with memory, tools, and dual LLM calls.
850
characters per chunk
Documents are split into 850-character segments with 50-character overlap, keeping context intact across chunk boundaries.
10
messages in memory
The agent retains the last 10 conversation turns, so follow-up questions stay contextual without re-stating the topic.
Workflow anatomy
Workflow A: Vectorise (Google Drive → Pinecone)
01 / watch
Monitor the folder
A Google Drive trigger polls the designated "RAG KB's" folder every minute for newly created files.
02 / process
Download and split
Each PDF is downloaded, loaded through a document parser, and split into overlapping chunks using a recursive character text splitter.
03 / store
Embed and index
OpenAI generates embeddings for each chunk, which are inserted into the "rag-agent" Pinecone index under the "rag-vector" namespace.
Workflow B: Chat Agent (Question → Answer)
01 / ask
Chat trigger
A public chat interface receives the user's question and passes it to the AI agent node.
02 / retrieve
Search the vector store
The agent's vector store tool queries Pinecone for the most relevant document chunks, scored by semantic similarity.
03 / answer
Generate a grounded response
GPT-5 Mini synthesises the retrieved passages into a clear, concise answer. If the information isn't in the store, the agent says so rather than guessing.
Interactive system architecture
Explore the connected nodes, data payloads, and execution pathways for this pipeline. Click any node to inspect its operational role and configuration.
Workflow A: Ingestion & Vectorisation Workflow B: Retrieval & Chat Agent
Google Drive
01. File Poll Trigger
Polls designated Google Drive folder every 60s for new PDFs.
Parser & Splitter
02. Recursive Splitter
Downloads PDF, chunks text into 850 chars with 50-char overlap.
Pinecone + OpenAI
03. Vector Embed & Index
Generates embeddings and writes to Pinecone vector index.
Chat Webhook
01. Chat Interface
Receives user prompt and initializes conversation session.
AI Agent Node
02. GPT-5 Mini Agent
Maintains 10-turn memory and orchestrates tool calls.
Vector Store Tool
03. Pinecone Search
Retrieves semantically scored chunks matching user query.
Grounded Output
04. Response Synthesis
Synthesizes strict grounded answer with zero hallucination.
Node Inspector
Click any node above to inspect its exact input parameters, credential scopes, and execution behavior.
Stack
Pinecone + OpenAI + Google Drive
Workflows
2
Total nodes
14
Vector DB
Pinecone
LLM
GPT-5 Mini
Embeddings
OpenAI
Chunk size
850 chars
Memory
10 turns
Demo KB
iOS 26 docs
Status
Documented
This project uses two connected workflow pipelines that share a Pinecone index. The downloadable exports are redacted: they omit Google Drive folder IDs, Pinecone API keys, OpenAI credentials, webhook IDs, and instance identifiers. Reconnect your own accounts after import.
0 likes · 0 views · Dec 4, 2026
Built two connected workflows that index Google Drive PDFs in Pinecone and answer user questions with a conversational AI agent grounded in the documents.