KnowledgeGraphOptions

Options & Configuration · AiDotNet.RetrievalAugmentedGeneration.Graph

Configuration options for advanced knowledge graph capabilities including embeddings, community detection, link prediction, temporal queries, and KG construction.

For Beginners

After setting up your knowledge graph via ConfigureRetrievalAugmentedGeneration(), use ConfigureKnowledgeGraph() to enable advanced features:

  • Train embeddings to enable link prediction and entity similarity
  • Detect communities for global search capabilities
  • Enable temporal queries for time-aware reasoning
  • Construct a KG automatically from text input

How It Works

These options are separate from ConfigureRetrievalAugmentedGeneration(), which handles low-level plumbing (IGraphStore, KnowledgeGraph, HybridGraphRetriever). This class configures higher-level features built on top of the existing infrastructure.

Constructors

Constructor Summary
KnowledgeGraphOptions()

Properties

Property Summary
GraphRAGMode? GraphRAGMode { get; set; } GraphRAG retrieval mode.
GraphRAGOptions GraphRAGOptions { get; set; } Options for GraphRAG retrieval.
KGConstructionOptions ConstructionOptions { get; set; } Options for KG construction from text.
KGEmbeddingOptions EmbeddingOptions { get; set; } Options for embedding model training.
KGEmbeddingType? EmbeddingType { get; set; } Type of embedding model to use.
List<string> ConstructionTexts { get; set; } Text documents to construct the knowledge graph from.
bool? EnableLinkPrediction { get; set; } Whether to enable link prediction.
bool? TrainEmbeddings { get; set; } Whether to train knowledge graph embeddings.
double? LinkPredictionTestFraction { get; set; } Fraction of edges to hold out for link prediction evaluation.
int? LinkPredictionMaxTestEdges { get; set; } Maximum number of test edges for link prediction evaluation.