Static online shops and conventional RAG (Retrieval-Augmented Generation) systems generally treat users in a uniform manner. If a system searches the database without context filters, it may return information that is not relevant to the user’s specific situation.
One of our approaches describes a method in which an AI-powered chatbot categorises visitors during the session in order to tailor both the data retrieval within the RAG system and the presentation in the chat.
Classification via three selection layers
Classification takes place without additional forms, based on three signals:
- Zero-Shot Intent Classification: The language model analyses the wording and tone of the first enquiry to determine the primary purchase or information intent.
- Guided Selling via Clickable Prompts: Predefined entry options in the chat enable immediate classification based on the user’s initial selection.
- Session context: A User Context Object continuously aggregates dwell time, click paths and basket values to dynamically adjust segmentation.
Selective Information Retrieval and UI Control
The identified category controls the retrieval of data from vector databases (e.g. ChromaDB) via metadata filters and the use of knowledge graphs. In addition to content and system prompts, specific UI elements are adapted:
- Direct buyers: Prioritisation of availability and delivery times, as well as the integration of shopping basket buttons.
- Information seekers: Provision of technical data sheets, specifications and PDF downloads.
- Safety-conscious buyers: Focus on warranties, returns policies and customer reviews. System architecture and service integration
Implementation on the software side is carried out via a router agent, for example based on LangChain or native PHP frameworks such as Neuron AI. Threshold values (e.g. for the shopping basket value) can be defined via interfaces to the shop’s Live Session API in order to prioritise data critical to the purchase decision or to prepare for handover to customer service (human-in-the-loop).
📄 Download the white paper ‘Intelligent Visitor Segmentation in E-commerce’ as a PDF