> ## Documentation Index
> Fetch the complete documentation index at: https://docs.illumichat.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Building a Support Assistant

> Create an AI-powered customer support assistant step by step

This guide walks through creating a customer support assistant from scratch, including configuring its behavior, connecting a knowledge base, and deploying it as a website widget.

## What You Will Build

By the end of this guide, you will have:

* A support assistant that answers questions using your help documentation
* A knowledge base loaded with your support articles
* A widget embedded on your website for customers to chat with

## Prerequisites

* An IllumiChat account with an active workspace
* Help documentation or FAQ content (PDF, DOCX, or text files)
* Access to your website's HTML to embed the widget

## Step 1: Create the Assistant

<Steps>
  <Step title="Navigate to Assistants">
    Open your workspace and click **Assistants** in the sidebar. Click **Create Assistant**.
  </Step>

  <Step title="Configure basic settings">
    * **Name**: Give it a descriptive name, e.g. "Customer Support"
    * **Visibility**: Controls who on your team can use the assistant in the internal Chat workspace (`workspace` or `private`). It has no effect on the widget -- that's enabled separately in [Step 4](#step-4-deploy-the-widget).
  </Step>

  <Step title="Write the system prompt">
    Use a structured prompt that defines the assistant's role and boundaries:

    ```text theme={null}
    You are a customer support assistant for [Your Company].

    ## Role
    Help customers find answers to their questions using the
    provided knowledge base.

    ## Guidelines
    - Answer questions based on the knowledge base content.
    - Be friendly, concise, and professional.
    - If you cannot find the answer, say so honestly and suggest
      contacting support at [your-email].
    - Never make up information about products, pricing, or policies.

    ## Response Format
    - Use short paragraphs (2-3 sentences).
    - Use bullet points for lists.
    - Include links to relevant help articles when available.
    ```
  </Step>

  <Step title="Save the assistant">
    Click **Save** to create your assistant.
  </Step>
</Steps>

## Step 2: Add a Knowledge Base

Upload your support documentation so the assistant can reference it when answering questions.

<Steps>
  <Step title="Create a project">
    Go to **Projects** in the sidebar and click **Create Project**. Name it something like "Support Docs".
  </Step>

  <Step title="Upload documents">
    Click **Upload** and add your support files. Supported formats include PDF, DOCX, TXT, and Markdown.
  </Step>

  <Step title="Wait for processing">
    Documents are chunked, embedded, and indexed automatically. Processing status is shown for each file. Wait until all documents show a **Completed** status.
  </Step>

  <Step title="Attach the project to your assistant">
    Go back to your assistant's settings. Under **Project**, select the "Support Docs" project you created. Save.
  </Step>
</Steps>

<Note>
  The assistant will now use retrieval-augmented generation (RAG) to search your documents before responding. This means answers are grounded in your actual content rather than the model's general knowledge.
</Note>

## Step 3: Test the Assistant

Before deploying, test the assistant with realistic questions:

1. Open the assistant and start a new chat
2. Ask questions your customers typically ask
3. Verify the responses are accurate and cite the right sources
4. Test edge cases — questions the knowledge base does **not** cover

**What to check:**

* Does it answer correctly from the knowledge base?
* Does it gracefully handle questions outside its scope?
* Is the tone consistent with your brand?
* Are responses the right length?

If responses are off, refine your system prompt. See [Writing Effective Prompts](/guides/effective-prompts) for techniques.

## Step 4: Deploy the Widget

Embed the assistant on your website so customers can chat with it directly.

<Steps>
  <Step title="Get the widget script">
    In your assistant's settings, go to the **Widget** tab. Copy the embed script:

    ```html theme={null}
    <script
      src="https://widget.illumichat.com/v1/widget.js"
      data-assistant-id="YOUR_ASSISTANT_ID"
      async
    ></script>
    ```
  </Step>

  <Step title="Add to your website">
    Paste the script before the closing `</body>` tag on every page where you want the widget to appear.
  </Step>

  <Step title="Configure appearance">
    Customize the widget's look using data attributes:

    ```html theme={null}
    <script
      src="https://widget.illumichat.com/v1/widget.js"
      data-assistant-id="YOUR_ASSISTANT_ID"
      data-primary-color="#0066FF"
      data-position="bottom-right"
      async
    ></script>
    ```

    See [Widget Configuration](/widget/configuration) for all options.
  </Step>

  <Step title="Set up domain restrictions">
    For security, restrict the widget to your domains. In the assistant's **Widget** settings, add your domains under **Allowed Domains** (e.g., `example.com`, `www.example.com`).
  </Step>
</Steps>

## Step 5: Enable Lead Capture (Optional)

Collect visitor information before or during conversations:

1. In your assistant's widget settings, enable **Lead Capture**
2. Configure which fields to collect (name, email, phone)
3. Mark required fields
4. Leads are saved to your [Contacts](/features/contacts) and can be exported

## Step 6: Monitor and Improve

After deployment, review conversations regularly to improve quality:

* **Review chat history** in the IllumiChat dashboard to see what customers are asking
* **Update your knowledge base** when you notice gaps in coverage
* **Refine the system prompt** based on recurring issues
* **Check the widget analytics** for usage patterns

<Tip>
  Set up a [support ticket workflow](/features/tickets) so the assistant can create tickets when it cannot resolve an issue, ensuring nothing falls through the cracks.
</Tip>

## Checklist

Use this checklist to verify your support assistant is ready:

* [ ] Assistant created with a clear system prompt
* [ ] Knowledge base uploaded and fully processed
* [ ] Tested with 10+ representative customer questions
* [ ] Widget embedded and rendering correctly on your site
* [ ] Domain restrictions configured
* [ ] Lead capture enabled (if needed)
* [ ] Team members briefed on reviewing chat history
