TigerGraph 是一个原生分布式高性能图数据库。 以顶点和边的图格式存储数据可以产生丰富的关系, 非常适合为 LLM 响应提供基础。
TigerGraphLangChain 集成的一个大型示例在此处展示

安装和设置

按照说明如何连接到 TigerGraph 数据库 Install the Python SDK:
pip install pyTigerGraph

示例

要利用 TigerGraph InquiryAI 功能,您可以从 langchain_community.graphs 导入 TigerGraph
import pyTigerGraph as tg

conn = tg.TigerGraphConnection(host="DATABASE_HOST_HERE", graphname="GRAPH_NAME_HERE", username="USERNAME_HERE", password="PASSWORD_HERE")

### ==== CONFIGURE INQUIRYAI HOST ====
conn.ai.configureInquiryAIHost("INQUIRYAI_HOST_HERE")

from langchain_community.graphs import TigerGraph

graph = TigerGraph(conn)
result = graph.query("How many servers are there?")
print(result)

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.