From ab4ec7ea6a4952b4bbd4489f88ddddd1b333992f Mon Sep 17 00:00:00 2001 From: Volodymyr Borysenko Date: Thu, 15 Oct 2026 22:09:52 -0700 Subject: [PATCH] fix: keep interaction verbs out of network search topics "met" and "raised" were not stopwords, so they became topics and positive keywords. "met" then matched meeting or metrics in candidate text and gave unrelated results a topic match. Add met, meet and raised to the stopwords; they are already read as interaction and stage criteria. Fixes #72 --- src/lib/domain/network-search.ts | 4 ++++ tests/network-search.test.ts | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/src/lib/domain/network-search.ts b/src/lib/domain/network-search.ts index ffd5a3f..85fa7dc 100644 --- a/src/lib/domain/network-search.ts +++ b/src/lib/domain/network-search.ts @@ -137,6 +137,10 @@ const STOPWORDS = new Set([ "work", "spoke", "emailed", + // Interaction verbs are read as interaction and stage criteria, not topics. + "met", + "meet", + "raised", "last", "recent", "recently", diff --git a/tests/network-search.test.ts b/tests/network-search.test.ts index 312fb6e..39ffb2e 100644 --- a/tests/network-search.test.ts +++ b/tests/network-search.test.ts @@ -124,6 +124,15 @@ describe("general network search", () => { expect(parsed.topics).not.toContain("Ukraine"); }); + it("does not keep interaction verbs like met or raised as topics", () => { + const parsed = parseNetworkObjective({ query: "Find founders I met who raised a seed round", strictness: "balanced" }, now); + expect(parsed.topics).not.toContain("met"); + expect(parsed.topics).not.toContain("raised"); + expect(parsed.positiveKeywords).not.toContain("met"); + expect(parsed.interactionTypes).toContain("meeting"); + expect(parsed.fundingStages).toContain("seed"); + }); + it("supports recency and no-follow-up conditions", () => { const results = search("Find founders I met but never followed up with", [ candidate({