Skip to content

Keywords

What an item is about, and how much you care (SI-537). The AI gives every item one to five keywords, reusing yours where they fit; you weigh each keyword from −100 (less of this) to +100 (more of this). Code: pipeline/stages/keywords.ts and services/keywords.ts. In the app: the cards, the reader, the stream’s keyword filter, and Settings → Keywords (/settings/keywords).

Keywords are not tags. Tags are folders you put on sources; a tag lives as long as a source carries it. Keywords are topics the AI puts on items, and they live on without items, so a weight you set stays.

How an item gets keywords

keywords is a pipeline stage, after gate and before summarize (pipeline.md). It’s a user stage: it offers the model your keywords, so the answer is yours. For each item:

  1. Only items in your stream. An item the gate filtered out gets none, unless its source is marked “always show”. An item the gate hasn’t judged (the gate is off) gets them.
  2. One call to GPT-6 Luna (DeepSeek V4.1 Flash when it fails), reasoning off, on the source, the title and the first 2,400 characters of the item’s text, the same slice the gate reads. A title alone is enough for an item without text.
  3. Your keywords in the prompt. Up to 200 of them, the most used ones that aren’t paused, sorted by name. They are in the system message, which is the same for all of your items, so the provider can cache it. The model uses one exactly as written when it fits, and adds a new one only for a topic none of them covers.
  4. One language. New keywords are in your summary language (summaries.md), or English when summaries keep the item’s own language. Names stay as they are. One language keeps “Elections” and “Wahlen” from being two keywords.

The answer is strict JSON, a list of names. Names are tidied (whitespace, a leading #, quotes and a trailing dot go), at most 40 characters, no commas, no duplicates ignoring case, at most five. A name you already have, in any case, is that keyword; a paused one is left out. A new name becomes a keyword while you have fewer than 500; at the limit, the stage only reuses existing ones, so the list doesn’t grow into thousands of one-off words.

The call is a once() memo per user and item, so a crash doesn’t pay twice. Run again in Executions asks anew and replaces the keywords the stage gave the item before. The step’s note lists the keywords.

Weights, pause, and ranking

  • Weight, −100 … +100, 0 neutral. The For you order (ranking.md) adds an item’s weights up, +100 a point, and nothing stores a rank made from them, so a change counts at once.
  • Paused: not given to new items, and its weight doesn’t count. Items that have it keep it, crossed out on their cards. Pause a keyword to keep it off items without losing its weight; delete it to be rid of it (new items can then get it again).

Where they show

  • Cards: the first three keywords, most wanted first. One you want more of glows, one you want less of is ember, a paused one is crossed out. The weight is in the chip’s title.
  • Reader: every keyword, under the title.
  • Topics: the AI groups your keywords into broader topics, such as Art over Painting and Photography, to browse a whole field at once (topics.md).
  • Stream filter: a keyword chip opens the stream filtered by it, /?keyword=<id>, with Unread and All, together with a tag and the score bounds. The header names it (“3 unread about “Svelte””) with a cross that removes it. The unread count, the “new items” pill and Mark all as read keep to it. A keyword that no longer exists shows the whole stream. The filter is one primary-key lookup in item_keywords per stream row, so the stream still pages from its own index.

Settings → Keywords

  • New keyword: a name and a weight, before any item has it, for example to weigh a topic down from the start.
  • The list: each keyword with how many items have it (the name links to the filtered stream), its weight slider and a pause switch. Filter by part of the name; sort by name, most items or weight. A weight is saved when the slider is let go.
  • Rename inline. A name another keyword has asks first: “Merge “AI” into “Artificial intelligence”?”. The merged keyword keeps the weight and pause of the one whose name it takes.
  • Merge: tick two or more, give the merged keyword a name (the first ticked one’s by default), and press Merge. Every item that had any of them has the merged one.
  • Delete asks first. The keyword comes off every item; the items stay.

What is stored

Migration 0014_keywords:

Table
keywords id, user_id, name (unique per user ignoring case), weight (integer, −100 … +100), paused. Deleted with the user
item_keywords user_id, item_id, keyword_id, created_at. Key (user_id, item_id, keyword_id) for the stream’s lookups; (keyword_id, item_id) for counts, merges and deletes. Deleted with the item, the keyword or the user

API

All need a write token except the GETs.

Request
GET /api/v1/keywords?q= { keywords: [{ id, name, weight, paused, itemCount }] }, by name. q keeps those whose name contains it
GET /api/v1/keywords/:id One keyword
POST /api/v1/keywords { name, weight? } Adds a keyword. 201; 409 when the name is taken; 422 at 500 keywords
PATCH /api/v1/keywords/:id { name?, merge?, weight?, paused? } Renames, weighs or pauses. A name another keyword has: 409 with conflict, unless merge is true. A weight outside −100 … +100: 400
POST /api/v1/keywords/merge { keywordIds, name } Merges keywords into one
DELETE /api/v1/keywords/:id Deletes the keyword from every item. 204

Stream items carry keywords: [{ id, name, weight, paused }], most wanted first. GET /api/v1/stream, /stream/new and POST /stream/read take keyword (an id) like tag (stream.md).

The SDK has keywords(), createKeyword(), updateKeyword(), mergeKeywords() and deleteKeyword(), and keyword on stream(), newItems() and markAllRead().

Costs

A paid stage, skipped while you’re over your monthly budget (costs.md). One short call per item: about 2,400 characters and up to 200 keywords in, a few words out. On a single-user instance a user stage costs what an item stage would. Settings → Costs shows its real cost per item.

Not yet

  • The gate’s interests could fall back to your keywords with a positive weight, as they fall back to tag names today.
  • Keywords in search: the full-text index has the title and the text, not the keywords.
  • Keywords for older items: only items that go through the pipeline get them. Run an item again in Executions to give it keywords.
  • The agent changing weights (SI-549).