How to Build an AI-Powered FAQ Bot for Customer Support

Create an intelligent FAQ system that uses RAG to answer customer questions from your documentation.

What This Integration Does

An FAQ bot answers customer questions in seconds using your own documentation as the source of truth. Unlike a raw LLM, RAG (Retrieval-Augmented Generation) grounds every answer in retrieved snippets, so the bot can cite where it got each fact and refuses to answer when the docs are silent. Customers get instant help during off-hours, your team stops re-typing the same answers, and you control exactly what the bot is allowed to say by editing the Knowledge collection.

The workflow in Spojit runs per question. A Webhook trigger sends the question in, a Knowledge node queries your collection and composes a grounded answer, a Condition node escalates anything the docs do not cover, and a Response node returns the answer to the caller. Nothing is stored long-term unless you choose to log question and answer pairs for analytics.

Prerequisites

  • A persistent Knowledge collection populated with your FAQ entries, product docs, and policies. The richer this is, the better the answers.
  • A front end that can call the webhook URL: chat widget, marketing form, or a Front inbox.
  • (Optional) a Slack connection for routing unanswered questions to humans.

Step 1: Build the Knowledge Collection

Before touching the canvas, open the Knowledge section in the sidebar and choose New Collection. Give it a name, then open it and use Upload Document followed by Upload & Embed to add the documents that should ground the answers: FAQ Markdown, returns policy, shipping rules, account help, product pages. Spojit chunks and embeds each document for you; the document table shows status READY when it is queryable. Re-upload a document (Overwrite when prompted) whenever you publish changes to that source.

Step 2: Webhook Trigger

Drop a Trigger node onto the canvas and set its Trigger Type to Webhook. The trigger output is the parsed JSON body, so post a payload that includes question (the user's text) and optionally sessionId for follow-up turns. Point your chat widget or form at this workflow's webhook URL.

Step 3: Knowledge - Query and Generate the Grounded Answer

Add a Knowledge node and set it to Query mode. Pick the persistent collection from Step 1, set Result Count to 5, and choose a Model for synthesis. In the Prompt field, instruct the model to answer only from the retrieved context:

Answer the customer question using ONLY the retrieved context.
Cite the source title in parentheses after each claim. If the context
does not contain the answer, set answered to false and reply:
"I don't have that in my docs - I'll connect you with the team."

Question: {{ input.question }}

Set a Response Schema so the node returns structured JSON with answer (string) and answered (boolean), and set the Output Variable to faq. The boolean drives whether to escalate. Query mode retrieves the top matching snippets from the collection and synthesizes the answer in one step, so no separate AI agent node is required.

Step 4: Condition - Escalate Unanswered Questions

Add a Condition node that tests {{ faq.answered }} == false. On the false branch, add a Connector node in Direct mode for the Slack connector and call its send-message tool, posting into a triage channel with the question, the session id, and a note that the docs did not cover it. These are the questions that should become new Knowledge entries.

Step 5: Return the Answer

Add a Response node that returns { "answer": "{{ faq.answer }}", "answered": {{ faq.answered }} } to the webhook caller. Your chat widget renders the answer immediately. If you want a transcript, also add a Connector node in Direct mode for the MongoDB connector and call its insert-documents tool with the question and answer so you can review accuracy later.

Tips

  • Re-upload changed documents (Overwrite when prompted) on every doc publish. Stale answers are worse than no answer.
  • Keep Result Count around 5. More context dilutes the model's focus and inflates token cost.
  • Use Miraxa, the intelligent layer across your automation, to scaffold this workflow from a sentence and to investigate any run that returns the wrong answer.
  • Log every unanswered question. The list of "things the bot couldn't answer" is your doc-writing backlog.

Common Pitfalls

  • Allowing the model to answer outside the snippets. Without an explicit "do not invent" instruction it will guess - and guess wrong on policy questions.
  • Indexing internal-only docs into the customer-facing collection. Separate collections per audience.
  • Forgetting follow-up turns. If your widget supports a multi-turn chat, pass sessionId through and include prior turns in the prompt so the bot can resolve pronouns.

Testing

Compile a list of 20 questions: 15 you know are answered in your docs and 5 that aren't. Run them through the workflow and confirm the 15 get correct, cited answers and the 5 escalate cleanly. Track exact-match accuracy on the 15. Aim for greater than 90% before launching publicly.

Learn More

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.