diff --git a/docs/docs/examples/examples/docs_to_knowledge_graph.md b/docs/docs/examples/examples/docs_to_knowledge_graph.md index d301ca46..0c644f41 100644 --- a/docs/docs/examples/examples/docs_to_knowledge_graph.md +++ b/docs/docs/examples/examples/docs_to_knowledge_graph.md @@ -38,6 +38,8 @@ and then build a knowledge graph. ## Setup * [Install PostgreSQL](https://cocoindex.io/docs/getting_started/installation#-install-postgres). CocoIndex uses PostgreSQL internally for incremental processing. * [Install Neo4j](https://cocoindex.io/docs/targets/neo4j#neo4j-dev-instance), a graph database. + + * [Configure your OpenAI API key](https://cocoindex.io/docs/ai/llm#openai). Alternatively, we have native support for Gemini, Ollama, LiteLLM. You can choose your favorite LLM provider and work completely on-premises. @@ -357,6 +359,9 @@ And then open the url `https://cocoindex.io/cocoinsight`. It just connects to y ## Browse the knowledge graph After the knowledge graph is built, you can explore the knowledge graph you built in Neo4j Browser. + + + For the dev environment, you can connect to Neo4j browser using credentials: - username: `Neo4j` - password: `cocoindex` @@ -368,28 +373,4 @@ You can open it at [http://localhost:7474](http://localhost:7474), and run the f MATCH p=()-->() RETURN p ``` -## Kuzu -Cocoindex natively supports Kuzu - a high performant, embedded open source graph database. - - - -The GraphDB interface in CocoIndex is standardized, you just need to **switch the configuration** without any additional code changes. CocoIndex supports exporting to Kuzu through its API server. You can bring up a Kuzu API server locally by running: - -``` sh -KUZU_DB_DIR=$HOME/.kuzudb -KUZU_PORT=8123 -docker run -d --name kuzu -p ${KUZU_PORT}:8000 -v ${KUZU_DB_DIR}:/database kuzudb/api-server:latest -``` - -In your CocoIndex flow, you need to add the Kuzu connection spec to your flow. - -```python -kuzu_conn_spec = cocoindex.add_auth_entry( - "KuzuConnection", - cocoindex.storages.KuzuConnection( - api_server_url="http://localhost:8123", - ), -) -``` - - +![Neo4j Browser](/img/examples/docs_to_knowledge_graph/neo4j_browser.png) \ No newline at end of file diff --git a/docs/docs/targets/neo4j.md b/docs/docs/targets/neo4j.md index 513d7066..ab9e0d16 100644 --- a/docs/docs/targets/neo4j.md +++ b/docs/docs/targets/neo4j.md @@ -49,4 +49,14 @@ You can access the Neo4j browser at [http://localhost:7474](http://localhost:747 href="https://github.com/cocoindex-io/cocoindex/tree/main/examples/docs_to_knowledge_graph" text="Docs to Knowledge Graph" margin="16px 0 24px 0" -/> \ No newline at end of file +/> + +## Data Clean up between different projects +If you are building multiple CocoIndex flows from different projects to neo4j, we recommend you to + +- bring up separate container for each flow if you are on community edition, or +- setup different databases within one container if you are on enterprise edition. + +This way, you can clean up the data for each flow independently. + +In case you need to clean up the data in the same database, you can do it manually by running `cocoindex drop ` from the project you want to clean up. \ No newline at end of file diff --git a/docs/static/img/examples/docs_to_knowledge_graph/neo4j_browser.png b/docs/static/img/examples/docs_to_knowledge_graph/neo4j_browser.png new file mode 100644 index 00000000..b94c1d86 Binary files /dev/null and b/docs/static/img/examples/docs_to_knowledge_graph/neo4j_browser.png differ