Memgraph
Memgraph is a high-performance, in-memory graph database that is optimized for real-time queries and analytics.Get started with Memgraph by visitingtheir website.
Installation and Setup
- Install the Python SDK with
pip install langchain-memgraph
MemgraphQAChain
There exists a wrapper around Memgraph graph database that allows you to generate Cypher statements based on the user inputand use them to retrieve relevant information from the database.
from langchain_memgraph.chains.graph_qaimport MemgraphQAChain
from langchain_memgraph.graphs.memgraphimport MemgraphLangChain
See ausage example
Constructing a Knowledge Graph from unstructured data
You can use the integration to construct a knowledge graph from unstructured data.
from langchain_memgraph.graphs.memgraphimport MemgraphLangChain
from langchain_experimental.graph_transformersimport LLMGraphTransformer
API Reference:LLMGraphTransformer
See ausage example
Memgraph Tools and Toolkit
Memgraph also provides a toolkit that allows you to interact with the Memgraph database.See ausage example.
from langchain_memgraphimport MemgraphToolkit