Class RagEngine
Provides the core functionalities required for Retrieval Augmented Generation (RAG) within a data processing system.
public sealed class RagEngine
- Inheritance
-
RagEngine
- Inherited Members
Constructors
- RagEngine(LM)
Initializes a new instance of the RagEngine class using a specified model for embedding generation.
Properties
- DataSources
Gets a read-only collection of DataSource objects that represent the imported content repositories used for retrieval operations.
Methods
- AddDataSource(DataSource)
Registers a new DataSource repository with this instance, enabling it for retrieval operations.
- AddDataSources(IEnumerable<DataSource>)
Registers a collection of new DataSource repositories with this instance.
- ClearDataSources()
Removes all DataSource objects managed by this instance, leaving no registered data sources.
- FindMatchingPartitions(string, int, float, bool, CancellationToken)
Initiates a search operation to find similarities within the text entries contained in all registered DataSource objects.
- FindMatchingPartitionsAsync(string, int, float, bool, CancellationToken)
Asynchronously initiates a search operation to find similarities within the text entries in all registered DataSource objects.
- ImportText(IList<string>, TextChunking, string, IList<string>, CancellationToken)
Imports an array of text data into a specified DataSource object, dynamically creating new Section entries for each item.
- ImportText(string, TextChunking, string, string, CancellationToken)
Imports text data into a specified DataSource object, creating a new or updating an existing Section entry.
- ImportTextFromFile(string, Encoding, TextChunking, string, string, CancellationToken)
Imports text data from a file into a specified DataSource object, creating a new or updating an existing Section entry.
- QueryPartitions(string, IEnumerable<TextPartitionSimilarity>, IConversation, CancellationToken)
Generates a text result by querying specified text partitions and initiating a conversation within the provided chat context.
- QueryPartitionsAsync(string, IEnumerable<TextPartitionSimilarity>, IConversation, CancellationToken)
Asynchronously generates a text result by querying specified text partitions within the provided chat context.
- RemoveDataSource(DataSource)
Attempts to remove a specified DataSource from management. Returns true if removed, false otherwise.