Feel-ix-343 / markdown-oxide

Editor Agnostic PKM: you bring the text editor and we bring the PKM - inspired by and compatible with Obsidian
GNU General Public License v3.0
684 stars 10 forks source link

Contextual completions #107

Open Feel-ix-343 opened 1 month ago

Feel-ix-343 commented 1 month ago

Interpret the context around a wikilink using vector database when giving link completions. This could be: give completions on an empty input by finding entities related to the context and another feature, use a relatedness metric in the completion fuzzy finding ranking algorithm.

RyanGreenup commented 1 month ago

Somewhat related is:

We could find related entries by using something like tantivy or even Bert (There is a crate).

But both require indexing which is going to require user intervention (and in the case of Bert weights + torch).

Would this be outside scope for an LSP though? Generally speaking, it's not too hard to write a script that pulls some context from the clipboard and then suggests links, one can just pipe that to fzf / dmenu.

If time permits, I'll write up a minimum working example in Python.

Actually just look at this example I use instead of search:

https://gitlab.com/RyanGreenup/dotfiles/-/blob/main/.local/scripts/python/notes/search__semantic.py?ref_type=heads

Feel-ix-343 commented 1 month ago

Hey that sounds great!

Would this be outside scope for an LSP though?

Well I would say that this is not an LSP, but a true PKM that uses the LSP to make things happen in your favorite text editor. Editor specific plugins are also in scope as long as they are implemented across editors.

Therefore, if an LLM would aid in the PKM experience, then it is in scope