Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After saving vecotr, Can not searchVector by Microsoft.SemanticKernel.Connectors.Weaviate. #10219

Open
liujiyuan opened this issue Jan 17, 2025 · 2 comments
Labels

Comments

@liujiyuan
Copy link

When I run the code belowed:
`// Placeholder embedding generation method.
async Task<ReadOnlyMemory> GenerateEmbeddingAsync(string textToVectorize)
{
// your logic here
}

// Generate a vector for your search text, using your chosen embedding generation implementation.
ReadOnlyMemory searchVector = await GenerateEmbeddingAsync("I'm looking for a hotel where customer happiness is the priority.");

// Do the search.
var searchResult = await collection.VectorizedSearchAsync(searchVector, new() { Top = 1 });

// Inspect the returned hotel.
await foreach (var record in searchResult.Results)
{
Console.WriteLine("Found hotel description: " + record.Record.Description);
Console.WriteLine("Found record score: " + record.Score);
}`

I get a error:
`Microsoft.Extensions.VectorData.VectorStoreOperationException : Error occurred during vector search. Response: {"errors":[{"locations":[{"column":5,"line":3}],"message":"Cannot query field "skhotels" on type "GetObjectsObj". Did you mean "Skhotels"?","path":null}]}

at Microsoft.SemanticKernel.Connectors.Weaviate.WeaviateVectorStoreRecordCollection1.VectorizedSearchAsync[TVector](TVector vector, VectorSearchOptions options, CancellationToken cancellationToken) ...... --- End of stack trace from previous location ---

@liujiyuan
Copy link
Author

@markwallace-microsoft Could you help me?

@liujiyuan
Copy link
Author

Is there a complete Weaviate example? Similar code works fine with Qdrant. There are issues with both Weaviate and Milvus. It's very simple to use with Python. Since there are already fewer developers using C#, this is incredibly frustrating; I've been struggling with this for several days now, and it should have been a simple task. Recently started an AI course, and the instructor initially used the semantic kernel framework too but gave up eventually. Does Microsoft care or not? If this continues, there will be fewer and fewer C# programmers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants