4 ms·
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 functionalit
by quartz 3y ago
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 https://github.com/supabase/supabase/pull/12056
- nunodonato 3y agothats 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
- quartz 3y agoRight?! 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.
- nunodonato 3y agothats the whole fun of being able to code :)
- mhalle 3y agoI 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?
- quartz 3y agoJust 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.
- turnsout 3y agoI'm curious if you're using an off-device API to generate these embeddings, and if you're searching on-device?
- Beefin 3y agogood question, has anyone ported HNSW for objective C?
- mbrochh 3y agoI'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?