Libem is an open-source compound AI toolchain for fast and accurate entity matching, powered by LLMs.
make installUpdate ~/.libem/config.yaml with
OPENAI_API_KEY: your key
Optionally, to support browsing:
GOOGLE_CSE_ID: your key
And:
GOOGLE_API_KEY: your key
To run the sample example.
make runYou can also install libem library with pip:
pip install libemimport libem
libem.match("apple", "orange")In shell:
libem apple orangeLibem enforces a strict naming convention for a toolchain and the tool access methods. Toolchain's main methods are defined in the interface.py and exposed at the toolchain level. For example, the following code will import the tune tool in libem toolchain.
from libem import tuneTo import the libem.tune toolchain, we must explicitly invoke:
import libem
tune = libem.toolchain("libem.tune") Note that this does not prevent us from importing the tools in the toolchain directly:
from libem.tune import learnIn a nutshell, one can directly import a toolchain's tools but not the tool's module. This is to encourage (but not enforce) that tools are always accessed via well-defined methods consistent with the LM access.