Work public

rag-pipeline-factory

A chat-to-RAG-pipeline factory. Average build time 74 seconds, 56 percent token savings via deterministic templates over LLM generation.

  • rag
  • n8n
  • code-mode
  • factory
  • template-gen
Repo
github.com/mj-deving/rag-pipeline-factory
Published
2026-05-26

What it is

A meta-workflow that takes a chat message describing a RAG pipeline and produces a deployed, validated, and tested n8n pipeline. Average end-to-end build time is 74 seconds.

The trick is template-first generation. Workflow JSON comes from deterministic templates in 20ms, not from LLM token generation. The LLM only fills slots. That swap cuts token cost by 56 percent and lifts reliability to 100 percent on the validation step.

Stack

TypeScript, Code-Mode, n8n REST API, Claude Haiku 4.5 as the slot-filler. Builds query workflow and ingestion workflow as a pair.