Skip to content

How to Create AI Assistant

This guide walks you through the process of creating and training your AI Assistant using uploaded knowledge base files in WhatsMark SaaS.

Introduction

After configuring AI integration, you can create intelligent AI assistants that use your uploaded documents to provide contextual responses to user queries. The AI Assistant can analyze PDF, DOC, DOCX, TXT, and MD files to build a comprehensive knowledge base.

Step 1: Access AI Assistant Section

  • Log in to your WhatsMark SaaS admin dashboard
  • Go to AI Assistant in the left sidebar menu
  • The list shows all your existing assistants along with today's usage stats: total replies, input tokens, and output tokens consumed by each assistant today
  • Click "+ Create New Assistant" button to start creating your assistant

AI Assistant Dashboard

Step 2: Configure Assistant Basic Settings

Create New Personal Assistant Form

Fill out the assistant creation form with the following details:

Assistant Configuration Parameters

FieldDescriptionExampleRequired
Assistant NameUnique identifier for your assistantSmartFlow AI✅ Yes
DescriptionBrief explanation of assistant purposeAn intelligent virtual assistant designed to streamline workflows✅ Yes
System InstructionsBehavior and personality guidelinesYou are SmartFlow AI, a proactive and helpful assistant...✅ Yes
Select ProviderAI provider for this assistantOpenAI, Gemini✅ Yes
AI ModelOpenAI model selectionGPT-4o Mini, GPT-4o, GPT-4.1✅ Yes

AI Model Options

OpenAI Models

ModelPerformanceCostBest For
GPT-4o MiniFastLowBasic queries, quick responses
GPT-4oBalancedMediumGeneral purpose, most use cases
GPT-5.4AdvancedHighComplex reasoning, detailed analysis

Gemini Models (v1.1.0+)

ModelPerformanceCostBest For
Gemini 2.5 FlashFastLowQuick responses, cost-effective tasks
Gemini 2.5 ProAdvancedMediumComplex reasoning, longer context tasks

System Instructions Template

Use this template for professional assistant behavior:

text
You are [Assistant Name], a proactive and helpful assistant. Always provide clear,
concise, and context-aware responses. Anticipate user needs, suggest relevant
actions, and ensure user interactions are productive and pleasant.

Step 3: Build the Knowledge Base v1.1.0

Once your assistant is created, open its Knowledge tab to feed it the content it should answer from. The Knowledge tab supports four source types, so you are no longer limited to uploading files — you can also pull in entire websites, individual web pages, and manually written text.

Knowledge tab overview

Knowledge Source Types

Source TypeWhat It AddsBest For
WebsitesAll pages listed in a site's sitemap.xmlIngesting an entire help center or documentation site
URLsA single web pageA specific article, policy, or landing page
DocumentsUploaded files (PDF, DOC, DOCX, TXT, MD)Manuals, guides, internal reports
SnippetsShort blocks of manually typed textFAQs, quick facts, canned answers

Each source you add appears in a list showing its type, title/URL, and sync status. You can open any source to review it, re-sync it, or delete it.

Source Status

As each source is processed, its status moves through these stages:

StatusMeaning
PendingQueued, waiting to be processed
FetchingContent is being downloaded (URL/website sources)
ProcessingContent is being indexed for AI search
CompletedSource is fully synced and ready to answer from
FailedSomething went wrong — open the source for details and re-sync

Add a Website (Sitemap)

