AI Assistant
The AI assistant enhances the search experience with guided filters, query suggestions, and intent analysis.
Activation
NeuroonWidget.init({
container: '#neuroon-search',
token: 'YOUR_TOKEN',
features: {
aiAssistant: true, // Disabled by default
},
});
The AI assistant is available on Growth plans and above. Contact support to activate it.
Features
1. Guided Filters
The assistant analyzes the search and automatically suggests relevant filters:
Search: "cheap nike running shoes"
Suggested filters:
✓ Category: Running (confidence: 95%)
✓ Brand: Nike (confidence: 98%)
✓ Price: < $100 (confidence: 75%)
Filters appear in a special panel in the widget interface, allowing users to apply them with a single click.
2. Confidence Indicator
Each filter includes a visual confidence level (0-100%):
| Range | Visual | Meaning |
|---|---|---|
| 90-100% | Green | Very sure |
| 70-89% | Yellow | Likely |
| 50-69% | Orange | Possible |
| <50% | Gray | Uncertain |
3. Query Suggestions
If the search is ambiguous, the assistant suggests alternatives:
Search: "sneakers"
Suggestions:
→ "running shoes" (35% of users)
→ "casual sneakers" (28% of users)
→ "basketball shoes" (15% of users)
4. Intent Analysis
The assistant detects user intent:
| Intent | Example | Action |
|---|---|---|
browse | "see shoes" | Show category |
specific | "Nike Air Max 90" | Exact search |
compare | "difference between X and Y" | Suggest comparison |
price | "under $50" | Apply price filter |
feature | "waterproof" | Filter by feature |
User Interface
Guided Filters Panel
When the assistant detects relevant filters, a special panel appears:
┌─────────────────────────────────────────┐
│ ✨ Suggested filters │
├─────────────────────────────────────────┤
│ ○ Nike [95%] ────────── │
│ ○ Running [90%] ───────── │
│ ○ < $100 [75%] ─────── │
│ │
│ [Apply all] [Ignore] │
└─────────────────────────────────────────┘
Refined Query
If the assistant detects a better way to search:
┌─────────────────────────────────────────┐
│ 💡 Did you mean: "trail running shoes"? │
│ [Yes, search] [No, keep] │
└─────────────────────────────────────────┘
Responding to Searches
To execute logic when the user searches, use the onSearch callback:
NeuroonWidget.init({
features: {
aiAssistant: true,
},
callbacks: {
onSearch: (query) => {
console.log('User searched:', query);
// Analytics
gtag('event', 'search', {
search_term: query,
});
},
onFilterChange: (filters) => {
console.log('Filters changed:', filters);
// Fires when user applies suggested filters
},
},
});
Callbacks are the only way to respond to widget events. See the callbacks documentation for all available options.
Customization
Translations
NeuroonWidget.init({
translations: {
ai: {
thinking: 'Analyzing...',
analyzing: 'Analyzing your search...',
suggestion: 'Suggestion',
confidence: 'Confidence: {percent}%',
refinedQuery: 'Did you mean: {query}?',
guidedFilters: 'Suggested filters',
applyAll: 'Apply all',
ignore: 'Ignore',
yes: 'Yes',
no: 'No',
},
},
});
Styles
.neuroon-widget {
/* Confidence indicator color */
--nrn-confidence-high: 16 185 129; /* Green */
--nrn-confidence-medium: 245 158 11; /* Amber */
--nrn-confidence-low: 148 163 184; /* Gray */
/* Suggestions panel */
--nrn-suggestion-bg: 30 41 59;
--nrn-suggestion-border: 168 85 247; /* Purple */
}
Advanced Configuration
Confidence Threshold
Configure minimum threshold to show suggestions:
NeuroonWidget.init({
features: {
aiAssistant: true,
},
ai: {
minConfidence: 0.6, // Minimum 60% to show
autoApplyThreshold: 0.9, // Auto-apply if > 90%
maxSuggestions: 3, // Maximum 3 query suggestions
},
});
Disable Specific Features
NeuroonWidget.init({
features: {
aiAssistant: true,
},
ai: {
filters: true, // Guided filters
suggestions: true, // Query suggestions
refinedQuery: false, // Disable refined query
intentDetection: true, // Intent detection
},
});
Performance
AI analysis adds ~50-100ms per search. To optimize:
NeuroonWidget.init({
features: {
aiAssistant: true,
},
ai: {
debounce: 300, // Wait 300ms before analyzing
cache: true, // Cache analysis of similar queries
},
});
Next Steps
- Conversational Search - Chat with context
- Product Comparison - AI product analysis
- Callbacks - Respond to widget events