Skip to main content

Conversational Search

The widget supports a conversational search mode that maintains context between successive searches, allowing natural refinement of results.

Activation

Conversational search requires enabling the AI assistant:

NeuroonWidget.init({
container: '#neuroon-search',
token: 'YOUR_TOKEN',
features: {
aiAssistant: true, // Enables conversational mode
},
});
Plan required

The AI assistant is available on Growth plans and above.

How It Works

Session Context

The widget maintains a conversation history during the session:

User: "running shoes"
→ Results: athletic shoes

User: "Nike only"
→ Context: shoes + Nike
→ Results: Nike running shoes

User: "under $100"
→ Context: shoes + Nike + price < $100
→ Refined results

Natural Refinement

The assistant understands contextual references:

  • Pronouns: "Do you have them in red?" → References displayed products
  • Comparatives: "cheaper ones" → Refines price filter
  • Specifications: "from Nike" → Adds brand filter

Chat Interface

The conversational chat is presented as an integrated panel in the widget:

  • Appears when clicking the chat icon
  • Shows conversation history
  • Allows typing natural messages
  • Shows "thinking" indicator while processing

Interface Features

ElementDescription
HistoryLast 10 interactions for relevance
IndicatorShows when assistant is processing
SuggestionsChips with suggested refined queries
ProductsInline results within the chat

Inferred Filters

The assistant analyzes queries and extracts filters automatically:

QueryInferred Filters
"cheap Nike shoes"Brand: Nike, Price: budget
"gaming laptop"Category: gaming
"red dress size M"Color: red, Size: M
"under 50 dollars"Max price: $50

Confidence Indicator

Each response includes a visual confidence level:

RangeVisualMeaning
90-100%GreenClear interpretation
70-89%YellowGood inference
50-69%OrangeMay need confirmation
<50%GrayAmbiguous query

When confidence is high, filters are applied automatically. With low confidence, the assistant asks for clarification.

Session Persistence

History is saved in sessionStorage during the browser session:

  • Restored on page reload
  • Cleared when browser closes

Configure Persistence

NeuroonWidget.init({
features: {
aiAssistant: true,
},
persistence: {
chat: false, // Disable persistence (default: true)
},
});

Responding to Searches

To execute logic when the user searches (including conversational 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,
});
},
},
});
Available Callbacks

Callbacks are the only way to respond to widget events. See the callbacks documentation for all available options.

Customization

Translations

NeuroonWidget.init({
translations: {
chat: {
placeholder: 'What are you looking for?',
send: 'Send',
thinking: 'Thinking...',
newConversation: 'New conversation',
suggestions: 'Suggestions',
},
},
});

Styles

.neuroon-widget {
/* Chat panel */
--nrn-chat-bg: 30 41 59;
--nrn-chat-user-bg: 59 130 246;
--nrn-chat-assistant-bg: 51 65 85;
}

Best Practices

  1. Limited context: History is limited to 10 interactions for relevance
  2. Visual indicators: Show when assistant is "thinking"
  3. Fallback: If it doesn't understand, offer manual filters
  4. Optional persistence: Disable if context shouldn't persist

Next Steps