13

Hey guys! I built an AI powered file organizer! This was my first "big" Python project!

you are viewing a single comment's thread
view the rest of the comments
[-] RonSijm@programming.dev 6 points 23 hours ago

Also some feedback, a bit more technical, since I was trying to see how it works, more of a suggestion I suppose

It looks like you're looping through the documents and asking it for known tags, right? ({str(db.current_library.tags)}.)

I don't know if I would do this through a chat completion and a chat response, there are special functions for keyword-like searching, like embeddings. It's a lot faster, and also probably way cheaper, since you're paying barely anything for embeddings compared to chat tokens

So the common way to do something like this in AI would be to use Vectors and embeddings: https://platform.openai.com/docs/guides/embeddings

So - you'd ask for an embedding (A vector) for all your tags first. Then you ask for embeddings of your document.

Then you can do a Nearest Neighbor Search for the tags, and see how closely they match

[-] justzvan@lemmy.ml 1 points 22 hours ago

Cool! But one problem: I'm not using OpenAI. It supports Mistral, ollama and xtekky's gpt4free

[-] GBU_28@lemm.ee 2 points 22 hours ago

Embeddings are not unique to openai.

this post was submitted on 18 Nov 2024
13 points (66.7% liked)

Programming

17314 readers
111 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS