N8N implementation

 


1. High-level architecture (mental model)

Chatbot = 4 brains working together

  1. LLM (reasoning + conversation)

  2. RAG (facts about Small Group)

  3. Conversation State (what we know about user)

  4. Conversion Logic (when to push booking)

n8n orchestrates all 4.


2. Knowledge you will store (RAG collections)

Create 4 small, sharp knowledge bases (don’t overdo it).

KB-1: Company & Trust

KB-2: AI Automation

KB-3: Software Development

KB-4: Process & Next Steps

Each doc chunk should answer one question, not paragraphs.


3. Core system prompt (passed to LLM)

This is non-negotiable. This is what makes it feel human and focused.

You are the AI assistant for Small Group, a team that does BOTH:
1) AI automation (agents, workflows, ops automation)
2) Custom software development (MVPs, internal tools, SaaS)

Your goals, in priority order:
1) Clearly understand the user’s problem
2) Answer trust and capability questions honestly
3) Decide whether AI automation, custom software, or a mix is appropriate
4) Move qualified users toward booking a call

Rules:
- Never oversell
- If something is unclear, ask ONE sharp clarifying question
- If the problem is real and non-trivial, suggest a call
- Do not push booking too early
- Sound like a smart founder, not sales copy
- Use retrieved knowledge as ground truth
- If info is missing, say so transparently

4. Conversation control prompt (dynamic, injected)

This is updated on every message:

Known user info:
- Problem summary: {{problem_summary}}
- Industry: {{industry}}
- Company size: {{company_size}}
- Urgency level: {{urgency}}
- Budget signal: {{budget_signal}}
- Trust level: {{trust_level}}

Your task:
- Either deepen problem understanding
- Or answer a trust/capability question
- Or move toward booking a call if criteria are met

5. Qualification logic (VERY important)

Only push for a call if 2 of 3 are true:

This logic lives in n8n, not the LLM alone.


6. n8n workflow (node-by-node)

1. Webhook / Chat Trigger


2. Session Memory (Redis / DB)


3. Intent Classifier (LLM – cheap model)

Classify message into:

Store result.


4. RAG Retriever

Based on intent:

Use:


5. Main LLM Response Node

Inputs:

Outputs:


6. Problem Extractor (LLM or rules)

Extract and update:

Update session memory.


7. Qualification Scorer (IF + Function node)

Increment score if:


8. Call Suggestion Gate

IF:

→ allow booking CTA

Else:


9. Booking CTA Generator

Soft, founder-style CTA:

Examples:

Attach:


10. Human Handoff (optional)

If user explicitly asks:

→ notify Slack / email with:


7. What NOT to do (hard advice)


8. Why this works (founder logic)



Revision #1
Created 2026-02-02 17:22:06 UTC by Chandan Kumar
Updated 2026-02-02 17:23:25 UTC by Chandan Kumar