Skip to main content

Multi-Model Setup

Msghub supports three AI models: Claude (Anthropic), GPT-4 (OpenAI), and Gemini (Google). Choose the model that fits your needs, and switch anytime with no vendor lock-in.

Available Models

Claude (Anthropic)

Best for: Nuanced conversations, complex reasoning, safety-conscious applications

Strengths:

  • Excellent at understanding context
  • Great for complex reasoning
  • Strong safety and alignment
  • Good at following instructions

Weaknesses:

  • Slightly slower than GPT-4
  • Moderate cost

Use cases:

  • Customer support with nuanced issues
  • Legal or compliance-related queries
  • Complex problem-solving

GPT-4 (OpenAI)

Best for: General-purpose, versatile, state-of-the-art performance

Strengths:

  • State-of-the-art performance
  • Excellent at all tasks
  • Fast response time
  • Great for creative tasks

Weaknesses:

  • Higher cost than Gemini
  • Requires OpenAI API key

Use cases:

  • General customer support
  • Product recommendations
  • Content generation
  • Complex queries

Gemini (Google)

Best for: Cost-effective, fast, reliable

Strengths:

  • Most cost-effective
  • Very fast response time
  • Reliable and stable
  • Good for most tasks

Weaknesses:

  • Slightly less advanced than GPT-4
  • Requires Google API key

Use cases:

  • High-volume customer support
  • Quick responses needed
  • Cost-sensitive applications

Model Comparison

FeatureClaudeGPT-4Gemini
PerformanceExcellentExcellentGood
SpeedFastFastVery Fast
CostModerateModerate-HighLow
Context Window100K tokens8K-32K tokens32K tokens
SafetyExcellentGoodGood
ReasoningExcellentExcellentGood
CreativityGoodExcellentGood

Setup

Choose Your Model

  1. Go Settings → AI Chatbot → Model
  2. Select your preferred model:
    • Claude
    • GPT-4
    • Gemini
  3. Click Save

Add API Keys

Each model requires an API key from the provider.

Claude (Anthropic)

  1. Go to console.anthropic.com
  2. Create an account
  3. Generate an API key
  4. Go Settings → AI Chatbot → API Keys
  5. Paste your Claude API key
  6. Click Save

GPT-4 (OpenAI)

  1. Go to platform.openai.com
  2. Create an account
  3. Generate an API key
  4. Go Settings → AI Chatbot → API Keys
  5. Paste your OpenAI API key
  6. Click Save

Gemini (Google)

  1. Go to makersuite.google.com
  2. Create an account
  3. Generate an API key
  4. Go Settings → AI Chatbot → API Keys
  5. Paste your Google API key
  6. Click Save

Switch Models

You can switch models anytime:

  1. Go Settings → AI Chatbot → Model
  2. Select a different model
  3. Click Save

The chatbot will immediately start using the new model. No downtime, no data loss.

Model-Specific Configuration

Claude Configuration

{
"model": "claude",
"temperature": 0.7,
"maxTokens": 1000,
"topP": 1.0
}

Temperature: Controls randomness (0-1)

  • 0 = Deterministic, consistent
  • 0.7 = Balanced (recommended)
  • 1 = Creative, varied

GPT-4 Configuration

{
"model": "gpt-4",
"temperature": 0.7,
"maxTokens": 1000,
"topP": 1.0,
"frequencyPenalty": 0,
"presencePenalty": 0
}

Frequency Penalty: Reduces repetition (0-2)

  • 0 = No penalty
  • 1 = Moderate penalty
  • 2 = Strong penalty

Presence Penalty: Encourages new topics (0-2)

  • 0 = No penalty
  • 1 = Moderate penalty
  • 2 = Strong penalty

Gemini Configuration

{
"model": "gemini",
"temperature": 0.7,
"maxTokens": 1000,
"topP": 0.95,
"topK": 40
}

Top K: Limits to top K most likely tokens

  • 40 = Default (recommended)
  • Lower = More focused
  • Higher = More diverse

Cost Comparison

Claude

  • Input: $0.003 per 1K tokens
  • Output: $0.015 per 1K tokens

Example: 1,000 customer conversations, 500 tokens each

  • Input: 500,000 tokens × $0.003 = $1.50
  • Output: 500,000 tokens × $0.015 = $7.50
  • Total: $9.00

GPT-4

  • Input: $0.03 per 1K tokens
  • Output: $0.06 per 1K tokens

Example: 1,000 customer conversations, 500 tokens each

  • Input: 500,000 tokens × $0.03 = $15.00
  • Output: 500,000 tokens × $0.06 = $30.00
  • Total: $45.00

Gemini

  • Input: $0.0005 per 1K tokens
  • Output: $0.0015 per 1K tokens

Example: 1,000 customer conversations, 500 tokens each

  • Input: 500,000 tokens × $0.0005 = $0.25
  • Output: 500,000 tokens × $0.0015 = $0.75
  • Total: $1.00

Model Performance Comparison

Customer Support Query

Query: "I ordered a laptop 5 days ago and it hasn't arrived yet. The tracking says it's in transit. When will it arrive?"

Claude Response: "I found your order! Your laptop is currently in transit with our carrier. Based on the tracking information, it should arrive within the next 2-3 business days. You'll receive a notification when it's out for delivery. Is there anything else I can help with?"

GPT-4 Response: "Your laptop is on its way! According to the tracking information, it's currently in transit and should arrive within 2-3 business days. You'll get a notification when it's out for delivery. If you have any other questions, feel free to ask!"

Gemini Response: "Your order is in transit and should arrive in 2-3 business days. You'll be notified when it's out for delivery."

Complex Query

Query: "I want to return my laptop because it's too slow. I've had it for 20 days. Can I return it? What about the restocking fee?"

Claude Response: "Great news! You're within our 30-day return window, so you can definitely return your laptop. Since you've had it for 20 days, you're still eligible for a full refund with no restocking fee. Here's what to do:

  1. Log in to your account
  2. Go to 'My Orders'
  3. Click 'Return' on your laptop order
  4. We'll email you a prepaid shipping label
  5. Pack it up and drop it off
  6. Your refund will be processed within 5 business days

Is there anything else I can help with?"

GPT-4 Response: "You're within our 30-day return window, so you can return your laptop for a full refund with no restocking fee. Here's how:

  1. Log in and go to 'My Orders'
  2. Click 'Return' on your order
  3. Print the prepaid shipping label
  4. Ship it back
  5. Get your refund in 5 business days

Let me know if you need anything else!"

Gemini Response: "You can return your laptop within 30 days for a full refund. No restocking fee. Go to 'My Orders' and click 'Return' to get started."

Choosing the Right Model

Choose Claude if:

  • You need nuanced, context-aware responses
  • You handle complex customer issues
  • Safety and alignment are priorities
  • You want excellent reasoning

Choose GPT-4 if:

  • You want state-of-the-art performance
  • You handle diverse customer queries
  • You need creative responses
  • You want the best overall performance

Choose Gemini if:

  • You want the lowest cost
  • You need fast response times
  • You handle high-volume queries
  • You want reliable, consistent performance

A/B Testing Models

Test different models to see which works best:

  1. Go Settings → AI Chatbot → A/B Testing
  2. Enable A/B testing
  3. Select two models to test
  4. Set test duration (e.g., 1 week)
  5. Msghub will split traffic 50/50
  6. After test, compare metrics:
    • Resolution rate
    • Customer satisfaction
    • Response time
    • Cost

Monitor Model Performance

Metrics

  1. Go Analytics → AI Chatbot
  2. See:
    • Resolution Rate — % of conversations resolved by chatbot
    • Escalation Rate — % escalated to human agents
    • Response Time — Average response time
    • Customer Satisfaction — Rating from customers
    • Cost — Cost per conversation

Optimize

  • Low resolution rate? → Improve knowledge base or switch model
  • High cost? → Switch to Gemini
  • Slow response? → Switch to Gemini
  • Low satisfaction? → Switch to Claude or GPT-4

No Vendor Lock-In

You're not locked into any model:

  • Switch anytime — Change models with one click
  • Keep your data — All conversations and knowledge base stay with you
  • No migration needed — Instant switch, no downtime
  • Bring your own keys — Use your own API keys

Troubleshooting

Model not responding

  1. Check API key — Is it valid?
  2. Check quota — Have you exceeded your API quota?
  3. Check internet — Is there a connectivity issue?
  4. Try another model — Switch to a different model

Poor response quality

  1. Check knowledge base — Does it have good answers?
  2. Try another model — Different models excel at different tasks
  3. Adjust temperature — Lower = more consistent, Higher = more creative
  4. Review conversations — What's the chatbot struggling with?

High cost

  1. Switch to Gemini — Most cost-effective option
  2. Optimize prompts — Shorter prompts = lower cost
  3. Limit context — Use only relevant knowledge base articles
  4. Monitor usage — Track conversations and tokens

See Also