Table of Contents

Constructor RagEngine

Namespace
LMKit.Retrieval
Assembly
LM-Kit.NET.dll

RagEngine(LM)

Initializes a new instance of the RagEngine class using a specified model for embedding generation.

public RagEngine(LM embeddingModel)

Parameters

embeddingModel LM

An LM object specifying the embeddings model.

Examples

using LMKit.Model;
using LMKit.Retrieval;
using System;

class Example
{
    static void Main()
    {
        // Create an embedding model from a URI
        LM embeddingModel = new LM(new Uri("https://huggingface.co/lm-kit/bge-m3-gguf/resolve/main/bge-m3-Q4_K_M.gguf"));

        RagEngine ragEngine = new RagEngine(embeddingModel);
        Console.WriteLine("RagEngine created successfully.");
    }
}

Exceptions

ArgumentNullException

Thrown if embeddingModel is null.