in reply to Re^2: perl hooks for AI
in thread perl hooks for AI
The representation seems expensive to me...
If we were to store each float as a separate DB field, it would be rather expensive. This is why the AI::Embedding documentation suggests storing the vector as a string in a TEXT field. See the embedding method
Because the purpose of an embedding is to compare it with another embedding, the floats that make up the vector are dealt with as a single unit. Generally, we have no reason to access the individual components of the vector.
The vector comparison is carried out internally with Data::CosineSimilarity.
This compiles but gets lost in runtime:
From a cursory look, I'm not sure what to make of that error!
The problem is in a private method but I cannot recall where it's called from. I shall look into this further over the next few days when I've got a little more time...I'm on domestic duties, making the house look festive right now!
AI::Embedding is working in a production environment, so I am hopeful there isn't a fundamental problem with the module. But it shouldn't really thrown the error you are experiencing.
|
---|