jkomoros / card-web

The web app behind thecompendium.cards
Apache License 2.0
46 stars 8 forks source link

A tool to incrementally improve the corpus when riffling through #670

Open jkomoros opened 9 months ago

jkomoros commented 9 months ago

One of the key things for a personal knowledge graph is encouraging you to riffle through it regularly. Zettlekasten does this naturally when you riffle through the cards to figure out where to file a new one.

The riffling both helps you remember and be inspired by old thoughts, but also incrementally improve the corpus ("oh actually this should have this concept tag added").

Card Web doesn't currently reward riffling through the card base very often. In very large card bases, it can be even a little bit stressful because you can see all of the duplication and things that should be interlinked but aren't.

There should be a mode or screen where spending a few minutes in it will help you riffle through random cards and also clean up your card web just a bit, with little, easy-to-action and not-a-big-deal-if-they're-wrong suggestions

Tasks that could make sense in such a mode:

One way to do this is to randomly pick a key card (perhaps with some ranking criteria like last-seen or card-rank) and then running a lot of task-suggestors to it. Another approach is to run task-suggestors to find the most relevant/important tasks and key around that.

In any case we'll want some kind of generalized system of recipes that can suggest possible edits (often in the form of "add a see-also link from abc3 to cdfe3") some of which might get quite complex and even rely on AI. For some of the more complex/expensive ones you could even imagine running them as an offline job and proactively suggesting them. The UI would need to be able to show each of these kinds of tasks with enough information for the user to actiion them (e.g. possibly showing other similar cards to give the user some context).

Maybe each action has things like:

Each action type has:

Generating these tweaks might be a somewhat expensive process, so while the mode is active it should probably be chewing away at suggesting new things to add to the end of the suggestion queue so once you accept one there's another one immediately (although there's the unlikely event that one is invalidated based on the approval/rejection of an earlier one)

Take a key card (sampled by some ranking distribution) and suggest a few actions. Then throw them into the ranking pot. Suggest the highest ranked action as next riffle. (Passive mode)

And then also a mode of “show me all actions for this current key card” (active mode)

Suggestions should be able to me modified, perhaps significantly, so they run the gamut from "just accept this thing" to "here's a thought starter"

The UI should be a card-editor that only shows the controls in the current suggestion, but where hte user can call up the full controls if they want

Conceptually related issues include #507 and #280 and #651

Verify: For things like see-also, if one card adds it to another card (so it's inbound for another card) does it also show up in the "see also" section?

One of the suggestors should look for see-also/dupe cards. Look for cards that have high similarity score and also were created within a few weeks of each other. The one that is primary vs dupe is based on a weighted function of: 1) which one is prioritized vs not, 2) which one is longer vs not, 3) which one is more recent, 4) which one an LLM judges as more polished / complete

Another one looks at cliques of see-also cards and then summarizes all of them into a new distilled card automatically.

What should the UI look like? Its primary purpose should be to riffle through a random card for spaced repetition style use cases. But it should also have the proposed actions on the side to be visible.

When you're viewing a proposed modification, you'll need a new UI anyway. It would have the primary card (s) at the top in a mostly-normal-size stage, and then the secondary cards below that in a horizontal card-drawer, and then the context cards below that (or taking over the collection in the left rail?). And then it would have a open editor button that opens the full normal editor with that card-diff loaded up... and when you're done would come back to the riffle screen.

The default UI would be just a section at the bottom of the info panel (below comments?). But there should also be a way to navigate to next proposed tweak, and stay in the tweak viewer. Maybe by default it goes into a "Save and next", but there's also an exit.

When an action is accepted or discarded, we should keep track of that in the card update. modifyCardWithBatch should take an updateInfo which includes {substantive: bool, actionCreator: 'manual' | ActionCreatorType, actionModified:boolean}

There needs to be a way for one of the action creators ("tweak creators"?) to ask for similar cards, and specify that it wants the real similarity from the server, not tfidf based.

Add a tweaks configurable filter, which includes cards that have tweaks proposed and ranks them by how high quality they are. Using that filter kicks off a process to suggest tweaks, and will keep on adding cards + tweaks to it. Each time you accept or reject a tweak it's removed from the set (which might remove the whole card if no more are left) and then then "next" action goes to the first card in the list. (This could get annoying if you've ignored a few tweaks; you want to be able to come back to them but also don't want to only see them).

Only generate tweaks if the tweaks filter is active and the user has general edit cards ability, or the user has editing ability on the current card, when it's suggesting tweaks for this card.

jkomoros commented 8 months ago