Drupal is a registered trademark of Dries Buytaert
Search API Solr 4.4.0 Minor update available for module search_api_solr (4.4.0). Page Manager 8.x-4.0 Major update available for module page_manager (8.x-4.0). Trash 3.1.0-beta2 New beta version released for module trash (3.1.0-beta2). Commerce AutoSKU 3.0.1 Minor update available for module commerce_autosku (3.0.1). Custom Field 4.0.10 Minor update available for module custom_field (4.0.10). Alternative login ID & display names 2.0.12 Minor update available for module alt_login (2.0.12). EntityReference UUID 3.0.1 Minor update available for module entity_reference_uuid (3.0.1). LocalGov Publications Importer 1.1.1 Minor update available for module localgov_publications_importer (1.1.1). Configuration Override Warn 8.x-1.6 Module config_override_warn updated after 10 months of inactivity (8.x-1.6). Table Alternate Rows Module table_altrow crossed 1,000 active installs.

This module provides a Views sort plugin that uses reinforcement learning to A/B and multivariate test the order of content in any Drupal View. It automatically shifts traffic to higher-performing items based on visitor clicks, offering continuous optimization for dozens or hundreds of items simultaneously without manual intervention. The system supports universal entity types and tracks interactions anonymously for GDPR compliance.

Part of the RL module ecosystem; ships in DXPR CMS.

RL: A/B Test Views Content (rl_sorting) is a Views sort plugin that A/B and multivariate tests the order of any Drupal View using reinforcement learning. Every visitor click is human feedback (RLHF-style); the algorithm continuously shifts traffic to higher-performing items. No fixed test horizons. No manual winner picking. No third-party SaaS.

You need this if

  • You want to A/B or multivariate test the order of content in a View (blog posts, products, news items, anything Views can list)
  • You want to test dozens or hundreds of items simultaneously, not just A vs B
  • You want continuous optimization, not fixed-horizon tests with manual setup
  • You want fair exposure for new content without manually rotating it

Features

  • Multivariate by default: 2 to thousands of items, no per-test setup
  • Universal entity support: nodes, users, taxonomy terms, media, custom entities
  • Views integration: a single sort plugin you add to any View display
  • Real-time RLHF loop: clicks update the model on every page
  • Cold-start handling: new items get exploration scores so they get fair exposure
  • Time-based filtering: rolling windows for seasonal or campaign content
  • Configurable caching: Views cache lifetime auto-aligned with the RL refresh rate
  • Privacy-first tracking: anonymous statistics only, GDPR-compliant

How it works

The sort plugin scores every item in the View using a multi-armed bandit (Thompson Sampling) and routes traffic to higher-performing items. JavaScript on the rendered page records views (turns) and clicks (rewards), feeding the model in real time. The RL core handles the math; this module bridges it to Views.

Post-installation

  1. Install and enable the RL (Reinforcement Learning) module
  2. Configure permissions at /admin/people/permissions
  3. Edit any View display and add "RL: A/B Testing" as the sole sort criterion
  4. Configure cache refresh rate and time-window options
  5. Save; content optimization begins immediately

Prefer a turnkey demo site?

Spin up DXPR CMS, Drupal pre-configured with DXPR Builder, DXPR Theme, RL, and security best practices. DXPR CMS is a marketing CMS built for teams that need A/B testing out of the box.

Get DXPR CMS ยป

Security & privacy

  • GDPR-compliant: only anonymous interaction counts collected
  • No personal data: no user identification, cookies, or per-individual tracking
  • Local data storage: all data stays on your Drupal site, no external services

Migrating from ai_sorting

This module was renamed from ai_sorting in 2026. Existing installs migrate automatically when you enable rl_sorting; experiment history, Views config, and the legacy module are all handled in hook_install. See the 1.0.0-beta1 release notes for details.

Requires

Related modules

  • RL: A/B & Multivariate Testing (rl): required core engine. Also ships RL: A/B Test Page Titles and RL: A/B Test Menu Links as bundled submodules.
  • Views: required Drupal core. rl_sorting registers itself as a Views sort plugin.
  • DXPR CMS: ships rl_sorting pre-configured alongside DXPR Builder and DXPR Theme.

Activity

Total releases
1
First release
Apr 2026
Latest release
2 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.0-beta1 Pre-release Apr 29, 2026