OMI-KALIX/n8n-rag-automation-ollama-pinecone
End-to-end RAG automation built with n8n, Ollama (local LLMs), and Pinecone. Automatically ingests documents, generates embeddings, stores vectors, and enables context-aware AI chat.
๐ n8n RAG Automation using Ollama & Pinecone
A fully automated Retrieval-Augmented Generation (RAG) pipeline built with n8n, Ollama (local LLMs), and Pinecone Vector Database.
This project demonstrates how to ingest documents, generate embeddings, store them in a vector database, and query them using an AI Agent with real context.
โจ Features
- ๐ Automated document ingestion from Google Drive
- โ๏ธ Intelligent document chunking
- ๐ง Embedding generation using local Ollama models
- ๐ฆ Scalable vector storage with Pinecone
- ๐ฌ Context-aware chat using n8n AI Agent
- ๐ Runs locally with no external LLM dependency
๐ Folder Structure
n8n-rag-automation-ollama-pinecone/
โ
โโโ workflows/
โ โโโ file-ingestion-pipeline_rag-chat-automation.json
โ
โโโ screenshots/
โ โโโ file-ingestion-workflow.png
โ โโโ rag-chat-workflow.png
โ
โโโ .env.example
โโโ .gitignore
โโโ README.md
๐๏ธ Architecture Overview
File Ingestion Pipeline
- Google Drive Trigger (file added/updated)
- File download
- Recursive Character Text Splitter
- Embeddings via
nomic-embed-text - Store vectors in Pinecone
RAG Chat Pipeline
- Chat trigger
- AI Agent (tool-enabled)
- Semantic search from Pinecone
- Context-aware responses using Llama 3.2
๐ผ๏ธ Automation Workflow
๐ง Models Used
| Purpose | Model |
|---|---|
| Chat / Agent | llama3.2:latest |
| Embeddings | nomic-embed-text |
| Embedding Dimension | 768 |
| Similarity Metric | cosine |
โ๏ธ Prerequisites
- n8n (local or Docker)
- Ollama installed
- Pinecone account
- Google Drive credentials (for ingestion)
๐ Setup Instructions
1๏ธโฃ Install Ollama Models
ollama pull llama3.2
ollama pull nomic-embed-text
๐ Final Notes
This project was built to explore how automation, local LLMs, and vector databases come together to form real-world AI systems.
Everything here is designed to be practical, transparent, and extensible.
If this repository helps you learn, build, or experiment with RAG pipelines, feel free to fork it, adapt it, or improve it.
Contributions, suggestions, and discussions are always welcome.
โญ If you found this useful, consider starring the repo โ it really helps!
