Llm Oracle
class LlmOracle(ai: <Error class: unknown class>, prologResult: PrologProjectionResult, prologSchema: PrologSchema, propositionRepository: PropositionRepository? = null, entityNames: Map<String, String> = emptyMap(), llmOptions: <Error class: unknown class> = LlmOptions()) : Oracle
LLM-based Oracle that answers questions using Prolog reasoning with fallback to proposition search.
Strategy:
Use LLM to translate question to Prolog query
Run Prolog query against the knowledge base
If no results, fall back to searching propositions
Use LLM to formulate natural language answer
Parameters
ai
AI service for LLM calls
prolog Result
Prolog facts from projection
prolog Schema
Schema with predicate mappings and rules
proposition Repository
Store to search propositions (for fallback)
entity Names
Mapping of entity IDs to human-readable names
llm Options
LLM configuration
Constructors
Link copied to clipboard
constructor(ai: <Error class: unknown class>, prologResult: PrologProjectionResult, prologSchema: PrologSchema, propositionRepository: PropositionRepository? = null, entityNames: Map<String, String> = emptyMap(), llmOptions: <Error class: unknown class> = LlmOptions())