Website content filters

Boei automatically strips common boilerplate (navigation, footers, sidebars, cookie banners, comment sections, ads) when crawling pages. For most sites, this is enough.

If you need more control, CSS filters let you tell Boei exactly which sections of a page to skip (or keep) while leaving the page untouched for your visitors. This is an advanced feature for fine-tuning.

How to get there: Go to AI agents in the left menu → click your agent → Knowledge → open your website source → ··· → Website settings.

When to Use CSS Filters

Cases where the automatic stripping isn't enough:

  • Related-products carousels on product pages that inflate character counts and confuse the agent with dozens of off-topic product names
  • Cross-sell and upsell blocks that appear on every product page
  • Promotional widgets or newsletter signups in sidebars
  • Comment sections on blog posts that survive the default filter

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, which are short codes that identify parts of a web page. If you've ever inspected a web page in your browser, you've seen these. Here are some examples:

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 Knowledge

  2. Find the website source you want to configure

  3. Open the source and choose ··· → Website 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.

Website settings has separate page-path filters and content selectors. Demo data.

Applying Filters to Already-Trained Pages

If you already trained pages before adding filters, they need to be re-crawled:

  • Sitemap sources: select the affected pages and train them again to force content to be read with the new filters. A normal sitemap sync may skip unchanged pages.
  • Crawler sources: re-train the individual pages (select them and click Train), or wait for your next auto-sync.
  • New pages added after you set the filters use them automatically.

Check the extracted text and character count after the page is read again.

Include Filters (Advanced)

The Include CSS Selectors field does the opposite: if set, the agent 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:

main
article.post

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

Finding the Right Selectors

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

Check the result

Test the selectors on one page before retraining a large source. Open its stored content to check that the answer is still present.

Use URL include/exclude paths for whole pages; CSS filters select sections within a page. Filters belong to each source, so configure both sources if the same website is added twice.

Requirements

  • CSS filters apply to all page types (crawled domains, sitemap sources, page-link lists)
  • They do not apply to Files, Text Snippets, or Q&A sources, which are free-form content you enter directly