How to Build an AI-Powered Internal FAQ System

Create an internal FAQ in Spojit that answers team questions from your company docs using a Knowledge collection.

What This Integration Does

Internal teams burn hours each week asking the same questions: how do I expense a flight, what is the parental leave policy, where do I find the onboarding checklist. This Spojit workflow gives them a Slack or browser endpoint they can ask in plain English, and returns an answer drawn directly from your company handbook, policy docs, and FAQ articles stored in a Knowledge collection. Because every answer is grounded in your own source material, you avoid the made-up answers a generic Q&A tool tends to produce.

At run time, a Webhook trigger (typically from a Slack slash command or an internal admin tool) hands the question to the workflow. A Knowledge node in Query mode searches your collection and synthesizes a grounded answer with a chosen model, then a Response node hands it back to the caller. Each request runs on its own: there is no shared state between runs, and re-running the same question simply queries the collection again against whatever documents it currently holds.

Prerequisites

  • A persistent Knowledge collection already populated with your handbook, policies, and FAQ documents. Note the embedding model the collection was created with so your query uses the matching model.
  • A Slack connection if you want users to ask via a slash command or DM, or any HTTP client that can post to a webhook.

Step 1: Webhook Trigger

Drop a Trigger node on the canvas and set its Trigger Type to Webhook. Spojit gives you a unique URL that returns 202 with an executionId when posted to. Wire that URL to a Slack slash command (e.g. /ask) or to whatever internal tool sends the question. The parsed JSON body is available downstream as {{ input }}, so send a payload like { "question": "...", "userId": "..." } and reference {{ input.question }} and {{ input.userId }} in later steps.

Step 2: Knowledge Node - Query the Collection

Add a Knowledge node and set its mode to Query. This single node both searches your collection and synthesizes a grounded answer, so you do not need a separate generation step. Configure it like this:

  • Collection: your persistent company-docs collection.
  • Prompt: pass the question through and pin the model down. For example: Answer ONLY using the provided company documents. If the answer is not present, reply exactly: "I don't have that in our internal docs - try asking #people-ops." Question: {{ input.question }}
  • Model: the AI model used to synthesize the answer.
  • Result Count: how many matching chunks to retrieve (default 5). Keep it small (4-8) so the answer stays focused.
  • Output Variable: name it, for example faqAnswer, so later steps can read the result.

Because the prompt instructs the model to fall back to a fixed message when the documents do not cover the question, you get a clean, grounded "I don't know" instead of a made-up answer.

Step 3: Response Schema for Structured Output (Optional)

If your browser tool wants to render citations, add a Response Schema to the same Knowledge node to force structured JSON output. For example, ask for an object with an answer string and a sources array of document names. The query result then resolves to that shape under your {{ faqAnswer }} output variable, which keeps the front-end rendering predictable.

Step 4: Condition - Was the Question Answerable?

Add a Condition node that checks whether the answer matched your fallback phrase, for example whether {{ faqAnswer.answer }} contains I don't have that in our internal docs. Route unanswerable questions down their own branch so you can log them separately and feed the gaps back into your documentation.

Step 5: Slack Reply (or Webhook Response)

For the Slack path, add a Connector node pointing at the slack connector in Direct mode and pick the send-message tool. Post the answer back to the user so they get a reply in channel. For a browser tool, use a Response node instead and return {{ faqAnswer }} as JSON so the front end can render the answer and its source list.

Step 6: Log the Q&A for Future Improvement

Add a final Connector node that appends each question, answer, and matched sources to a store of your choice, for example a faq_logs collection via the mongodb connector and its insert-documents tool, or a table via the mysql connector and insert-rows. Review the log weekly to spot questions the collection could not answer and update your documentation accordingly.

Tips

  • Keep the collection current - run a scheduled workflow with a Knowledge node in Embed mode to re-upload changed policy documents so answers reflect the latest version.
  • Match the embedding model - always query a collection with the same embedding model it was created with, or retrieval quality drops.
  • Strip personal data from logs - the question log is a goldmine for improvement, but it can leak private context. Mask emails and IDs before persisting them with your storage connector.

Common Pitfalls

  • Stale documents - if you update a policy but forget to re-embed it into the collection, the FAQ confidently quotes the old rule. Re-embed on document change, overwriting by file name.
  • Over-retrieval - setting Result Count too high dilutes the answer with weak matches and quality drops. Stay in the 4-8 range.
  • Slack slash command timeout - Slack slash commands expect a fast reply. Acknowledge the slash command immediately with an empty 200, then post the synthesized answer via a follow-up send-message call once the Knowledge query finishes.

Testing

Start with five known-good questions whose answers you can verify by hand against a single source document. Run the workflow with the Run button or a test webhook post and confirm the Knowledge query quotes the right passage. Then try five questions that are deliberately not in your collection and confirm the fallback message and the Condition branch both trigger. Only after both sets pass should you broadcast the slash command to the wider team.

Learn More

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