logica
logica copied to clipboard
Logica AI Intelligence Support
Currently, Logica embeds OpenAI as the default backend for AI-powered inference within rules — a move toward the NeuroSymbolic paradigm.
Example below
Species(name: "lion");
Species(name: "tiger");
Species(name: "crocodile");
Species(name: "eagle");
Species(name: "shark");
AskAboutSpecies(species1, species2) = """
Just answer true or false.
Do species1 and species2 belong to the same biological category?
Examples of categories include mammal, reptile, bird, fish.
species1: """ ++ species1 ++ """
species2: """ ++ species2;
@Ground(Species_Rel);
Species_Rel(s1: name1, s2: name2, same_category: result) :-
result = Intelligence(AskAboutSpecies(name1, name2)),
Species(name: name1), Species(name: name2), name1 != name2;
We need enable support for alternative AI backends, such as:
- Google Gemini
- Local LLMs via API (e.g., llama)
Gemini support added by Yilin. Local support is yet to arrive.