Embed by format, not type: link facets stay out of the recall vector - #21
Draft
tieguy wants to merge 1 commit into
Draft
Embed by format, not type: link facets stay out of the recall vector#21tieguy wants to merge 1 commit into
tieguy wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
buildEmbedTextpicks facets by storage type (eg text), which predates the format palette — so a facet I've explicitly markedformat: linkstill 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), andbuildEmbedTextconsults that instead of the type list. Unformatted facets behave exactly as before;linkdrops out of the vector but stays findable viasearch. 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