Overview
PrologTool 클래스는 Prolog 규칙을 사용하여 답변을 생성하는 langchain 도구를 생성할 수 있게 해줍니다.Setup
family.pl 파일에 다음 Prolog 규칙을 사용해 보겠습니다: parent(john, bianca, mary).parent(john, bianca, michael).
parent(peter, patricia, jennifer).
partner(X, Y) :- parent(X, Y, _).
Instantiation
먼저 Prolog 도구를 생성합니다:Invocation
LLM 및 function calling과 함께 Prolog 도구 사용하기
Chaining
agent와 함께 Prolog Tool 사용하기
agent와 함께 prolog 도구를 사용하려면 agent의 constructor에 전달합니다:API reference
자세한 내용은 langchain-prolog.readthedocs.io/en/latest/modules.html을 참조하세요.Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.