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
.Net: Bug: When using ChatCompletionAgent and the locally deployed llama3.2:3b model, the user's Chinese question became garbled in the function call parameters.
#12103
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.
Describe the bug
Framework: Microsoft Semantic Kernel 1.49.0
I am testing ChatCompletionAgent with a locally deployed llama3.2:3b to query a knowledge base with data in Chinese via a text search plugin. When a user asks a question in Chinese, the agent can invoke the text search plugin, but with a garbled Chinese text, causing the search to fail. Please see the screenshot below:
Screenshots
I attach part of my code below:
kernelBuilder.Services.AddOllamaChatCompletion(
modelId: LLMConfig.Instance.ConfigModel.ModelId,
endpoint: new Uri(LLMConfig.Instance.ConfigModel.ApiEndpoint)
);
var textEmbeddingGeneration = vectorStoreFixture.TextEmbeddingGenerationService;
var vectorSearch = vectorStoreFixture.VectorStoreRecordCollection;
var customVectorSearch = new CustomVectorSearch(vectorSearch, threshold);
// Create a text search instance using the InMemory vector store.
var textSearch = new VectorStoreTextSearch<VectorRecordModel>(
customVectorSearch,
textEmbeddingGeneration);
var searchPlugin = KernelPluginFactory.CreateFromFunctions(
pluginName, description,
[textSearch.CreateGetTextSearchResults(searchOptions: searchOptions)]);
kernel.Plugins.Add(searchPlugin);
var kernel = kernelBuilder.Build();
ChatCompletionAgent faqAgent =
new()
{
Name = "SearchFAQAgent",
Instructions = LLMConfig.Instance.ConfigModel.Instructions,
Kernel = kernel,
Arguments =
new KernelArguments(new OllamaPromptExecutionSettings()
{
FunctionChoiceBehavior = FunctionChoiceBehavior.Auto()
})
};
`
Platform
Language: [C#]
AI model: [llama3.2:3b]
IDE: [Visual Studio]
OS: [Windows]
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Bug: When using ChatCompletionAgent and the locally deployed llama3.2:3b model, the user's Chinese question became garbled in the function call parameters.
.Net: Bug: When using ChatCompletionAgent and the locally deployed llama3.2:3b model, the user's Chinese question became garbled in the function call parameters.
May 16, 2025
Describe the bug
Framework: Microsoft Semantic Kernel 1.49.0
I am testing ChatCompletionAgent with a locally deployed llama3.2:3b to query a knowledge base with data in Chinese via a text search plugin. When a user asks a question in Chinese, the agent can invoke the text search plugin, but with a garbled Chinese text, causing the search to fail. Please see the screenshot below:
Screenshots
I attach part of my code below:
`
Platform
The text was updated successfully, but these errors were encountered: