Skip to content

Embed by format, not type: link facets stay out of the recall vector - #21

Draft
tieguy wants to merge 1 commit into
daniloc:mainfrom
tieguy:embed-by-format
Draft

Embed by format, not type: link facets stay out of the recall vector#21
tieguy wants to merge 1 commit into
daniloc:mainfrom
tieguy:embed-by-format

Conversation

@tieguy

@tieguy tieguy commented Aug 11, 2026

Copy link
Copy Markdown

I was looking into initial setup of my first memories, and my bot pointed out that links eat into the 2000 character embedded text budget, which seemed odd.

Digging in: buildEmbedText picks facets by storage type (eg text), which predates the format palette — so a facet I've explicitly marked format: link still gets its URL concatenated into the embed text. That's counterintuitive twice over: I've already told the system this value is an address (so technically text, but not language), and because embed text is capped at 2000 chars, a few long URLs can crowd actual prose out of the vector entirely — the facet I marked as "not really text" ends up displacing the text that makes the entry findable. In other words, a Gmail permalink (my first instinct of what to link for my oldest archives) isn't prose; it dilutes the vector and spends embed budget saying nothing.

Proposed fix: formats now declare whether they carry prose (embed, required so new formats can't skip the question), and buildEmbedText consults that instead of the type list. Unformatted facets behave exactly as before; link drops out of the vector but stays findable via search. Tests + ratchets green.

Does this make sense? I probed as much as I could but not sure it fits your vision.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Rf5RTB7iigiMpoArYzdUKN

buildEmbedText selected facets by storage type (text/select), which
predates the format palette — so a facet explicitly declared format:link
still fed its URL into the prime embedding, diluting the vector and
spending the 2000-char embed budget on an address rather than prose.

FormatType gains a required `embed` flag (satisfies makes an unclassified
new format a compile error) and buildEmbedText derives inclusion from the
facet's intrinsic format instead of re-listing types. Unformatted facets
resolve through the type defaults and behave exactly as before; link
drops out of the vector but stays findable via search, which scans
type='text' regardless of format. View overrides are not consulted:
presentation must not change what an entry means.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rf5RTB7iigiMpoArYzdUKN
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