Show / Hide Table of Contents

Class WMNativeVectorDB

The VectorDB implementation that makes use of the VectorIndices and ContextEmbedding rows in the database.

Inheritance
object
WMNativeVectorDB
Implements
IVectorDB
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.Asset.LLM.VectorDB
Assembly: WMServer.dll
Syntax
public class WMNativeVectorDB : IVectorDB

Constructors

WMNativeVectorDB(WMLLM)

Standard constructor

Declaration
public WMNativeVectorDB(WMLLM LLM)
Parameters
Type Name Description
WMLLM LLM

The LLM record behind this WMNativeVectorDB

Properties

LLMData

The WMLLM object containing the metadata for IVectorDB derived classes.

Declaration
public WMLLM LLMData { get; set; }
Property Value
Type Description
WMLLM

Methods

GetSimilarEmbeddings(WMPrincipal, string, float, int, WMAppDbContext)

Returns a list of text fragments similar in context to the supplied source text.

Declaration
public Task<List<string>> GetSimilarEmbeddings(WMPrincipal principal, string source, float threshold, int maxRecords, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal
string source

The message to search for contextually similar text.

float threshold

A number between -1 and 1 indicating how similar the embedding should be. (1 for identical, 0 for opposite)

int maxRecords

The highest number of records that should be returned.

WMAppDbContext context
Returns
Type Description
Task<List<string>>

Insert(WMPrincipal, string, string, WMAppDbContext)

Inserts the text from a WMDocument to the vectorDB.

Declaration
public Task Insert(WMPrincipal principal, string DocumentIndexDir, string documentDir, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal
string DocumentIndexDir

The Dir or ID of the vector DB.

string documentDir

The ID/Dir of the document to insert.

WMAppDbContext context
Returns
Type Description
Task
Exceptions
Type Condition
Exception

Remove(WMPrincipal, string, string, WMAppDbContext)

Inserts the text from a WMDocument from the vectorDB.

Declaration
public Task Remove(WMPrincipal principal, string DocumentIndexDir, string documentDir, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal
string DocumentIndexDir

The Dir or ID of the vector DB.

string documentDir

The ID/Dir of the document to remove.

WMAppDbContext context
Returns
Type Description
Task
Exceptions
Type Condition
Exception

Implements

IVectorDB
In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 1/15/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE