Audience sizing is a critical component of digital marketing. It enables precise resource allocation, campaign planning, and performance optimization. Traditional approaches using skeleton audiences, sampling, or predictive modeling suffer from significant delays, estimation errors, and poor scalability over high-dimensional profile data. We present REALMS (Real-time Exact Audience sizing via LLM-based Multi-attribute Search), a conversational system for exact audience sizing deployed in production on an enterprise customer data platform. REALMS enables marketers to query massive profile stores with millions of profiles and thousands of attributes using natural language and receive precise counts in seconds. The system introduces three key components: (1) a categorical attribute retrieval mechanism using embedding-based vector search to dynamically identify relevant schema attributes without manual configuration; (2) an LLM-powered NL2SQL pipeline with template-based in-context learning for accurate query generation over complex nested schemas; and (3) schema standardization enabling industry-agnostic deployment across diverse enterprise environments. Evaluation on real enterprise data demonstrates strong recall for attribute retrieval, high SQL execution accuracy, and low latency, which enables real-time interactive audience insights where prior methods required hours.
Figures & tables
Fig. 1: Comparative Analysis of Conventional and REALMS (Our Approach) for Real-time Exact Audience Sizing Over Large-Scale Enterprise Profiles.
Skeleton
Sampling
Predictive
REALMS
Audiences
Techniques
Models
(Ours)
Real-time
×
×
×
✓
Exact sizing
✓
×
×
✓
Compute needed
High
Medium
High
Medium
TABLE I: Comparison of audience sizing approaches.
Fig. 2: High-level system architecture of REALMS: offline pre-processing and real-time AI Assistant runtime.
Fig. 3: Offline pre-processing and hydration flow.
Fig. 4: Five stages demonstration of the REALMS runtime query processing pipeline.
Fig. 5: End-to-end REALMS runtime flow.
RPM
Conc.
#Req
#Fail
Med (s)
Avg (s)
P95 (s)
P99 (s)
10
1
15
0
5.9
6.7
11.0
11.0
30
5
68
0
8.3
8.3
12.0
13.0
60
10
105
2
10.0
10.5
14.0
15.0
TABLE II: Load test results under varying RPM and conc. users.
Task
Metric
Score
Schema attribute retrieval
Recall@ k
94%
Exact-match rate@ k
93%
Structured query correctness
Execution match
90%
LLM-as-a-judge match
95%
TABLE III: Performance on the evaluation dataset (accuracy %).
Method
Execution Match (%)
LLM-Judge Match (%)
REALMS (Full)
90%
95%
– w/o KG-RAG
68%
72%
– w/o Schema Retrieval
57%
63%
– Random Example Retrieval
72%
75%
TABLE IV: Ablation study of REALMS for structured query correctness.
# Attributes
Recall@5 (%)
Execution Match (%)
LLM-Judge Match (%)
1 Attribute
100%
100%
99%
2 Attributes
98%
94%
97%
3 Attributes
93%
88%
93%
TABLE V: Performance under different query complexities.