Use the graphql package from github.com/weaviate/weaviate-go-client/v4/weaviate/graphql to construct queries via the fluent builder pattern.
import "github.com/weaviate/weaviate-go-client/v4/weaviate/graphql"
result, err := gql.Get().
WithNearVector(gql.NearVectorArgBuilder().WithVector(vector)).
WithClassName("Document").
WithFields(graphql.Field{Name: "text"}).
WithLimit(3).
Do(ctx)
This executes a GraphQL query against Weaviate to retrieve objects based on vector similarity.