CMDCRAGArcana.Graph.Profile (cmdc_rag_arcana v0.5.0)

Copy Markdown View Source

GraphRAG collection profile。

Profile 描述某类 collection 是否启用 GraphRAG,以及运行时需要哪些图能力。 企业平台通过 profile 把合同、制度、设备关系、供应链关系等强实体关系场景 与普通 RAG collection 区分开。

Summary

Functions

内置 GraphRAG profiles。

判断 profile 是否启用 GraphRAG。

构建并校验 profile。

转换为稳定 map。

Types

mode()

@type mode() :: :plain_rag | :entity_graph | :relationship_graph | :community_graph

t()

@type t() :: %CMDCRAGArcana.Graph.Profile{
  evidence_limit: pos_integer(),
  graph_enabled?: boolean(),
  id: String.t(),
  metadata: map(),
  mode: mode(),
  name: String.t() | nil,
  requires_communities?: boolean(),
  requires_entity_embeddings?: boolean(),
  requires_llm?: boolean(),
  requires_relationships?: boolean()
}

Functions

builtins()

@spec builtins() :: [t()]

内置 GraphRAG profiles。

graph_enabled?(profile)

@spec graph_enabled?(t()) :: boolean()

判断 profile 是否启用 GraphRAG。

new!(profile)

@spec new!(t() | keyword() | map()) :: t()

构建并校验 profile。

to_map(profile)

@spec to_map(t()) :: map()

转换为稳定 map。