Skip to main content
Glama

E-commerce Local MCP Server

README.md4.66 kB
# AI-Powered Intent Classification System ## 📋 Overview This documentation covers the implementation of a production-grade AI-powered intent classification system for e-commerce applications. The system replaces manual regex patterns with intelligent AI models to accurately classify user queries into business intents. ## 🎯 Problem Statement ### Current Issues with Regex-Based Classification - **Limited Coverage**: Manual patterns can't handle language variations - **Maintenance Nightmare**: Adding new patterns for every query type - **Poor Scalability**: Doesn't adapt to user language evolution - **Low Accuracy**: 60-70% classification accuracy ### Example Failing Cases ``` Query: "provide me the five products list" Current: general_inquiry ❌ Expected: inventory_inquiry ✅ Query: "show me my top selling items" Current: general_inquiry ❌ Expected: analytics_inquiry ✅ ``` ## 🚀 Solution Architecture ### Hybrid AI Classification System ``` User Query → Cache Check → SetFit Model → Confidence Check → Fallback → Result ↓ ↓ ↓ ↓ ↓ ↓ "show products" → Miss → inventory_inquiry → 0.95 → [Skip] → inventory_inquiry ``` ## 📊 Performance Targets | Metric | Current (Regex) | Target (AI) | |--------|----------------|-------------| | **Accuracy** | 60-70% | 93-95% | | **Latency** | 0.1ms | <50ms | | **Coverage** | Limited | Comprehensive | | **Maintenance** | High | Low | ## 📁 Documentation Structure ### Core Documents - [**Architecture Guide**](./architecture.md) - System design and components - [**Implementation Guide**](./implementation.md) - Step-by-step implementation - [**Performance Analysis**](./performance.md) - Benchmarks and comparisons - [**Production Deployment**](./deployment.md) - Production guidelines - [**API Reference**](./api-reference.md) - Code examples and interfaces ### Supporting Documents - [**Training Data Guide**](./training-data.md) - How to prepare training data - [**Monitoring Guide**](./monitoring.md) - Production monitoring setup - [**Troubleshooting**](./troubleshooting.md) - Common issues and solutions - [**Migration Guide**](./migration.md) - Migrating from regex patterns ## 🎯 Key Benefits ### ✅ Accuracy Improvements - **93-95% classification accuracy** (vs 60-70% with regex) - **Handles natural language variations** automatically - **Context-aware classification** for ambiguous queries ### ✅ Developer Experience - **No more manual pattern writing** - AI learns from examples - **Easy to add new intents** - just provide training examples - **Self-improving system** - learns from real user queries ### ✅ Production Ready - **Sub-50ms latency** with caching - **99.99% uptime** with fallback systems - **Comprehensive monitoring** and alerting ## 🛠 Quick Start ### Prerequisites ```bash # Required Python packages pip install setfit sentence-transformers torch transformers ``` ### Basic Implementation ```python from src.services.intent_classifier import ProductionIntentClassifier # Initialize classifier classifier = ProductionIntentClassifier() # Classify user query result = classifier.classify("show me my top products") print(f"Intent: {result.intent}") # inventory_inquiry print(f"Confidence: {result.confidence}") # 0.94 print(f"Method: {result.method}") # setfit ``` ## 📈 Expected Results ### Before vs After Comparison ```python # Before (Regex) Query: "give me five products list" Result: general_inquiry (wrong) Time: 0.1ms # After (AI) Query: "give me five products list" Result: inventory_inquiry (correct) Time: 30ms Confidence: 0.94 ``` ## 🎯 Business Impact ### User Experience - **Better query understanding** leads to accurate responses - **Faster resolution** of customer requests - **Reduced frustration** from misunderstood queries ### Operational Benefits - **Reduced manual pattern maintenance** - **Automatic adaptation** to new query types - **Data-driven insights** into user behavior patterns ## 🔗 Quick Navigation | Document | Purpose | Audience | |----------|---------|----------| | [Architecture](./architecture.md) | System design | Technical leads | | [Implementation](./implementation.md) | Code implementation | Developers | | [Deployment](./deployment.md) | Production setup | DevOps | | [Monitoring](./monitoring.md) | System monitoring | SRE/Operations | ## 📞 Support For questions or issues: - Check [Troubleshooting Guide](./troubleshooting.md) - Review [API Reference](./api-reference.md) - Contact the development team --- *Last updated: September 2025* *Version: 1.0*

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AnisurRahman06046/mcptestwithmodel'

If you have feedback or need assistance with the MCP directory API, please join our Discord server