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
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article