ExtractionSchema

org.llm4s.knowledgegraph.extraction.ExtractionSchema
See theExtractionSchema companion object
case class ExtractionSchema(entityTypes: Seq[EntityTypeDefinition], relationshipTypes: Seq[RelationshipTypeDefinition], allowOutOfSchema: Boolean)

Schema for guided knowledge graph extraction.

When provided to an extractor, the LLM prompt is constrained to these types and extracted results are validated against the schema. If allowOutOfSchema is true, entities and relationships outside the schema are preserved but flagged.

Value parameters

allowOutOfSchema

If true, out-of-schema entities/relationships are kept; if false, they are dropped

entityTypes

Expected entity type definitions

relationshipTypes

Expected relationship type definitions

Attributes

Companion
object
Source
ExtractionSchema.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

All entity type names defined in this schema.

All entity type names defined in this schema.

Attributes

Source
ExtractionSchema.scala

Looks up an entity type definition by name (case-insensitive).

Looks up an entity type definition by name (case-insensitive).

Attributes

Source
ExtractionSchema.scala

Looks up a relationship type definition by name (case-insensitive).

Looks up a relationship type definition by name (case-insensitive).

Attributes

Source
ExtractionSchema.scala

All relationship type names defined in this schema.

All relationship type names defined in this schema.

Attributes

Source
ExtractionSchema.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product