Skip to content

Commit

Permalink
use autocut and certainty in recommending
Browse files Browse the repository at this point in the history
  • Loading branch information
Southclaws committed Jul 3, 2024
1 parent 8529f57 commit 8779e90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/services/semdex/weaviate/recommend.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (w *weaviateSemdexer) Recommend(ctx context.Context, object datagraph.Index

withNearVector := w.wc.GraphQL().NearVectorArgBuilder().
WithVector(wobj.Vector).
WithDistance(0.5)
WithCertainty(0.5)

fields := []graphql.Field{
{Name: "datagraph_id"},
Expand All @@ -43,6 +43,7 @@ func (w *weaviateSemdexer) Recommend(ctx context.Context, object datagraph.Index
WithClassName(w.cn.String()).
WithFields(fields...).
WithNearVector(withNearVector).
WithAutocut(2).
WithLimit(10).
Do(ctx)
if err != nil {
Expand Down

0 comments on commit 8779e90

Please sign in to comment.