Update neo4j template readmes (#12540)

This commit is contained in:
Tomaz Bratanic
2023-10-30 15:57:53 +01:00
committed by GitHub
parent b2138508cb
commit 8e88ba16a8
5 changed files with 84 additions and 8 deletions

View File

@@ -1,10 +1,29 @@
# Graph Generation Chain for Neo4j Knowledge Graph
Harness the power of natural language understanding and convert plain text into structured knowledge graphs with the Graph Generation Chain.
This system integrates with the Neo4j graph database using OpenAI's LLM.
By leveraging OpenAI Functions capabilities, the Graph Generation Chain efficiently extracts graph structure from text.
Harness the power of natural language understanding of LLMs and convert plain text into structured knowledge graphs with the Graph Generation Chain.
This chain uses OpenAI's LLM to construct a knowledge graph in Neo4j.
Leveraging OpenAI Functions capabilities, the Graph Generation Chain efficiently extracts structured information from text.
The chain has the following input parameters:
## Set up Environment
* text (str): The input text from which the information will be extracted to construct the graph.
* allowed_nodes (Optional[List[str]]): A list of node labels to guide the extraction process.
If not provided, extraction won't have specific restriction on node labels.
* allowed_relationships (Optional[List[str]]): A list of relationship types to guide the extraction process.
If not provided, extraction won't have specific restriction on relationship types.
Find more details in [this blog post](https://blog.langchain.dev/constructing-knowledge-graphs-from-text-using-openai-functions/).
## Neo4j database
There are a number of ways to set up a Neo4j database.
### Neo4j Aura
Neo4j AuraDB is a fully managed cloud graph database service.
Create a free instance on [Neo4j Aura](https://neo4j.com/cloud/platform/aura-graph-database?utm_source=langchain&utm_content=langserve).
When you initiate a free database instance, you'll receive credentials to access the database.
## Environment variables
You need to define the following environment variables