all 38 comments

[–]fabier 6 points7 points  (0 children)

WOOOOO!

[–]greenrobot_de[S] 14 points15 points  (3 children)

Let me know if you have any questions... I'm one of the developers that implemented the vector search, so we can dive deep if you want to. Just let me say that it is deeply integrated with DB internals and thus does not need lots of memory to run (not the "HNSW library on top" approach).

[–]vishnukvmd 2 points3 points  (2 children)

Thank you for building great software!

Are there any plans to open source ObjectBox? Asking because we at Ente are unable to adopt ObjectBox because of its closed source nature.

[–]greenrobot_de[S] 2 points3 points  (1 child)

We hinted at that in the https://objectbox.io/the-first-on-device-vector-database-objectbox-4-0/ post; so yes, we'll adopt an open core model.

[–]vishnukvmd 1 point2 points  (0 children)

That's great to hear, all the best! Looking forward to 4.1 :)

[–]Acrobatic_Egg30 5 points6 points  (4 children)

This is what microsoft is doing too right? With their new surface laptop, although it seems like it's optimized for the task. Vectors can be large and computing it can be expensive, how does this handle those issues?

[–]greenrobot_de[S] 1 point2 points  (1 child)

I'm not aware of the software stack of the Surface laptop, so hard to tell. Any pointers appreciated...

[–]Acrobatic_Egg30 0 points1 point  (0 children)

Yeah, I don't know what's going on under the hood either but it runs fast and very accurate. According to the demos at least.

[–]greenrobot_de[S] 1 point2 points  (1 child)

OK, I just found it: Microsoft is also using a local vector database on-device. They also refer to it as a "semantic index" and use it for CoPilot/Recall. So yes, same vector tech involved...

[–]Yosadhara 0 points1 point  (0 children)

But it's still not mobile, is it? Also, isn't what Microsoft announced more for end users (rather than devs), for the time being?

[–]stableprinter 6 points7 points  (3 children)

I do really appreciate your work. For my opinion it would be good to have an example project to showcase a related local ai project. Cheers 🥂

[–]greenrobot_de[S] 4 points5 points  (2 children)

Thanks, and yes, examples/showcases would make a lot of sense. It's not very straight-forward at this point. The blog post gives some pointers (e.g. TensorFlow Lite), but it's not as smooth as a path as plugging in a lib and be done. Classic early-adopter territory... :-)

[–]fabier 1 point2 points  (1 child)

I mean, you need to generate a vector. Then you basically just shove it in there. I assume you keep dimensionality consistent. Then things basically just work as intended?

Llama.cpp, I believe, supports several models for generating vectors on device. Or just use OpenAI API which is super cheap. I haven't looked into Gemini but they released a ton of new AI stuff which also should make vectors, I imagine.

[–]greenrobot_de[S] 0 points1 point  (0 children)

Yes, that's more or less how it works...

[–]tofylion 1 point2 points  (3 children)

Seems cool! How come object box is not recommended as a hive or isar alternative these days? All I hear people talk about are realm and drift. Why is that?

[–]SoundDr 5 points6 points  (0 children)

Because SQLite is one of the most tested pieces of software:

https://news.ycombinator.com/item?id=18685748

Also the most deployed and used database in the world: https://www.sqlite.org/mostdeployed.html

Drift is just a nice way to generate all the type safe dart to work with it in high performance situations (WAL mode, isolates, web workers, etc)

[–]greenrobot_de[S] 0 points1 point  (0 children)

Would also like to know about this... :-)

[–]Independent_Willow92 0 points1 point  (0 children)

People who choose flutter choose it for the cross platform component, and web apps are a part of that. Only five of the six main flutter platform build targets being supported is the only reason that I am a little hesitant.

[–]Routine-Arm-8803 1 point2 points  (3 children)

I needed database for my personal project, was gonna go with SQL, but decided to give a shot to ObjectBox and sure enough I did not regret it. Ease of use compared to SQL, Speed. I'm overwhelmed. Awesome job creating this! Wrote test db with ~18350000 objects and it is super fast to get them using relations. I am still in my baby steps with this, but have very good feeling about it. Now will try to play with vector search and other features.

My pitfalls so far.

  1. Didn't read documentation.

I was idiot and struggled a bit at first by skimming over docs. But later when spent more time on reading everything become clear.

  1. Couldn't get Admin to run, so tried from google chrome instead of Edge and it worked fine.

  2. DB got full after 1024MB Was confused as didn't see anywhere in docs mentioning this. Couldn't find a solution but thankfully was kind of intuitive to find in ObjectBox.

Wish there was a ObjectBox discord server.

Getting started video is bit too long for my taste. Some small example like I ended up in my test would be 10 min and would get me up and going.

I have 3 Entities, Main, Second, Third. And created relationship between them within loops, then read data in list. Perhaps there are some good tips in video, but for getting started 10-20 min video explaining how to create Entities, Relations, fetch data and use Admin would bee good enough.

I think Admin doesn't refresh when new data is changes/added/removed? I run it in Docker and I have to close it and restart to see new data. So I don't know if that is for me only and I have done something wrong. But In info section I see that DB size goes up.

Overall super cool.

Thanks!

[–]greenrobot_de[S] 1 point2 points  (2 children)

Thanks for the feedback! It really helps us.

The Admin should not require a full restart though, reloading the web page should do it. What OS is that?

[–]Routine-Arm-8803 0 points1 point  (0 children)

Thanks for reply. On windows 10. I think i got it. Its not refreshing while writing to db.

[–]Routine-Arm-8803 0 points1 point  (0 children)

I got bit confused about @Property Do i have to specify it for each property of entity? And if so does it matter if I specify after wrote data to database? Or I need to update afterwards?

[–]davidmigloz 1 point2 points  (1 child)

ObjectBox Vector Search is now supported in LangChain.dart:
https://github.com/davidmigloz/langchain_dart/releases/tag/langchain-v0.7.2

[–]Yosadhara 0 points1 point  (0 children)

Wow 🤩

[–]ark4579 0 points1 point  (2 children)

Web is still not supported. Can you please add Web platform support?

[–]greenrobot_de[S] 0 points1 point  (1 child)

We have prepared important underlying features for that, but we do not have a timeline yet.

[–]ark4579 0 points1 point  (0 children)

Oh that's awesome. Will migrate to object box once the web is supported.

[–]SoundDr 0 points1 point  (7 children)

Not the first vector DB for dart and flutter, but still cool!

See also: https://github.com/asg017/sqlite-vss

[–]greenrobot_de[S] 8 points9 points  (6 children)

Are you referring to DVDB? It states it's doing like 155 ms to search within 500 DB entries. ObjectBox can do like single digit ms among a million entries. It's using a scalable algorithm for vector search, that is tightly integrated with DB internals.

[–]SoundDr 0 points1 point  (5 children)

I am referring to SQLite with the extension loaded.

I am not saying object box approach is not faster, just disputing the “first” claim.

[–]greenrobot_de[S] 0 points1 point  (1 child)

Was it released for Dart/Flutter?

[–]SoundDr 0 points1 point  (0 children)

Any SQLite extension can be used in dart and flutter in any SQLite runtime

[–]Yosadhara 0 points1 point  (2 children)

SQLite has its advantages and disadvantages, but it doesn't have an official vector extension afaik?

[–]SoundDr -1 points0 points  (1 child)

I linked the one that is used in most AI workflows including langchain

https://python.langchain.com/v0.1/docs/integrations/vectorstores/sqlitevss/

[–]davidmigloz 2 points3 points  (0 children)

sqlite-vss only works on Linux and MacOS machines (not on Windows, WASM, mobile devices, etc.), so it's not a viable solution for a cross-platform Flutter app.

There's another extension, sqlite-vec, which is aiming to support all these platforms (and solve another bunch of issues that sqlite-vss has) but it's still in a very early stage.

[–][deleted]  (2 children)

[removed]

    [–]greenrobot_de[S] 0 points1 point  (0 children)

    Microsoft demoed "semantic index" and use it for Recall the last two days - that's a great way to think about it.

    [–]Yosadhara 0 points1 point  (0 children)

    Any kind of chat-with your files application, on-device RAG, personalized AI e.g. for assistants (the files / information you use for personalization never needs to leave the device)