Exclude Sections From Training (CSS Filters)

When your chatbot trains on a website page, it captures everything on that page by default — including related-product carousels, cross-sell blocks, sidebars, and footers. That content is often not useful for answering customer questions, and it eats into your training limit.

CSS filters let you tell Boei to skip specific sections of a page (or only keep specific sections) while leaving the page itself untouched for your visitors.

How to get there: Go to Setup → Chatbot in the top menu → click your chatbot → Training → Website tab (under the Training section in the sidebar) → find your website source → click the settings (gear) icon.

When to Use CSS Filters

Common cases where excluding sections helps:

  • Related-products carousels on product pages that inflate character counts and confuse the chatbot with dozens of off-topic product names
  • Cross-sell and upsell blocks that appear on every product page
  • Sidebars with promotional widgets, newsletter signups, or recent-post lists
  • Footers with company info repeated on every page
  • Cookie banners or consent walls that survive the crawl
  • Comment sections on blog posts

Sections you strip stay visible to your customers on the site — Boei only excludes them from training data.

How It Works

You provide CSS selectors — the same syntax used in web design:

Selector What it matches
.related-products Any element with class related-products
#products-list-footer The element with id products-list-footer
.cross-sell Any element with class cross-sell
aside All <aside> tags on the page
footer The page footer

You can list multiple selectors, one per line.

Setting Up Exclude Filters

  1. Go to Setup → Chatbot in the top menu → click your chatbot → Training → Website tab

  2. Find the website source you want to configure

  3. Click the settings (gear) icon next to it — this opens the advanced settings

  4. In the Exclude CSS Selectors field, paste one selector per line:

       .related-products
       .cross-sell
       #products-list-footer

  5. Click Save Changes

Filters apply on the next crawl of each page. Pages that were already trained keep their current content until they are re-crawled.

Applying Filters to Already-Trained Pages

If you already trained pages before adding filters, they need to be re-crawled to pick up the new rules:

  • Sitemap sources: click Sync Now in the source's action menu — every page in the sitemap gets re-crawled with the new filters
  • Crawler sources: re-train the individual pages you care about (select them in the pages list and click Train), or wait for your next auto-sync
  • New pages added after you set the filters use them automatically

Your training-character count drops the moment the re-crawl finishes.

Include Filters (Advanced)

The Include CSS Selectors field does the opposite: if set, the chatbot only trains on content inside the listed selectors and ignores everything else on the page.

Use this when a site has a clear main-content wrapper, for example:

main
article.post

If left empty (the default), Boei keeps the whole page and applies your exclude filters on top.

Finding the Right Selectors

To find the CSS class or id of a section you want to remove:

  1. Open the page in your browser
  2. Right-click the section (e.g., the related-products block)
  3. Choose Inspect (Chrome, Edge, Firefox, Safari)
  4. In the DevTools panel, look at the class="..." or id="..." attribute on the highlighted element or its parent container
  5. Copy the class (prefix with .) or id (prefix with #) into the Exclude CSS Selectors field

Tips

  • Start with the biggest offenders. Related-products carousels on e-commerce sites can easily add 10,000 characters per page. Removing them often cuts a page's training size by more than half.
  • Test on one page first. After you save selectors and re-crawl a page, open it in the pages list and check the character count went down as expected.
  • Combine with URL paths. If a whole section of your site should be excluded (e.g., /blog/tag/*), use the Include Paths or Exclude Paths fields instead. CSS filters are for sections within pages you do want to train on.
  • Filters are per source. If the same site is added twice (once as a crawler, once as a sitemap) you set the filters on each source independently.

Requirements

  • CSS filters run through our website crawler and apply to all page types (crawled domains, sitemap sources, page-link lists)
  • They do not apply to Files, Text Snippets, or Q&A sources — those are already free-form content you enter directly