Skip to main content

KEYWORD_STOPWORDS

@forge/monorepo


@forge/monorepo / backend/src / KEYWORD_STOPWORDS

Variable: KEYWORD_STOPWORDS

const KEYWORD_STOPWORDS: ReadonlySet<string>

Defined in: backend/src/persistence/index.ts:1499

Words a keyword query drops (#136).

On the port, like EMBEDDING_DIMENSIONS, because both adapters need the same list and a copy in each is a copy that drifts.

Why the query and not the index. Postgres's simple text configuration is chosen deliberately over english: english stems, and stemming is exactly what destroys ERR-4021 and Q3-2026 — the terms keyword retrieval exists to find. But simple also keeps stopwords, so was the site down matches whichever document says the most often. Found by measuring hybrid against semantic-only, where a decoy sharing only was and the outranked the document that actually answered the question.

Stripping them from the query keeps identifiers intact in the index while removing the terms that carry no retrieval signal. Small and English-only, which is honest: a deployment in another language needs its own list, and pretending otherwise would be worse than the list being visibly incomplete.