EcomBot Docs

Knowledge Base & AI

Optimize AI responses with the RAG engine and Eager Retrieval.

The Knowledge Base is the brain of your EcomBot agent. This is where you dictate its commercial rules, delivery conditions, and the behavior it must adopt.

How does the Artificial Intelligence work?

EcomBot is not just a raw Large Language Model (LLM) left to its own devices. It uses an advanced architecture called RAG (Retrieval-Augmented Generation) coupled with an Eager Retrieval mechanism.

Eager Retrieval (Anticipated Loading)

When a customer asks a question, EcomBot doesn't query the AI directly. Even before formulating a response, the system queries an ultra-fast vector database to extract:

  • The exact context of the page the customer is on (Product, Cart, etc.).
  • The product listings corresponding to the search.
  • All internal information from your Knowledge Base applicable to the context.

The AI then receives an instruction like: "Here are the strict rules for this store. Answer the question based EXCLUSIVELY on this information." This almost completely eliminates the risk of hallucination.

Special Categories

To guide the AI accurately, you can structure your information using specific categories:

1. Category Recommendations (category_recommendations)

Use this category to force the AI to redirect to a specific product category during a vague request.

  • Example: If the customer asks for "Best sellers", you can link this intent to the exact "Top Sales 2024" category in your catalog, ensuring the AI loads the right products instead of guessing.

For customer support. If the user asks for order tracking, the AI will automatically generate a clickable action button formatted in Markdown [Track my order](<https://mysite.com/tracking>) redirecting to your portal, thus avoiding long unnecessary discussions.

3. Persona Limits (persona_role_limits)

This category is crucial for security. You can dictate strict and absolute behavioral rules here.

  • Example: "Never offer a discount." or "You are a premium seller, always use formal language." The agent will apply these directives as fundamental safeguards before any interaction.