This project is inspired by Stephen Toub's blog post on building a simple console-based .NET chat application using semantic-kernel. Unlike the original examples that utilize OpenAI, this project aims to integrate Microsoft Phi 3 and the Nomic embedding model, showcasing my journey in adapting the examples with these technologies. The initial examples were successfully recreated using the Semantic Kernel Hugging Face plugin. However, I encountered challenges with the RAG example, leading to a Stack Overflow question and eventually finding a solution in Bruno Capuano's blog post. I also added Bruno's example to the program.
To get started, ensure all NuGet packages are downloaded. This project was tested with a local server in LM Studio, running a "Microsoft Phi-3 mini 4k instruct q4 3b Q_K_M gguf" large language model alongside the "nomic embed text v1 5 Q8_0 gguf" model for local text embedding.
Somebody suggested I should use a local model with ONNX Stack Overflow question. So I also created the same examples but now with the ONNX models. The example is created with the help of this example on microsoft's semantic kernel github page.
A notable experiment involves the use of the Qdrant vector database, which is currently not operational. When addding information to the vector database I get an error from the Microsoft.SemanticKernel.Connectors.Qdrant package: "Response status code does not indicate success: 400 (Bad Request)". Contributions to resolve this issue are highly welcomed.
The sample can be configured by using the command line with .NET Secret Manager to avoid the risk of leaking secrets into the repository, branches and pull requests.
dotnet user-secrets set "Onnx:ModelId" ".. Onnx model id" (default: phi-3)
dotnet user-secrets set "Onnx:ModelPath" ".. your Onnx model folder path .."
dotnet user-secrets set "Onnx:EmbeddingModelPath" ".. your Onnx model file path .."
dotnet user-secrets set "Onnx:EmbeddingVocabPath" ".. your Onnx model vocab file path .."
If you have suggestions for improving the Qdrant vector database integration or any other aspect of the project, please feel free to contribute. Your insights and pull requests are welcome.
C#
100.0%
This project is inspired by Stephen Toub's blog post on building a simple console-based .NET chat application using semantic-kernel. Unlike the original examples that utilize OpenAI, this project aims to integrate Microsoft Phi 3 and the Nomic embedding model, showcasing my journey in adapting the examples with these technologies. The initial examples were successfully recreated using the Semantic Kernel Hugging Face plugin. However, I encountered challenges with the RAG example, leading to a Stack Overflow question and eventually finding a solution in Bruno Capuano's blog post. I also added Bruno's example to the program.
To get started, ensure all NuGet packages are downloaded. This project was tested with a local server in LM Studio, running a "Microsoft Phi-3 mini 4k instruct q4 3b Q_K_M gguf" large language model alongside the "nomic embed text v1 5 Q8_0 gguf" model for local text embedding.
Somebody suggested I should use a local model with ONNX Stack Overflow question. So I also created the same examples but now with the ONNX models. The example is created with the help of this example on microsoft's semantic kernel github page.
A notable experiment involves the use of the Qdrant vector database, which is currently not operational. When addding information to the vector database I get an error from the Microsoft.SemanticKernel.Connectors.Qdrant package: "Response status code does not indicate success: 400 (Bad Request)". Contributions to resolve this issue are highly welcomed.
The sample can be configured by using the command line with .NET Secret Manager to avoid the risk of leaking secrets into the repository, branches and pull requests.
dotnet user-secrets set "Onnx:ModelId" ".. Onnx model id" (default: phi-3)
dotnet user-secrets set "Onnx:ModelPath" ".. your Onnx model folder path .."
dotnet user-secrets set "Onnx:EmbeddingModelPath" ".. your Onnx model file path .."
dotnet user-secrets set "Onnx:EmbeddingVocabPath" ".. your Onnx model vocab file path .."
If you have suggestions for improving the Qdrant vector database integration or any other aspect of the project, please feel free to contribute. Your insights and pull requests are welcome.
C#
100.0%