SchemaValidator

org.llm4s.knowledgegraph.extraction.SchemaValidator

Validates an extracted graph against an ExtractionSchema.

Separates nodes and edges into conforming (valid) and non-conforming (out-of-schema) sets, and reports specific constraint violations such as relationship endpoint type mismatches.

Value parameters

schema

The extraction schema to validate against

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Validates the given graph against the schema.

Validates the given graph against the schema.

Nodes are checked against schema.entityTypes by label. Edges are checked against schema.relationshipTypes by relationship name, and optionally against source/target type constraints. Out-of-schema items are collected but may be retained in the final graph depending on schema.allowOutOfSchema.

Value parameters

graph

The graph to validate

Attributes

Returns

A ValidationResult with valid/invalid items separated