Skip to content
RAG Q&A over Your Docs

Module 09 · ai · advanced

Exercises 09 · RAG Q&A over Your Docs

Start from workflow/starter.json or your finished lesson workflow.

Exercise 1: Re-ingest without duplicates

Task: Add an optional "replace": true flag to the ingest API that clears the store before inserting.

Done when: ingesting the handbook three times with replace: true returns the same answers and the same chunk count as once.

Hint

The insert node has a Clear Store toggle; it accepts an expression.

Exercise 2: Persistent knowledge base

Task: Swap the in-memory store for a persistent one so knowledge survives restarts.

Done when: after docker compose restart n8n, questions still get answered without re-ingesting.

Hint

Supabase Vector Store (free tier, pgvector) or Qdrant (run it as another service in docker-compose.yml). Replace both vector store nodes; keep everything else.

Exercise 3: Ingest PDFs

Task: Accept a PDF upload on the ingest endpoint (reuse Module 07's upload handling).

Done when: uploading a PDF policy document makes its content answerable.

Hint

Switch the Default Data Loader to Binary type with the PDF loader. No separate Extract From File node needed.