-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat]: RAG support #60
Comments
Do you have any ideas for implementing this? I thought it can maybe something like sqlite with vector embedding addon. |
I'm not sure a full-fledged database is necessary. IMO just a JSON object that has values as float vectors. Also it would require the user to install the |
Hello would love to collaborate. I was looking at vector db approach and found this. The article is for javascript and transformers.js but I believe it can be done in a similar manner with react native and llama.rn . llama.rn does have an embeddings function. We can connect over a call to discuss further. |
Sure thing. Those both seem like good options. |
You can try this method: |
Hey there, this is actually something which I've already done in ChatterUI under the hood alongside expo-sqlite with the sqlite-vec plugin, so I can say for certain its 100% possible to be done in react-native (you might want to instead use a non-expo library like op-sqlite). For android, all you need to do is compile the plugin for the 4 common ABIs and have them in your source files, then patch or fork the sqlite library you are using to accept said plugin. Same goes for Swift, but it needs to be compiled to the correct objc or whatever source format iOS uses. The issue however (and why I have not added RAG to mainline ChatterUI) is that small embedding models kinda suck. They barely retrieve the right information and are unreliable for anything beyond the most basic query. Embedding performance also isn't that amazing. |
Description
Add a simple vectorDB rag to enhance memory.
Use Case
It would be possible to retrieve information from outside of the context window
The text was updated successfully, but these errors were encountered: