Vector embeddings with ChromaDB. Basically you pre compute the word embeddings of every row / table / whatever granularity you want and then stick that into a vector DB. Then you do an embedding computation of your query and compare similarity. You can either return the table / row / whatever you want that’s most similar (“semantic search”) or you use that as context for an LLM (“RAG”)
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
You could use something like https://huggingface.co/defog/sqlcoder-34b-alpha / https://github.com/defog-ai/sqlcoder however I haven’t used this one myself but it builds up on CodeLlama model so the quality should be good. I haven’t seen other models specifically for SQL queries yet.
Edit: it includes all the hardware requirements and some demo examples in the links
New Lemmy Post: Self hosted AI to train on an existing database (https://lemmy.world/post/9013086)
Tagging: #SelfHosted
(Replying in the OP of this thread (NOT THIS BOT!) will appear as a comment in the lemmy discussion.)
I am a FOSS bot. Check my README: https://github.com/db0/lemmy-tagginator/blob/main/README.md