Understanding Agents
Learn how AlonChat agents work and how to optimize them for accurate, fast responses.
Understanding Agents#
Learn how AlonChat agents work and how to optimize them for your use case.
How Agents Work#
When a customer asks your agent a question, here is what happens:
- The question is analyzed -- AlonChat determines what the customer is asking about (pricing, scheduling, general info, etc.)
- Relevant knowledge is retrieved -- The system searches your sources using AI-powered search to find the most relevant content
- A response is generated -- Your selected AI model uses the retrieved knowledge to craft an accurate, contextual answer
This approach ensures your agent:
- Answers accurately using YOUR knowledge, not generic AI knowledge
- Stays on-topic and relevant to your business
- Handles complex, multi-part questions
- Cites specific information from your sources
Sources#
What are Sources?#
Your agent's sources are everything you teach it. You add content, the platform processes and indexes it, and your agent draws from it when answering questions.
You can add knowledge from many source types:
- Files -- PDF, Word, Excel, CSV documents
- Text -- Paste content directly (policies, FAQs, product info)
- Q&A Pairs -- Specific questions with exact answers
- Websites -- Automatically crawl and extract page content
- Google Drive -- Sync documents automatically
- Facebook/Instagram -- Import conversation history to learn your communication style
- Structured Data -- Product catalogs, services, and pricing from Google Sheets
- Time-Sensitive Content -- Promos, events, and announcements with expiration dates
How Knowledge is Organized#
AlonChat organizes your knowledge into five categories for intelligent retrieval:
| Category | What It Contains | Source Types |
|---|---|---|
| Documents | General content from files, text, and websites | PDF, Word, Excel, CSV, websites, text, Google Drive |
| Q&A | Explicit question-answer pairs with exact answers | Q&A pairs you create (these get priority for matching questions) |
| Structured Data | Organized records like products and services | Product catalogs, services, pricing from Google Sheets |
| Time-Sensitive | Content that expires | Promos, events, announcements with dates |
| Communication Style | Your brand's conversation patterns | Imported Facebook/Instagram conversations |
The system automatically determines which categories are most relevant to each question. For example, a pricing question pulls from structured data and documents, while a "do you have a promo?" question checks time-sensitive content first.
Source Priority#
You can set priority levels on individual sources to influence how prominently they appear in responses:
- High Priority -- Critical information (pricing, legal, policies) -- most likely to be retrieved
- Normal Priority -- Standard information -- balanced retrieval
- Low Priority -- Background context (archived docs, conversation history) -- retrieved only when highly relevant
How to set priority: Go to Sources, open a source, click Edit, and set the priority level. Use the Is Price toggle for pricing information to automatically boost its priority.
AI Model Selection#
AlonChat supports multiple AI providers. Models and credit costs are managed from your dashboard.
Model Tiers#
| Tier | Credits per Message | Response Speed | Best For |
|---|---|---|---|
| Budget | 1 | Fast (~1-2 seconds) | High volume, simple queries, FAQ bots |
| Mid-tier | 5 | Balanced (~2-3 seconds) | General use, good quality |
| Premium | 10-15 | Moderate (~3-5 seconds) | Complex conversations, nuanced responses |
| Top-tier | 25 | Slower (~3-5 seconds) | Highest quality, detailed reasoning |
Recommendation: Start with a budget model (1 credit). It handles most use cases well. Upgrade to premium only when you need better handling of complex or nuanced conversations.
Temperature Settings#
Temperature controls how creative vs. consistent your agent's responses are (scale: 0.0 to 1.0):
- 0.0-0.2 -- Deterministic and consistent. Same question produces nearly identical answers every time. Best for: customer support, FAQ bots, factual Q&A.
- 0.3-0.5 -- Slightly varied. Similar but not identical answers. Best for: general chatbots, conversational agents.
- 0.6-0.8 -- Creative and diverse. Noticeably different answers each time. Best for: brainstorming, creative tasks.
- 0.9-1.0 -- Highly unpredictable. Not recommended for business use as it may produce inaccurate information.
Best practice: Start at 0.2 for factual bots, 0.5 for conversational bots.
System Prompts#
The system prompt defines your agent's personality and behavior. Good prompts are specific, include fallback behavior, and define tone:
Good example:
You are a customer support agent for Acme Corp.
Answer questions about our products using the available sources.
Be friendly, concise, and accurate.
If you don't know the answer, say:
"I don't have that information. Let me connect you with
a human agent: support@acmecorp.com"
Tips for effective system prompts:
- Be specific about the agent's role and your company name
- Define how the agent should handle questions it cannot answer
- Set the tone (formal, casual, friendly) and language preferences
- Keep it focused -- overly long prompts can reduce response quality
Context Window#
The context window controls how many previous messages your agent remembers during a conversation:
- Small (5 messages) -- Fast, low cost, but the agent forgets earlier parts of the conversation quickly
- Medium (10 messages) -- Balanced, recommended for most use cases
- Large (20+ messages) -- Remembers more, useful for complex multi-step conversations like appointment scheduling
When to increase context: Long conversations, multi-step workflows (e.g., booking appointments), or when users frequently reference earlier messages.
When to decrease context: Simple FAQ bots, one-off questions, or when managing credit usage.
Performance Tips#
Improving Response Accuracy#
If your agent gives incorrect or incomplete answers:
- Add more specific content -- Do your sources actually contain the answer? Add it if not.
- Use Q&A pairs for common questions -- Q&A sources are prioritized when a question closely matches. Add explicit pairs for your most-asked questions.
- Set source priorities -- Mark critical information (pricing, policies, legal) as high priority.
- Lower temperature -- Try 0.1-0.2 for maximum consistency and factual accuracy.
- Review and refine your system prompt -- Clear, specific instructions lead to better responses.
Improving Response Speed#
If your agent is slow:
- Switch to a budget model -- Budget-tier models respond in 1-2 seconds.
- Reduce the context window -- Fewer messages means faster processing.
- Reduce max tokens -- Shorter responses generate faster.
- Clean up your sources -- Remove duplicate or outdated sources.
Reducing Credit Usage#
If you want to optimize costs:
- Use budget models (1 credit) -- They handle most queries well.
- Reduce context window -- Fewer messages per request means lower usage.
- Reduce max tokens -- Shorter responses cost less.
- Add Q&A pairs -- Direct question-answer matches are efficient to retrieve and produce focused responses.
Best Practices#
Source Management#
- Keep sources organized -- Use clear, descriptive names. Archive outdated sources rather than deleting them.
- Update regularly -- Re-train after adding or updating sources. Review your sources monthly.
- Use the right source type for each kind of content:
- Files for documentation, manuals, catalogs
- Text for quick notes, policies, single-page content
- Q&A for common questions with specific answers
- Website for product pages, blog posts, help centers
- Google Drive for auto-synced documents
- Structured Data for product catalogs, services, pricing
- Time-Sensitive for promos, events, announcements
- Set appropriate priorities -- High for pricing, legal, and critical policies. Normal for general info. Low for archived content.
Agent Configuration#
- Start simple, iterate -- Basic agent first, test, then add complexity.
- Test with real questions -- Use actual customer questions, not made-up ones. Ask colleagues to test.
- Monitor and improve -- Review chat logs regularly. Identify gaps and add sources to cover them.
- Use feedback -- Enable thumbs up/down and review negative feedback to improve.
Common Mistakes#
- Not training after adding sources -- Adding sources does not automatically train the agent. Always click "Train Agent" after changes.
- Using high temperature for factual Q&A -- Factual bots need low temperature (0.0-0.3). High temperature causes inconsistent answers.
- Vague system prompts -- "You are a helpful assistant" is too generic. Be specific about role, tone, and fallback behavior.
- Ignoring source priority -- All sources have equal weight by default. Mark important information as high priority.
- Not testing before deployment -- Always test in the chat playground before connecting to live channels.
- Creating multiple agents for the same purpose -- One agent with comprehensive knowledge is easier to manage and more consistent than multiple specialized agents.