Location>code7788 >text

SimpleRAG: A simple RAG application based on WPF and Semantic Kernel.

Popularity:285 ℃/2024-08-19 17:21:25

Introduction to SimpleRAG

SimpleRAG is based on WPF and Semantic Kernel implementation of a simple RAG application , can be used to learn and understand how to use Semantic Kernel to build RAG applications .

GitHub Address:/Ming-jiayou/SimpleRAG

Key Features

AI chat

Supports all large language models compatible with the OpenAI format:

image-20240819163701855

Text embedding

Supports all embedded models compatible with the OpenAI format:

image-20240819163900106

Simple RAG Answers

Simple RAG answer effect:

image-20240819164221306

Contrast this with responses that do not use a RAG:

image-20240819164322893

Build from source

git clone to local and open the file:

image-20240819164816557

As shown below:

image-20240819164844061

ChatAI is used to configure the dialog model, Embedding is used to configure the embedding model, and TextChunker is used to configure the document slice size.

Still using SiliconCloud as an example, just fill in your api key and change the filename to, or create a new one.

The configuration is completed as shown below:

image-20240819165255285

IDE:VS2022

NET version: .NET 8

Open the solution and the project structure is shown below:

image-20240819165459846

Run the program:

image-20240819165551772

Test AI Chat:

image-20240819165652624

Test Embedding:

image-20240819165803024

The vectors are saved using Sqlite, which can be found in the Debug folder:

image-20240819165854807

Open this database as shown below:

image-20240819170059576

Test RAG Answer:

image-20240819170128226

Other configurations

You are also free to make other configurations, such as using dialog models in Ollama with embedded models for local offline scenarios, configuring other online dialog models, using embedded models in local Ollama, and so on.

ultimate

If it helps you, a star✨ is the biggest support 😊.

If you've read this guide and are still experiencing problems, feel free to contact me through the public:

qrcode_for_gh_eb0908859e11_344