Skip to content
WhitecrestLet’s talk

Support & knowledge

Dual Stage RAG Knowledge Assistant.

A knowledge assistant that checks a semantic cache of earlier answers before calling an LLM. It is designed for internal knowledge bases that receive many repeated questions.

Dual Stage RAG Knowledge Assistant workflow

01 / The challenge

Single-stage RAG repeats work for repeated questions.

A basic RAG chatbot runs embedding, retrieval and generation on every question, even ones it has effectively answered before. That is slower and costlier than needed. Internal assistants see many repeated or near-duplicate questions.

02 / The approach

Check the cache first, generate only on a miss.

Documents from Google Drive are extracted, chunked, embedded with Ollama and stored in a Pinecone knowledge base index. Each query is embedded and checked against a separate cache index; close matches return the cached answer, and misses go to a Gemini agent whose answer is written back to the cache.

  • Two Pinecone indexes: one holds source documents and one holds earlier question and answer pairs.
  • Cache-first path: a similarity score of 0.88 or above returns the cached answer without an LLM call.
  • Self-filling cache: every newly generated answer is stored for similar future questions.
  • Local embeddings: Ollama handles ingestion and query embeddings instead of a paid embeddings API.

Stack

  • n8n
  • Google Drive
  • Ollama
  • Pinecone
  • Gemini
  • RAG
  • Semantic Caching

More automations

Support & knowledge

Your next project

Something in mind?
Let’s find your starting point.

Discuss your project