RAG Pipeline for Insight Filtering

How does Rox efficiently match incoming public data to a user?

What are Rox Insights?

Sellers today spend too much time chasing fragmented updates, researching accounts, and struggling to personalize outreach without trustworthy data. Rox solves this by unifying public and private information into a single, real-time view. With automated, context-rich insights delivered in real time, sellers can engage more effectively and close deals faster. Learn more about how Rox’s insight pipeline works here →

The Problem: How do we get user’s the right insights?

In today's information-rich world, delivering the right content to the right users is crucial. Our system leverages a sophisticated RAG (Retrieval-Augmented Generation) pipeline combined with vector embeddings to match user preferences with relevant content. This post explores how our Preference Service orchestrates this intelligent filtering system.


System Architecture Overview

Our insight filtering system consists of three core components:

  1. User Preferences - What users are interested in

  2. Public Artifacts - Content to be filtered (news, insights, job postings, etc.)

  3. Preference Keywords - Semantic representations of user interests

These components work together through vector embeddings and similarity matching using Turbopuffer to create a powerful content personalization engine.

The Three-Index System

  1. Preference Keywords Index: This index stores the semantic representation of user preferences. Each preference is:

    • Automatically embedded into a vector representation

    • Deduplicated to prevent redundant storage

    • Tagged with a preference type

    • Stored with both the original text and its vector embedding

  2. User Preferences Index: This index maintains the relationship between users and their preferences:

    • Links users to their preferences

    • Supports multiple preferences per user

    • Enables efficient user lookup for content distribution

    • Tracks preference types per user

  3. Public Artifacts Index: Stores the content that needs to be matched against user preferences:

    • News articles, insights, and other content types

    • Each artifact includes title, content, source, and URL

    • Automatically embedded for similarity matching


The RAG Pipeline: From Content to Users

Step 1: Preference Embedding

When a user expresses interest in a topic, the system first checks for existing preferences to avoid duplication. If the preference is new, the system creates a preference document in Turbopuffer with the keyword text, which then undergoes automatic embedding.

Step 2: Artifact Processing

When new content arrives in the system, whether it's a news article, insight, or other content type, the system initiates a comprehensive processing workflow. We generate a vector embedding for both the article's title and content that captures the semantic meaning of the entire artifact and stores it with complete metadata for later retrieval and attribution.

Step 3: Intelligent Matching with Union Approach

The system performs separate searches using the artifact's title and content independently. We compare the artifacts title and content semantic vector independently against all stored preferences. The system takes the maximum similarity score between title and content matches for each preference. This union approach ensures that articles with highly relevant titles match even when the content is broader in scope, content-rich articles match even with generic or less descriptive titles, and the system doesn't miss relevant matches due to imbalances between title and content specificity.

Step 4: Threshold-Based User Segmentation

The system implements a sophisticated dual-threshold approach for intelligent user targeting. The exclusive threshold identifies high-confidence matches for users with strong preference alignment. These are the premium matches where the system has high confidence that the content is highly relevant to the user's interests. The non-exclusive threshold captures a broader audience with moderate interest. This creates three distinct user segments: exclusive users who receive highly targeted, premium matches; non-exclusive users who form a broader audience with moderate interest levels; and all users, which represents the combined unique users from both categories.


Conclusion

Our RAG-based insight filtering system delivers personalized content at enterprise scale by combining vector embeddings and intelligent matching algorithms. Its union-based matching approach, supported by automatic deduplication and pagination, provides high precision and recall across diverse content types like news and insights, while seamlessly handling large volumes of data. As a result, Rox has established a scalable, reliable foundation for mission-critical content delivery that adapts to evolving user needs in our dynamic content pipeline.

Last updated