GitHunt
OM

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

Workflow Screenshot

๐Ÿง  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!

Happy building ๐Ÿš€