Use this to ingest many pages at once from a site's sitemap.xml.

  1. Open the Knowledge tab → Websites sub-tab
  2. Click Add
  3. Paste the full Sitemap URL (for example, https://example.com/sitemap.xml)
  4. Optionally set a page limit (default and maximum: 20 pages)
  5. Click Save

Add website / sitemap form

Each page found in the sitemap is fetched and indexed as its own source. Larger sites take longer to finish — monitor the status column as pages move to Completed.

TIP

Only the sitemap.xml is read — the assistant does not crawl by following links. Make sure the site exposes a valid sitemap.


Add a Single URL

Use this for one specific page.

  1. Open the Knowledge tab → URLs sub-tab
  2. Click Add
  3. Paste the page URL
  4. Click Save

Add URL form

The page is fetched, converted to clean text, and indexed for the assistant to answer from.


Upload Documents

The interface provides a drag-and-drop area for uploading knowledge documents:

Document upload interface

  • Drag and Drop: Drag files directly into the upload area
  • Click to Upload: Click the upload area to browse and select files
  • File Format Support: PDF, DOC, DOCX, TXT, MD up to 10MB each
  • Multiple Files: Upload multiple documents at once

Supported File Formats

FormatExtensionMax SizeUse Case
PDF Documents.pdf10MBManuals, guides, reports
Word Documents.doc, .docx10MBPolicies, procedures
Text Files.txt10MBFAQs, simple content
Markdown Files.md10MBTechnical documentation

Document Upload Process

  1. Prepare Your Documents

    • Ensure files contain relevant business information
    • Remove any sensitive or confidential data
    • Organize content logically with clear headings
  2. Upload Files

    • Click Upload Knowledge Documents
    • Select multiple files (up to 10MB each)
    • Wait for upload completion
  3. Document Processing

    • System automatically extracts text content
    • Documents are indexed for vector search
    • Processing status shows as "Sync Status"

Add Snippets and Articles

When you don't have a file or a URL, type the content directly.

  • Snippets — a short block of text. Give it a title and a body. Ideal for FAQs and quick facts.

Add snippet / article form

  1. Open the Knowledge tab → Snippets
  2. Click Add
  3. Fill in the title and body
  4. Click Save

The text is indexed immediately and becomes available to the assistant once its status shows Completed.


Content Types for Knowledge Base

Content TypePurposeExamples
FAQsCommon questions and answersProduct questions, troubleshooting
Product InformationDetailed descriptionsFeatures, specifications, pricing
Process DocumentationStep-by-step guidesInstallation, setup procedures
Company PoliciesTerms and proceduresSupport policies, return procedures
Contact InformationSupport channelsPhone numbers, email addresses

Synchronization Notice

After adding a source, the system processes it through a queue job for AI analysis and indexing. The synchronization time depends on:

  • Content Length: Sources with more text take longer to process
  • Source Type: Websites with many pages take longer than a single snippet
  • Queue Load: Processing time may vary based on system queue

Expected Processing Time: 2-10 minutes per document or page

Please wait for the status to show Completed (or "Fully Synced" for documents) before testing your AI Assistant. You can monitor progress in the Knowledge tab.

Step 4: Monitor Assistant Status

AI Assistant Dashboard - Processing State

AI Assistant Processing

The dashboard shows your assistant with initial processing status:

Status Indicators

StatusDescriptionAction Required
Sync Status: ProcessingDocuments being indexedWait for completion
Sync Status: 100%All documents processedReady for use
AI Assistant: ReadyAssistant created successfullyCan start chatting
Knowledge Base: SyncedVector store readyFully operational

Assistant Integration Dashboard

Once processing is complete, the dashboard shows:

AI Assistant Ready

ComponentPurposeStatus Indicator
Total DocumentsNumber of uploaded filesShows count
Sync ProgressDocument processing statusPercentage complete
Overall StatusSystem readiness"Fully Synced" when ready
Assistant IDUnique identifierFor API integration
Vector StoreDocument search systemSearch functionality status

Step 5: Test Your AI Assistant

AI Integration Details

Click on the assistant card to view comprehensive status information:

Integration Details

Chat Interface Testing

The chat interface provides several testing capabilities:

FeatureDescriptionBenefits
Real-time MessagingInstant responsesTest conversation flow
Knowledge Base SidebarUploaded documents displayVerify document access
Document StatusSync indicatorsConfirm processing complete
Chat HistoryComplete logsReview conversation quality

Integration Details

Testing Scenarios

Test TypeExample QueryExpected Response
FAQ Questions"What are your business hours?"Accurate info from uploaded docs
Product Inquiries"Tell me about your premium plan"Detailed product information
Process Questions"How do I reset my password?"Step-by-step instructions
General Support"I need help with billing"Relevant guidance or handoff

Step 6: Integrate with Bot Flows

Message Bot Integration

Integration Details

To use your AI Assistant in automated conversations:

Bot Flow Builder Integration

ComponentFunctionConfiguration
Text MessageSimple responsesBasic text replies
Button MessageInteractive optionsQuick response buttons
List MessageMenu selectionsStructured choices
AI Personal AssistantSmart responsesConnect to your assistant

Flow Configuration Parameters

SettingOptionsDescription
Contact TypeLead, Customer, ProspectTarget audience
Trigger Type"on exact match"Activation method
KeywordsCustom keywordsTrigger words/phrases
Assistant SelectionYour created assistantsChoose AI to use

Message Bot Integration

Example Bot Flow Setup

  1. Start Trigger

    • Contact Type: Lead
    • Trigger: "help", "support", "question"
  2. AI Assistant Node

    • Select: SmartFlow AI
    • Configure response parameters
    • Set fallback options

Reply Duration v1.1.0

When you attach an AI Personal Assistant in either a Bot Flow or a Message Bot, you can now set a Reply Duration — the length of time the AI keeps replying to a particular chat. Once this window passes, the AI automatically stops responding to that conversation and hands the chat off to a human agent. You can also choose Always On, which lets the AI keep replying indefinitely with no automatic handoff.

Reply Duration field on the AI Personal Assistant

How to Configure

  1. Add the AI Personal Assistant node (Bot Flow) or select the Personal Assistant option (Message Bot)
  2. Locate the Reply Duration field
  3. Choose how long the AI should keep replying:
    • Enable Always On to let the AI reply indefinitely, or
    • Enter a number and choose a unit (minutes or hours) for a fixed window
  4. Save the flow or bot

How It Works

OptionDescription
Always OnThe AI keeps replying to the chat indefinitely. The conversation is never auto-handed off.
NumberThe amount of time the AI should keep answering this chat (when Always On is off)
UnitThe time unit for that number — minutes or hours
  • The timer starts when the AI first begins replying to a contact.
  • While the duration is active, the AI answers messages from that contact as normal.
  • When the duration elapses, the AI stops replying to that specific chat and the conversation is handed over to a human agent so support can continue seamlessly.
  • With Always On enabled, there is no timer — the AI continues to handle the chat until you intervene manually.

Per-Chat Behaviour

Reply Duration applies per conversation. When a fixed window expires, only that contact's chat is handed off — other active chats continue to be served by the AI based on their own timers (or stay active if set to Always On).

Step 7: AI Reply Controls & Working Hours v1.1.0

Beyond Reply Duration, two settings let you control when and how often the AI responds.

Out of Knowledge Base Reply Limit

This setting caps how many times the AI will reply to questions that fall outside its uploaded knowledge base before it automatically stops responding.

Out of knowledge base reply limit setting

What Counts as "Out of Knowledge Base"

  • Any question the AI cannot answer from the uploaded documents
  • General conversational messages such as "Hi", "Hello", "How are you?", "Thanks", etc.

Greetings Count Toward the Limit

Generic greetings and small-talk — like "hi", "hello", or "thanks" — are counted as out-of-knowledge-base replies. Account for these when setting your limit so the AI does not stop too early in a conversation.

How to Configure

  1. Go to Settings → AI Assistant Settings
  2. Find the Out of Knowledge Base Reply Limit field
  3. Enter the maximum number of out-of-knowledge-base replies allowed (e.g., 5)
  4. Click Save Changes

Once the limit is hit for a contact, the AI stops replying for that conversation, preventing it from consuming tokens on irrelevant or off-topic exchanges indefinitely.

Setting a Good Limit

A value of 5–10 is a reasonable starting point for most use cases.

Working Hours AI Control

Inside Working Days Settings, two independent switches control when the AI is active:

SwitchDescription
Enable AI during working hoursWhen ON, the AI responds to messages received during your configured working hours.
Enable AI outside working hoursWhen ON, the AI responds to messages received outside your configured working hours.

You can enable one, both, or neither switch depending on your support model.

Working hours AI enable switches

Common Configurations

Use CaseDuring Working HoursOutside Working Hours
AI handles all hoursONON
AI only during business hours (human support after hours)ONOFF
AI only after hours (human team handles daytime)OFFON
AI fully pausedOFFOFF

Bot Flow Must Match Working Hours

If you trigger the AI through a Bot Flow, the bot flow's own working-hours schedule must align with the AI's working-hours setting. For example, if the AI is enabled only during working hours but the bot flow runs outside working hours, the AI node will not trigger. Always keep the two consistent.

Best Practices

Content Preparation

PracticeDescriptionBenefit
Clear StructureUse headings and sectionsBetter AI understanding
Current InformationRegular content updatesAccurate responses
Simple LanguageAvoid jargonImproved comprehension
Specific ExamplesInclude real scenariosBetter context

Response Quality

FactorBest PracticeImpact
ConsistencyMaintain same toneProfessional image
AccuracyVerify informationUser trust
CompletenessProvide sufficient detailUser satisfaction
RelevanceAddress actual questionEfficiency

Troubleshooting

Common Issues

IssueSymptomsSolution
Documents Not ProcessingSync status stuckCheck file formats and size
Poor Response QualityIrrelevant answersUpdate system instructions
Assistant Not RespondingNo AI responsesVerify OpenAI API key
Knowledge Base EmptyNo document accessRe-upload and wait for sync

Error Messages

ErrorMeaningResolution
"Knowledge Base Pending"Documents still processingWait for completion
"API Key Invalid"OpenAI key issueCheck API key in settings
Model Not AvailableSelected model unavailableChoose different model
Upload FailedFile upload errorCheck file size and format

Next Steps

Once your AI Assistant is created and tested:

  1. Deploy in Chat Flows - Integrate with your bot builder
  2. Monitor Performance - Track user interactions and satisfaction
  3. Continuous Improvement - Regular updates and optimizations
  4. Scale Usage - Expand to additional use cases

Need Help?

For assistance with AI Assistant creation:

© 2024 - Corbital Technologies. All rights reserved.