Inspiration
As a developer who worked at an ecommerce startup, I witnessed the same recurring challenges with early businesses. Business owners were constantly stressed and overwhelmed by the never-ending stream of customer inquiries, while potential customers would leave simply because no one was available to answer their questions at 2 AM. I saw critical sales opportunities slip away when simple questions went unanswered, and support teams were drowning in repetitive questions that could easily be automated. Meanwhile, complex customer issues that actually needed human attention were lost in the noise of basic inquiries that any smart system could handle.
What it does
Xavier AI is a sophisticated multi-agent customer support system built on a strategic hybrid Qdrant + TiDB Serverless architecture that orchestrates complex workflows to turn every customer conversation into a business opportunity.
Our TiDB-Powered Multi-Step Agent Workflow:
- 1. Ingest & Index Data:
- Qdrant: Lightning-fast semantic embeddings of company knowledge
- TiDB Serverless: Customer profiles, conversation vectors, and business intelligence in distributed SQL tables with vector capabilities
- 2. Search Your Data:
- Qdrant: Sub-100ms vector similarity search across knowledge base
- TiDB: Hybrid vector + SQL queries joining conversation embeddings with customer context, purchase history, and business rules
- 3. Chain LLM Calls:
- Multiple AI models analyze results from both databases
- TiDB stores analysis results for business intelligence and pattern recognition
- Intent → Sentiment → Sales Detection → Response Strategy chain
- 4. Invoke External Tools:
- TiDB ACID transactions for lead scoring updates based on AI analysis
- Payment API integration with transaction-safe order tracking
- Support ticket creation with complete conversation context in TiDB
- Real-time analytics updates in TiDB for dashboard insights
- 5. Build Multi-Step Flow:
- TiDB orchestrates final actions with transaction safety
- Customer journey mapping across multiple conversation touchpoints
- Auto-scaling analytics processing with TiDB Serverless
- Business rule execution with SQL logic and vector context
How we built it
Strategic Hybrid Architecture: Specialized Databases Working Together
- TiDB Serverless as Business Intelligence Engine:
- Vector storage with SQL joins: Customer conversation embeddings stored in TiDB's conversation_vectors table, joined with customer profiles and lead intelligence
- Transaction-safe lead management: lead_intelligence table with ACID-compliant opportunity scoring and sales pipeline tracking
- Real-time analytics engine: conversation_analytics table aggregating performance metrics, conversion rates, and revenue attribution
- Auto-scaling for conversation spikes: TiDB Serverless handles traffic increases without infrastructure management
- Complex business logic: SQL queries for customer journey analysis, churn prediction, and revenue forecasting
- Qdrant for AI-Optimized Vector Operations:
- Millisecond semantic search across 100K+ document embeddings
- Specialized vector operations for knowledge retrieval
- Optimized for high-frequency AI model queries
- Hybrid Intelligence Orchestration:
- Our agents coordinate sophisticated workflows across both systems: User Message → Parallel Storage (Qdrant + TiDB) → Hybrid Search (Semantic + Business Context) → LLM Analysis Chain → TiDB Business Logic Processing → External Tool Invocation → TiDB Transaction-Safe Action Execution
Example TiDB Query (showcasing hybrid capabilities):
SELECT cv.message_text, cc.customer_tier, li.lead_score, AVG(cv.sentiment_score) as conversation_sentiment
FROM conversation_vectors cv
JOIN customer_context cc ON cv.conversation_id = cc.conversation_id
JOIN lead_intelligence li ON cv.conversation_id = li.conversation_id
WHERE cv.chatbot_id = ? AND cv.contains_buying_signal = true
GROUP BY cv.conversation_id
ORDER BY li.lead_score DESC
This demonstrates TiDB's unique value: combining vector embeddings with traditional business data in a single, scalable system.
Challenges we ran into
TiDB Vector + SQL Hybrid Query Optimization
Combining TiDB's vector search capabilities with complex SQL joins for customer intelligence required sophisticated query planning. We needed to store conversation embeddings in TiDB while maintaining the performance benefits of specialized vector operations in Qdrant.
Solution: Developed a hybrid orchestrator that stores conversation vectors in both systems strategically - TiDB for business joins and analytics, Qdrant for pure semantic speed. This gives us transaction-safe business logic with millisecond semantic search.
Auto-Scaling Multi-Agent State Management
With TiDB Serverless auto-scaling and multiple AI agents processing conversations simultaneously, maintaining consistent state across scaling events required careful transaction design.
Solution: Implemented TiDB's ACID properties for workflow state management, ensuring business data consistency even during auto-scaling events while maintaining optimal AI performance.
Making Conversations Feel Natural
Early Xavier AI felt robotic, and would make customers distrust the system. The breakthrough was realizing great customer service is about making people feel heard, not providing perfect answers. I restructured the response system to acknowledge concerns, ask clarifying questions, and deliver genuinely helpful responses rather than mechanically correct ones.
Balancing Automation with Human Touch
Initially, Xavier AI tried handling everything, frustrating customers when problems exceeded its capabilities. The solution was developing systems that detect not just what customers ask, but how they feel. Xavier AI now recognizes emotional cues frustration, confusion, impatience and escalates to humans when needed.
Optimizing Real-World Performance
Lab performance differs from real-world reliability. Early versions took minutes to respond, which could lead customers to abandon conversations. I restructured the technical architecture with advanced caching, optimized databases, and efficient AI processing. Customer experience trumps technical sophistication smart AI means nothing if customers leave while waiting for responses.
Accomplishments that we're proud of
Production-Ready Hybrid TiDB + Qdrant Architecture
Successfully created the first customer support system that combines TiDB Serverless's auto-scaling SQL capabilities with specialized vector database performance. Our system demonstrates that TiDB can handle both AI workloads and traditional business logic in a single, manageable platform.
Real Business Value with TiDB Analytics
Built comprehensive customer journey tracking using TiDB's analytical capabilities - from conversation sentiment analysis to revenue attribution. Our TiDB-powered analytics show real business impact: lead conversion rates, customer satisfaction trends, and predictive revenue forecasting.
Scalable Agent Architecture on TiDB Serverless
Proved that sophisticated multi-step AI agents can run cost-effectively using TiDB Serverless auto-scaling. Our system handles conversation spikes automatically while maintaining complex business rules and transaction safety - something traditional databases can't match.
What we learned
We learned that exceptional customer support isn't just about answering questions correctly it's about building trust through consistent, helpful interactions. The speed and quality of responses shape customers' entire perception of a business. This insight drove me to focus on making Xavier AI's responses feel genuinely helpful rather than mechanically correct.
What's next for Xavier AI
I'm seeking early customers who want priority access to new features, input on development, and special pricing. Next up: expansion to Facebook Messenger, Instagram, Twitter, and LinkedIn for consistent support across all channels. Then Voice interactions are also going to be added, letting customers speak directly with Xavier AI over phone calls.
Frontend code: link
Backend code: link
Built With
- angular.js
- anthropic
- docker
- flask
- flutterwave
- nltk
- openai
- paypal
- postgresql
- pusher
- python
- qdrant
- railway
- redis
- tidb
- typescript
- websocket
Log in or sign up for Devpost to join the conversation.