NetworkChains

ai sales platform

NetworkChains — AI Sales & Relationship Platform

From on-device scraping to sales copilot, with a judge cutting forced pitches 100% to 8%.

role
AI engineer
status
● live
scale
956 recommendations measured
stack
TypeScript · FastAPI · Qdrant · Deepgram
type
commercial · closed source

FIG.01 // NETWORKCHAINS · PROMPT ASSEMBLY

Seven layers instead of stuffing the context

Worst-case prompt input per turn, before and after the layered assembly.

Seven layers instead of stuffing the context~96K~2Krelationshipstanding modelmemory slotsbounded factsworkingmemory, verbatimRAG chatprior messagesRAG docsuserId+contactIdRAG profileorg-globaldeterministicrebuttals · stage
01

A judge that is allowed to say nothing fits

Signals from a contact's messages and posts become opportunities: a product worth suggesting, an angle for the seller and a draft message. I measured 956 production opportunities: 56% pushed in-house products, 86% of the drafts hedged, and only 6.4% were acted on.

A relevance threshold couldn't fix it. Scores sat between 0.28 and 0.47 for good and bad matches alike; a gas stove matched a bloating remedy at 0.445. So the judge now reads the product descriptions and treats no match as the normal answer, and a separate writer drafts the message only when something fits. Sensitive moments are blocked by the judge or a keyword list, either one alone.

Batching moments into one call mixed people up and gave different answers between runs, so the judge sees one moment per call. On 12 replayed production moments, forced product pitches fell from 100% to 8% and hedging from 83% to 0%, held by a deterministic regression gate.

956 measured100% → 8% forced pitches83% → 0% hedging

02

Seven context layers instead of context stuffing

EarnGPT, the sales copilot, is a tool-calling agent capped at 5 iterations with two tools: search the catalog and draft a pitch. Its prompt is assembled from up to seven layers, each added only when it has content: the system prompt with pipeline stage, sequence state and the user's own playbook, the relationship replica, structured memory slots, message memory, uploaded documents, the enriched profile, and a recovery directive after a lost deal.

When the replica is fresh, the raw message and document passes are skipped, because the replica already summarises them. Message memory uses contextual retrieval and HyDE for short queries. That is the basis of an estimated worst case of ~96K down to ~2K tokens per turn.

The product reranker returns item IDs only, never names, so the model can't attach one product's name to another product. Pitches are never sent automatically, profile changes it is unsure about wait for approval, and spend caps and a model allowlist bound the cost.

A live call copilot runs beside it: the host microphone and the remote participants are separate streams, each with its own Deepgram socket, so the speaker is known without diarization, and suggestions fire only when the contact has just spoken.

5 tool iterations7 context layersIDs-only rerank

03

Data the copilot can trust

Capture: replaying a social session from a server proxy while the user is also logged in from home is the one-session-two-IPs pattern platforms flag, so Facebook and Instagram are scraped on the user's own device, by an Electron app driving a hidden window over CDP and by hidden mobile WebViews that replay the platform's own GraphQL requests. LinkedIn and WhatsApp stay server-side behind per-user geo-matched proxies, and an API-contract canary flags a silent platform change instead of mistaking it for a quiet day.

Identity: match keys are graded strong, medium or weak, and only strong, system-derived keys auto-merge two records. Identifiers from uploaded CSVs are never treated as strong, so a crafted file can't merge two people, and every merge can be undone.

Relationship: each relationship gets a replica built from six sources, and every claim in it must cite a source, verified by exact match first and then by similarity of at least 0.8.

Catalog: products, courses, jobs and six other item types are mirrored into Qdrant through a transactional outbox and HMAC-signed webhooks. The worker re-fetches each item rather than trusting the event and re-embeds only when its text hash changed, with an hourly reconcile and a daily orphan sweep as backstops.

on-device FB + IGreversible mergesevery claim citedhash-skip re-embedding

FIG.02 // NETWORKCHAINS · LIVE CALL AUDIO

Who said it comes from the socket, not a model

Two streams stay two streams all the way to Deepgram, so attribution needs no diarization.

Who said it comes from the socket, not a model01 · HOSTmicrophone01 · REMOTELiveKit mix02 · AUDIOWORKLET48k → 16kPCM16 · 250ms48k → 16kPCM16 · 250ms03 · DEEPGRAM nova-3one socket per sourceNO DIARIZATION MODEL04 · CACHEhash dedupetwo-tierEVERY 1ssuggestionsEVERY 30saction itemsEVERY 60ssummaryoff themain threadhost socketremote socketa slow summary neverstalls the hot loop