News for hackers. Stuff that matters.
Re:Embeddings: What they are and why they matter by quartz on Wednesday October 25, 2023 @12:09AM (#38009039)
This is a great zero to one reference.

I built my own note taking ios app a little while back and adding embeddings to my existing fulltext search functionality was 1) surprisingly easy and 2) way more powerful than I initially expected.

I knew it would work for things like if I search for "dog" I'll also get notes that say "canine", but I didn't originally realize until I played around with it that if I search for something like "pets I might like" I'll get all kinds of notes I've taken regarding various animals with positive sentiment.

It was the first big aha moment for me.

At the time I found Supabase's PR for their DocsGPT really helpful for example code: https://github.com/supabase/supabase/pull/12056

Re:Embeddings: What they are and why they matter by nunodonato on Wednesday October 25, 2023 @06:55AM (#38011452)
thats awesome! I'm building my own simple note-taking app powered by embeddings as well, finally I dont loose stuff and its easy to find :D
Re:Embeddings: What they are and why they matter by quartz on Wednesday October 25, 2023 @08:18AM (#38011997)
Right?! Everyone thought I was crazy to do this vs using something off the shelf but having total control over my notes app has been incredible.

I can tailor everything to my style of note taking vs dealing with the lowest common denominator feature set that tries to enable tons of use cases that I don’t need.

Re:Embeddings: What they are and why they matter by nunodonato on Wednesday October 25, 2023 @05:46PM (#38018829)
thats the whole fun of being able to code :)
Re:Embeddings: What they are and why they matter by mhalle on Wednesday October 25, 2023 @07:14AM (#38011574)
I think your statement "adding to existing fulltext functionality" is subtly important: embeddings provide semantic search that complements traditional search algorithms.

Specifically, many applications are heavily dependent on names or other proper nouns, often without much context. You might refer to your dog by name without explanation, and a particular embedding might not pick that up. Proper names (people, places, street names) may have outsized importance for anchoring personalized or domain-specific search, but modest generic language models won't know about them.

Is there a specific way of dealing with this problem?

Re:Embeddings: What they are and why they matter by quartz on Wednesday October 25, 2023 @08:05AM (#38011888)
Just spitballing here but you could maybe do a 1-deep depth search… dot product on the initial search and also dot product on the highest confidence matched notes, then some filtering.

So if you have notes that associate the name to your dog, and you search for “my dog”, you’d still find those related notes?

Would require some experimentation but wouldn’t be surprised if that worked decently well out of the gate.

Re:Embeddings: What they are and why they matter by turnsout on Wednesday October 25, 2023 @12:46PM (#38014820)
I'm curious if you're using an off-device API to generate these embeddings, and if you're searching on-device?
Re:Embeddings: What they are and why they matter by Beefin on Wednesday October 25, 2023 @02:24PM (#38016329)
good question, has anyone ported HNSW for objective C?
Re:Embeddings: What they are and why they matter by mbrochh on Wednesday October 25, 2023 @10:30PM (#38021007)
I'm working on something like this for my logseq notes as well.

My biggest question right now is: How much text should I turn into one embedding?

Every sentence?

A whole block of sentences that belong to one entire page in my notes app?