← All work

Sparrow Marketing

Social managers see the comments worth answering first, learned from their own choices

Sparrow Marketing gives agencies social media management and automated client reporting. We added a ranking layer to its running Python platform that puts the comments worth answering first and learns from managers' own choices, while a manager still decides.

Marketing & MediaSocial media reporting platformAI added to a live product

The challenge

Agency managers had to find the comments and messages worth answering across Facebook, Instagram and Twitter, with little labeled data and a product that pivoted while we worked.

What we did

One database for the three platforms, Swagger documented APIs for the client's web layer, and an SVM ranking model on five signals that learns from each manager's reply, skip, ignore or spam choice.

The outcome

Managers get one prioritized queue with junk and spam set aside, and the founder credited us with a database, APIs and an ML model built beyond his expectations.

Platforms
Facebook, Instagram and Twitter in one queue
Who uses it
Social media managers at marketing agencies
Decision
The model ranks and labels, a manager decides
Delivered
Database, documented APIs and a ranking model

The starting point

Sparrow Marketing is a U.S. startup that gives marketing agencies social media management and automated client reporting. Its Python platform already ran several times a day, read from MongoDB and connected to several social media APIs on behalf of customers.

What had to change

Managers had to find the important comments and messages across three platforms, buried in noise. The founder was stepping back from the technical side and wanted a team to extend the platform and keep it running.

What could not break

  • The client's running Python platform and its MongoDB data stay in place
  • Each platform's rules on user data are respected, strictest on Instagram
  • Little labeled data at the start, so training has to grow from use
  • A manager, not the model, decides what gets answered
  • The modules survive the product's pivot from automation to reporting

The calls we made

We split priority into two questions, who is writing and what they wrote, and kept the decision to answer with the manager.

  1. 01

    Rank for a person

    The model orders and labels comments and messages; the manager still chooses to reply, skip, ignore or mark spam. That kept the agency's voice in human hands.

    Ruled out

    A model that replies on its own.

  2. 02

    Two models, one for the writer and one for the words

    A loyal follower and a stranger can write the same words. One model scores the writer's activity with the page and elsewhere, the other scores the content.

  3. 03

    Managers' choices become the labels

    A base text model needed at least 1,000 labeled examples and few existed, so every reply, skip, ignore or spam choice feeds training and the model keeps learning.

    Ruled out

    Waiting for a large hand labeled dataset before shipping a ranker.

  4. 04

    Separate backend and ML modules

    With the product pivoting from automation toward reporting, extraction and APIs had to stand on their own, so a change in direction did not undo the model and more platforms could be added later.

How the system fits together

platform APIsconnectedaccountsone storeitemsfive signalsranked queueclient weblayerchoices as labelsFacebook,…Comments, messages,user activityClient platformPython jobs onMongoDBExtraction modulePython, per platformAPIExtracteditemsMySQL, items andprioritiesSignal scoringInfluence, new user,VADER sentimentRanking modelWord2vec score andSVM classifierRanking APIsSwagger documentedendpointsSocial mediamanagersReply, skip, ignoreor mark spam
Outside serviceClient's existing systemBuilt by DaticsData storeAI modelPeopleThe ranking layer sits beside the client's running platform: items from three platforms land in one store, get ranked, and each manager's choice becomes new training data.

What we built

01

One store for three platforms

Extraction of comments, messages and each user's active and passive activity scores from Facebook, Instagram and Twitter into a single database.

02

Documented APIs for the web layer

Swagger documented endpoints that hand ranked comments and messages to the client's existing web layer.

03

A ranking model on five signals

Influence, new user, happy and angry scores plus a Word2vec embedding score feed an SVM classifier that ranks each item and sorts the rest as junk or spam.

How it works

Collect

Comments, messages and user activity arrive from the three platforms into one database.

Clean the text

Special and repeated characters are removed, spelling is checked and the text is tokenized.

Score

Activity scores are normalized from 0 to 1 and VADER sentiment sets the happy and angry scores.

Rank

The classifier combines the five signals and orders the queue for the manager.

Learn

The manager's reply, skip, ignore or spam choice goes back into training.

What changed

Managers get one prioritized queue of comments and messages instead of reading each platform separately, with junk and spam set aside. The founder credited us with a database, APIs and an ML model built beyond his expectations, while the product changed direction under us.

Under the hood

Datics role
AI added to a live product
Integrations
Facebook Graph API, the Twitter API and Instagram APIs, each used within that platform's rules on user data.
Data
The client's MongoDB platform data, a prepared Neo4j backend and a MySQL store for extracted items and their priorities.
Models
NLTK VADER sentiment, a Word2vec model trained on Twitter text and an SVM classifier over the embeddings and five ranking signals.

Apps and APIs

Python

Also in the stack

Facebook Graph APITwitter APIInstagram APIsMySQLNLTK VADERWord2vecSVM

How it shipped

  1. Requirements

    We helped the founder define what the platform should do, and adjusted as the product moved from automation toward reporting.

  2. Extraction and store

    Comments, messages and user activity from Facebook, Instagram and Twitter brought into one database behind documented APIs.

  3. Ranking model

    The five signals and the SVM ranker, trained on historical data and wired to learn from managers' choices.

  4. Testing with the founder

    Weekly syncs while the founder tested, with bugs fixed as they surfaced.

Requirements first

We helped the founder define the requirements before building, then split the work into a backend module and an ML module.

Weekly syncs through the pivots

We met the founder every week, adjusted as the product moved toward reporting, and fixed bugs as his testing found them.

What this unlocked

The same pattern fits any product with a busy inbox: rank for a person, keep the reply human, and let everyday choices become the training data.

Have a product with the same kind of constraints?

Tell us what already exists and what you want it to do. We will tell you what it takes.

Book a 30-minute Product Review