Dynamic Knowledge and Instruction RAG System for Production Chatbots

wix · Tech · 2024 · source Agentic: no · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Adaptive website chatbots

Wix needed AI Site-Chat to answer site visitors with business-specific preferences and unwritten owner knowledge that static RAG documents and fixed system prompts cannot capture or update easily.

Constraints:

Architecture

Wix AI Site-Chat combines feedback classification with Dynamic Domain Knowledge and Instruction RAG. Owner feedback is first converted into yes/no/don't-know feature answers by LLM calls, then a CatBoost classifier maps those features to the correct feedback class. The system creates class-specific RAG documents and updates the knowledge base and prompts through DDKI-RAG, so new owner feedback can become retrievable domain knowledge or dynamic instructions for future chatbot answers.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  site-owner-feedback[Site Owner Feedback] --> llm-feature-extractor[LLM feature extractor]
  llm-feature-extractor --> catboost-classifier[CatBoost classifier]
  catboost-classifier --> class-specific-rag-document[Class-specific RAG document]
  class-specific-rag-document --> ddki-rag-layer[DDKI RAG layer]
  ddki-rag-layer --> ai-site-chat[AI Site Chat]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Site Owner Feedback Owner-provided corrections, emphasis, and unwritten business knowledge. LLM feature extractor
LLM feature extractor Answers predefined yes/no/don't-know questions about the feedback text. CatBoost classifier
CatBoost classifier Classifies feedback based on extracted categorical features. Class-specific RAG document
Class-specific RAG document Document created for the classified feedback type. DDKI RAG layer
DDKI RAG layer Dynamic knowledge-base and prompt-update mechanism. AI Site Chat
AI Site Chat Visitor-facing chatbot that uses retrieved site knowledge and owner instructions. DDKI RAG layer

Data flow

A site owner interacts with AI Site-Chat and provides feedback. The system asks predefined yes/no/don't-know questions to extract features from the feedback, feeds those features into CatBoost for class selection, creates a RAG document for that class, and updates the DDKI-RAG knowledge/prompt layer. Future visitor questions then retrieve this owner-provided knowledge or instruction and generate answers aligned with the business context.

“The chatbot then uses this feedback to learn the "unwritten knowledge" and understand what to focus on when answering users' questions.”article, stated
“the system processes this feedback to update its knowledge base and prompts.”article, stated

Why this architecture

Wix separates feedback understanding from final chatbot generation because LLMs are more useful as feature extractors than direct classifiers in this design. DDKI-RAG then solves the static-RAG problem by turning owner feedback into dynamic knowledge and prompt updates, capturing information such as preferences or unwritten facts that were not present on the website.

“LLMs are not the most effective tools for direct text classification tasks.”article, stated
“The Dynamic Domain Knowledge and Instruction Retrieval-Augmented Generation (DDKI-RAG) system introduces a feedback-driven mechanism”article, stated

Models used: LLM · CatBoost · DDKI-RAG · AI Site-Chat

Scale

Alternatives considered (roads not taken)

Use LLMs directly for feedback text classification.

Rejected because: Wix says LLMs are better at precise yes/no feature extraction than direct classification.

“LLMs are more proficient at responding to precise yes/no questions, making them better suited for feature extraction rather than direct classifier.”article, stated

Use conventional static RAG.

Rejected because: Static knowledge bases do not automatically update from feedback and require manual updates or reindexing.

“the knowledge base is static (unless you re-index on every change), meaning it does not update automatically based on new feedback.”article, stated

Keep fixed system prompts.

Rejected because: Static prompts produce generic responses and cannot adapt dynamically to user or owner needs.

“The system prompts in traditional RAG architectures are often fixed, providing the same instructions to the LLM regardless of the context or the user's needs.”article, stated

Patterns

rag-retrieval (retrieval)

DDKI-RAG updates the knowledge base and prompt context from owner feedback so future answers retrieve business-specific instructions and knowledge.

“By integrating user or owner feedback into the retrieval and generation process, the chatbot becomes more responsive, accurate, and aligned”article, stated

structured-output-contract (data)

LLM feature extraction is constrained to yes/no/don't-know answers that feed a classifier.

“utilize LLMs for feature extraction by answering a predefined set of yes/no/don’t know questions about the input text, in parallel”article, stated

data-quality-loop (data)

Site-owner feedback becomes new knowledge or instructions, closing a loop from observed bad answers to improved chatbot behavior.

“This feature provides site owners with a special area where they can interact with the chatbot and offer feedback.”article, stated

Tradeoffs

Feedback classification architecture

Chose LLM feature extraction plus CatBoost classification. over Direct LLM classification..

Rationale: Yes/no features are more interpretable and efficient for CatBoost, while LLMs handle language understanding.

“CatBoost Classifier uses the yes/no (and don't_know) responses as input features.”article, stated

Knowledge update strategy

Chose Dynamic DDKI-RAG updates. over Manual reindexing and static prompts..

Rationale: Owner feedback needs to affect knowledge and behavior without time-consuming manual updates.

“Incorporating new knowledge requires manual updates or reindexing, which is time-consuming and inefficient.”article, stated

Gotchas (what bit them)

Important business knowledge may not exist in the website corpus.

Root cause: Some knowledge exists only in the owner's mind or is intended only for chatbot conversations.

Resolution: Wix captures owner feedback and inserts it into dynamic domain knowledge.

“In many cases a business has knowledge which is not written anywhere except in the mind of the owners”article, stated

Traditional RAG can serve stale or irrelevant knowledge.

Root cause: The knowledge base does not update automatically after new feedback.

Resolution: DDKI-RAG dynamically updates the knowledge base and prompts from feedback.

“Outdated Information: The chatbot may provide responses based on obsolete data, leading to inaccuracies.”article, stated

Fixed prompts make chatbot behavior generic.

Root cause: Traditional RAG prompts are the same regardless of context or owner preference.

Resolution: Wix uses DDKI-RAG to adapt prompts dynamically.

“Static prompts do not allow for tailored interactions, which can hinder the effectiveness of the chatbot.”article, stated

Evaluation

The article explains the architecture and expected behavior but does not report rigorous production metrics; evaluation is mainly design rationale for classification and adaptive feedback.

“Using CatBoost we can understand the complex relationship”article, stated

Outcomes

The source does not provide traffic or deployment-volume metrics; it describes a production chatbot feature and architecture.

“This feature provides site owners with a special area where they can interact with the chatbot and offer feedback.”article, stated
“the chatbot becomes more responsive, accurate, and aligned with the desired domain-specific behavior.”article, stated