You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First time here. Looking for ways to contribute. Also, I'm not that familiar with embeddings. I know the basics, but do let me know if what I'm saying isn't feasible. Or just plain doesn't work.
At the moment, vectorSearch only takes a query string which is itself converted into an embedding. Would it make sense to allow embedding search instead of only string, at least for internal uses (I can see why passing a vector in a REST call may not be the best). So maybe a query type like this:
typeQuery=string|ReturnType<EmbedQueryFn>
And instead of:
constqueryEmbedding=await(async()=>{constqE=awaitpoolConfig.embeddingConfig.queryFn(query)returnArray.isArray(qE) ? qE : Array.from(qE)})()
We have:
constqueryEmbedding=Array.isArray(query)
? awaitquery
: await(async()=>{constqE=awaitpoolConfig.embeddingConfig.queryFn(query)returnArray.isArray(qE) ? qE : Array.from(qE)})()
We could even allow passing an embedding ID altogether since knowledge pools are collections themselves, so retrieving a document within the vector search would fall under their scope. Although, we would need to expose a getEmbedding function to make the process easier.
Hello @techiejd,
Note
First time here. Looking for ways to contribute. Also, I'm not that familiar with embeddings. I know the basics, but do let me know if what I'm saying isn't feasible. Or just plain doesn't work.
At the moment, vectorSearch only takes a
querystring which is itself converted into an embedding. Would it make sense to allow embedding search instead of only string, at least for internal uses (I can see why passing a vector in a REST call may not be the best). So maybe a query type like this:And instead of:
We have:
We could even allow passing an embedding ID altogether since knowledge pools are collections themselves, so retrieving a document within the vector search would fall under their scope. Although, we would need to expose a
getEmbeddingfunction to make the process easier.Let me know your thoughts!