Default Insurance Chatbot (Rosalind)
Get started instantly with Rhesis AI by exploring our pre-configured insurance chatbot, Rosalind. Available to all new users during onboarding, this demo endpoint lets you experience the platform’s capabilities without any setup.
What is Rosalind? Rosalind is a pre-configured insurance expert chatbot powered by Google’s Gemini AI. She provides instant answers to insurance questions, demonstrating how Rhesis AI can power intelligent conversational applications.
Why a Default Chatbot?
The default insurance chatbot eliminates onboarding friction by providing:
- Instant Access: Start exploring Rhesis capabilities immediately upon signup
- Zero Configuration: No API keys, endpoints, or setup required
- Real-World Example: See how Rhesis handles domain-specific AI interactions
- Quick Proof-of-Concept: Test platform functionality before committing to custom configuration
- Learning Resource: Understand best practices through a working implementation
API Endpoints
The chatbot service provides several endpoints for interaction and monitoring:
Built-in echo use case (v0.6.12+)
The chatbot now includes a built-in echo use case:
- Returns the input message verbatim
- Skips LLM invocation completely
- Is exempt from chatbot rate limits
This is useful for connector smoke tests, pipeline checks, and request-mapping validation.
Chat Endpoint
POST /chat
The primary interaction endpoint for conversing with Rosalind. Requires bearer token authentication if CHATBOT_API_KEY is configured.
Headers:
Content-Type: application/json
Authorization: Bearer <your-api-key> # Required if authentication is enabledResponse:
Parameters:
message(string, required): Your question or message to Rosalindsession_id(string, optional): UUID for conversation continuity. If omitted, a new session is createduse_case(string, optional): The domain context. Defaults to “travel”
Health Check Endpoint
GET /health
Monitor service availability and status.
API Information Endpoint
GET /
Get information about available endpoints and rate limits.
Without authentication configured:
With authentication configured:
Session Management
GET /sessions/{session_id}
Retrieve conversation history for a specific session.
DELETE /sessions/{session_id}
Delete a conversation session and its history.
Parameter Awareness
The default chatbot is a parameter-aware endpoint. It uses Parameters & Experiments to manage its system prompt, use case, model, temperature, and output mode.
In the Streamlit UI, you will see an Experiment Pill indicating which experiment and version is currently live (and which label was used to fetch it). This allows you to explore the parameter management workflow immediately: simply create a new experiment in the project, promote it to the default label, and watch the chatbot pick up the new behavior after the next TTL cache refresh.
During test execution, Rhesis resolves the selected experiment once and exposes
its values to the endpoint request mapping as params. The chatbot endpoint
maps those values into the HTTP request body as explicit fields; it does not
receive a nested parameters object.
For the general params request-mapping behavior, see
Using Experiment Parameters.
Authentication
The chatbot supports bearer token authentication for secure access. The authentication mode is automatically configured based on environment settings (see Deployment Modes for details):
Authentication Requirements
- Optional by Default: If
CHATBOT_API_KEYis not configured, no authentication is required (Public Access mode) - Bearer Token: When
CHATBOT_API_KEYis configured, all chat and session endpoints require a valid bearer token (Authenticated Access mode) - Public Endpoints:
/health,/, and/use-casesare always accessible without authentication in both modes
Using Authentication
Include the bearer token in the Authorization header:
Authorization: Bearer <your-api-key>Authentication Errors
401 Unauthorized - Missing or invalid token:
{
"detail": "Not authenticated. Bearer token required."
}Deployment Modes
The chatbot supports two deployment modes, automatically determined by environment configuration:
Mode 1: Public Access (No API Key)
When CHATBOT_API_KEY is not configured:
- ✅ No authentication required - Direct access for all users
- 📊 Rate limit: 100 requests per day per IP address
- 🎯 Use case: Public demos, evaluation, testing
- 🔧 Backend behavior: Endpoint created without
auth_type, no Authorization header sent
// Endpoint configuration in backend
{
"name": "Insurance Chatbot",
"url": "https://chatbot.rhesis.ai/chat",
"method": "POST",
// No auth_type or auth_token fields
"request_headers": {
"Content-Type": "application/json"
}
}Mode 2: Authenticated Access (With API Key)
When CHATBOT_API_KEY is configured:
- 🔐 Bearer token authentication - Backend uses API key to authenticate
- 📊 Rate limit: 1000 requests per day per user (tracked via X-User-ID)
- 🎯 Use case: Production deployments, per-user quotas, secure access
- 🔧 Backend behavior: Endpoint created with
auth_type="bearer_token", Authorization header automatically injected
// Endpoint configuration in backend
{
"name": "Insurance Chatbot",
"url": "https://chatbot.rhesis.ai/chat",
"method": "POST",
"auth_type": "bearer_token",
"auth_token": "<CHATBOT_API_KEY>", // Loaded from environment
"request_headers": {
"Content-Type": "application/json"
// Authorization, X-User-ID, X-Organization-ID automatically injected by backend
}
}Automatic Configuration: The backend automatically detects which mode to
use during initial data load. If CHATBOT_API_KEY environment variable is
present, authenticated mode is enabled. If missing, public access mode is
used. Both modes work seamlessly—no endpoint failures!
Rate Limiting
The chatbot implements dual-tier rate limiting based on deployment mode:
Public Access Rate Limits
- 100 requests per day per IP address
- Rate limit resets every day at midnight UTC
- No authentication required
- Tracked via
X-Forwarded-Foror client IP
Authenticated Access Rate Limits
- 1000 requests per day per user (identified by X-User-ID header)
- Rate limit resets every day at midnight UTC
- Bearer token authentication required
- Fair usage across all users in organization
- Rate limit is configurable by administrators via
CHATBOT_RATE_LIMITenvironment variable
Rate Limit Headers
All responses include rate limit information in headers:
X-RateLimit-Limit: Maximum requests allowed in the time windowX-RateLimit-Remaining: Number of requests remainingX-RateLimit-Reset: Timestamp when the rate limit resets
When rate limits are exceeded, the API returns a 429 Too Many Requests status code with a Retry-After header indicating when to retry.
Example Usage
Python Example
JavaScript Example
cURL Example
Best Practices
Session Management
- Reuse session IDs for multi-turn conversations to maintain context
- Store session IDs on the client side for conversation continuity
- Delete sessions when conversations end to keep memory usage optimal
Error Handling
- Handle rate limits gracefully by implementing exponential backoff
- Check response status codes before parsing JSON
- Display user-friendly messages when errors occur
Performance
- Keep messages concise for faster responses (under 500 words recommended)
- Avoid rapid-fire requests to prevent rate limiting
- Cache session IDs instead of creating new sessions for each message
Limitations
The default insurance chatbot is designed for evaluation and onboarding purposes. Please note the following limitations:
- Domain-Specific: Rosalind is trained for insurance questions only and may decline off-topic queries
- Rate Limited: Usage is restricted to prevent abuse and ensure availability
- No Persistence: Session data is stored in memory and may be cleared during deployments
- No SLA: This is a demo service without uptime guarantees
- English Only: Currently supports English language interactions only
Moving to Production
Once you’ve explored Rosalind and understand the platform, you’ll want to create your own custom endpoints:
- Configure Your Own Endpoint: Set up endpoints pointing to your AI services
- Integrate Your API Keys: Use your own LLM provider credentials
- Customize System Prompts: Tailor the AI behavior to your specific use case
- Set Up Testing: Create test sets to validate your endpoint performance
- Monitor Metrics: Track quality, latency, and other key performance indicators
Learn more about creating custom endpoints in the Endpoints documentation.
Troubleshooting
429 Rate Limit Exceeded
Problem: Receiving “429 Too Many Requests” responses.
Solution: Wait for the rate limit window to reset (shown in Retry-After header) or sign in for higher limits.
Session Not Found
Problem: GET /sessions/{session_id} returns 404.
Solution: The session may have expired or been cleared. Start a new conversation without a session_id.
Slow Response Times
Problem: Chat responses take longer than expected.
Solution: This is a shared demo service. For production use cases with guaranteed performance, configure your own endpoints.
Off-Topic Responses
Problem: Rosalind declines to answer your question.
Solution: Ensure your question is related to insurance. For other domains, configure custom endpoints with appropriate system prompts.
Next Steps - Try the interactive demo to chat with Rosalind in your browser - Learn about custom endpoints for your own AI services - Explore test generation to validate your AI applications
- Set up metrics to measure response quality