Use Sampling in Listening
Updated
Learn how to apply Sampling on a Listening Topic in order to retrieve a percent sample rather than all results.
Samples are used to make inferences about populations. Sampling helps you to collect data from vast mentions and reflect the results quite near to the original population size because they are practical, cost-effective, convenient, and manageable and gives you more hold on the number of mentions consumed.
For Listening Sources, you can retrieve a percent sample rather than all results. You can sample the backfill by mentioning the sampling percentage for the number of listening mentions. The percentage sampling will work by mentioning whole numbers in the range of 1 to 99.
Key use cases
As a Product/Brand Owner, you want to check a sample of mentions around a certain aspect of your product so you can generate insights and a plan of action.
As an Analyst, you want to fetch a small sample of mentions for several created topics to plot comparisons and generate insights.
How to use Sampling?
There are two ways to sample the backfill in Sprinklr –
Operator sample:() – Inside advanced Queries
Manage Data Volume UI in Topics screen > Option available inside the 3 dots menu
Using the Sample operator
You can use the sample operator in the following:
Advanced Query builder: While making Topics and Themes
Keyword Queries: Present at the dashboard level to sample data post-fetching
Quick Search: Inside search box (used for writing queries)
You can use the Sample operator by applying it with AND operator within your query.
For example, <Query> AND sample: 5
Sample operator in the Advanced Query builder
Click the New Tab icon. Under Sprinklr Insights, click Topics within Listen.
On the Topics window, click the Options icon preceding the desired topic and select Edit.
Now, navigate to the Setup Query tab and add the sample operator to your query followed by any decimal percentage ranging from 0.01 % – 99.99% as per your required sample size. You can see the fluctuating decrease and increase in mentions as the sample percentage is decreased and increased respectively. This is demonstrated by the gif below –
Sampling percentage in Manage Data Volume UI
Click the New Tab icon. Under Sprinklr Insights, click Topics within Listen.
On the Topics window, hover over the Options icon next to the desired Topic and click Manage Data Volume.
Note: From the Topics window, you can create a new topic. Refer to this article for more information – Create a Topic.
On the Manage Data Volume popup window, enter the Sampling Percentage and click Submit in the bottom right corner.
How does Sampling work?
Sampling is done on the basis of bucketing the overall mentions that are fetched in the environment.
Buckets from 1 to 99 are formed when mentions are fetched.
Every mention fetched is sampled into one of the buckets using a custom algorithm. The algorithm samples the mention by assigning a sample number from 1 to 99 randomly, which is independent of any criteria like Created time, most engagements, etc.
This algorithm operates on the message ID of the mention, which is unique. Hence once sampled into a bucket, the mention permanently remains assigned to that particular sampling bucket. It also ensures that each bucket has approximately the same number of mentions assigned to it.
When the sampling percentage is set to a number n (n<100), the first n buckets will start getting fetched, starting from bucket 1.
Understanding Sampling using a practical example
Suppose you made a topic with a query, and it has 100k mentions to fetch in it. These 100k mentions get assigned to different sampling buckets from 1 to 99 randomly, each bucket containing approximately 1k mentions.
Suppose you only want 15% of total mentions to be fetched. When the sampling is set to 15, the mentions get fetched from the top 15 buckets, i.e., from the 1st bucket to the 15th bucket. This will give you 15% of total mentions i.e., 15k out of 100k mentions.
Additional information
When we trigger a backfill for a topic with a sampling config set up, the backfill estimates will not take into account the sampling percentage. Still, the overall mentions pulled in will take the sampling into account. So, for example, a topic backfill (with a sampling set as 10%) was triggered. Originally the topic matches, say, 1000 mentions. The topic backfill estimate will show 1000 as the estimated mentions count, but the backfill will only pull in ~100 mentions (10% of 1000), which is the correct number.
Sampling only affects data collection. When displaying a Topic Query in a dashboard, Sprinklr incorporates –
All messages fetched by that Topic Query (restricted by a sampling percentage if one has been applied).
All messages fetched by other Topic Queries in the partner environment that match the conditions of the selected Topic Query (unaffected by the sampling percentage in the selected Topic Query.
Decimal percentage for Sampling Backfill
Sprinklr also has the ability to further subsample the mentions. You can sample the backfill by mentioning decimal-based values for sampling percentages, aside from whole numbers for the number of listening mentions. The decimal-based Percentage Sampling will enable analysts to fetch mentions by expanding the range of sampling percentages from 0.01% to 99.99%.