Templates / Save Costs In RAG Workflows using the Q&A Tool With Multiple Models

Save Costs In RAG Workflows using the Q&A Tool With Multiple Models

Ready for 3.0

by Niklas Hatje ✓ · 10,760 views · created 2025-06-17 · Internal Wiki, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 10 nodes and runs when a chat message arrives (plus 1 other trigger). Along the way it connects Embeddings OpenAI, Vector Store Question Answer and OpenAI Chat Model.

How it runs

Trigger: When a chat message arrives (plus 1 other trigger).

  1. AI Agent: runs an AI agent, with model: Expensive model; 1 tool (Answer questions with a vector store)
  2. Insert Data to Store (Simple Vector Store): stores documents in the Simple vector store, with embeddings: Embeddings OpenAI; document loader: Default Data Loader

Services it uses

Embeddings OpenAIVector Store Question AnswerOpenAI Chat Model

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (8)

From the author

This template shows how to use the Question and Answer tool to save costs in RAG use cases. Who is this for? This template is for everyone who wants to start giving knowledge to their Agents through RAG. Requirements Have a PDF with custom knowledge that you…

Excerpt from Niklas Hatje's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.