LlmPropositionExtractor

constructor(llmOptions: <Error class: unknown class>, ai: <Error class: unknown class>, template: String = "dice/extract_propositions", examples: List<<Error class: unknown class><PropositionsResult>> = emptyList(), schemaAdherence: SchemaAdherence = SchemaAdherence.DEFAULT, existingPropositionsToShow: Int = 100, propositionRepository: PropositionRepository? = null, perspective: ExtractionPerspective = ExtractionPerspective.ALL)

Parameters

llmOptions

LLM configuration

ai

AI service for LLM calls

template

Template name for proposition extraction. Unless the TemplateResolver in use has been customized, this will be the path to a Jinja template under /src/main/resources/prompts. The templates should expect an object of type TemplateModel as input with name "model". The default is "dice/extract_propositions". Users can override this or use it as an example for a custom template.

examples

Optional list of examples for few-shot prompting.

schemaAdherence

Configuration for how strictly to adhere to the schema for entities and predicates.

existingPropositionsToShow

Number of existing propositions to show in the prompt.

propositionRepository

Optional repository to fetch existing propositions from. When provided, existing propositions for the context will be included in the prompt to help the LLM avoid duplicates and maintain consistency.

perspective

Controls whose perspective propositions are extracted from. See ExtractionPerspective.