Skip to content

examples(account-signal-scoring): turn account signals into one score with SIE ranking#205

Open
richard7ao wants to merge 1 commit into
superlinked:mainfrom
richard7ao:examples/account-signal-scoring
Open

examples(account-signal-scoring): turn account signals into one score with SIE ranking#205
richard7ao wants to merge 1 commit into
superlinked:mainfrom
richard7ao:examples/account-signal-scoring

Conversation

@richard7ao

Copy link
Copy Markdown

Summary

Adds a new gallery example, account-signal-scoring — turning a pile of CRM account signals into one score a team can act on, with SIE doing the ranking.

This is a cleaned-up, self-contained slice of our {Tech: Europe} London AI Hackathon project (codename "Rick", built on top of Attio + Stripe signals). Opening as a draft per Daniel's note — happy to iterate on scope, naming, and the writing style with the team.

What it does

  • Signals → one score (deterministic). Each signal has a direction (risk vs. opportunity) and a severity weight; they roll up into a single 0-100 score + red/amber/green band. Simple and auditable.
  • The account's story → the right play (SIE). The account context is written as prose, encoded (MiniLM), and ranked (cosine → cross-encoder score with BGE-reranker) against a corpus of past-outcome playbooks to pick the recommended play. extract (GLiNER) surfaces entities alongside.
  • A brief a human can send (optional LLM). With SIE_CHAT_MODEL set, the OpenAI-compatible /v1/chat/completions endpoint drafts the brief, grounded in the matched playbook; otherwise a deterministic brief keeps the board populated.

SIE primitives

extract, encode, score, and (optional) chat/completions — one cluster, one round-trip.

Shape

Follows the stripe-link-fraud example: compose.yml (CPU image, 3 models preloaded, ~440 MB), a tiny Node HTTP + SSE server, and a vanilla-JS UI (no build step). CPU-only by default; the LLM brief is opt-in. Also ships a headless CLI (npm run score) that ranks the whole book into risk/expansion boards. Added a row to examples/README.md.

Test plan

  • npm install + npm run typecheck clean
  • Web server boots; /api/health, /api/accounts, static assets, and graceful SSE error when SIE is unreachable all verified
  • Deterministic scoring / summary / brief verified against the sample data
  • Full docker compose up end-to-end run against a live SIE server (needs Docker; not run in this environment — would appreciate a CI/maintainer check)

Generated with Devin

… demo

Turn a pile of CRM account signals into one score a team can act on, with
SIE doing the ranking. Signals roll up into a deterministic 0-100 score and
band, then the account's context is embedded and reranked against a corpus of
past-outcome playbooks (extract + encode + score) to pick the recommended
play. An optional chat/completions call drafts the account brief, falling
back to a deterministic writer so the board is always populated.

Self-contained Docker Compose + Node UI, CPU-only by default. Contributed
from a {Tech: Europe} London AI Hackathon project by the Attio-integration
team.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@richard7ao richard7ao marked this pull request as ready for review July 7, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant