FirstBatch SDK
  • Get Started
    • Introduction
    • Installation
    • Quick Start
  • Learn
    • Key Concepts
      • Embeddings
      • Vector Databases
      • User Embeddings
    • Sessions
    • Signals
    • Batches
    • Algorithms
      • Batch Types
        • Random
        • Sampled
        • Personalized
        • Biased
      • Parameters & Tuning
    • Cookbook
      • Simple Flask App
      • Personalized RSS Feed
      • Personalized Mini TikTok
      • User-Intent AI Agents
      • Extending RAG: User Embeddings
      • Prompt Based User Journeys
      • User-Centric Promoted Content
  • Modules
    • FirstBatch
    • Algorithms
    • VectorStores
      • Pinecone
      • Weaviate
      • Qdrant
      • Typesense
      • Supabase
      • Chroma
Powered by GitBook
On this page
  1. Learn
  2. Algorithms
  3. Batch Types

Personalized

PreviousSampledNextBiased

Last updated 1 year ago

If there are no signals in the current session, the personalized batch functions as a random batch.

Personalized batches serve personalized data based on session signals. They use N signals to calculate M vectors and M weights.

N is the number of signals created by user actions.

M is the number of vectors created by the Personalized Batch operation. M depends on a few things including:

  • How signals are positioned in the embeddings space

  • Parameters

These M vectors are queried to vector databases to fetch batch_size results.

Accepted parameters for Personalized batches are:

mu: float = 0.0
alpha: float = 0.0
r: float = 0.0
last_n: int = 0
remove_duplicates: bool = True
apply_threshold: Tuple[bool, float] = (False, 0.0)
apply_mmr: bool = False
Personalized Batch