How to install Neo4j desktop for LangChain and RAG based LLM applications with APOC plugins?

Kshitij Kutumbe
3 min readMar 9, 2024

--

Photo by JJ Ying on Unsplash

Large Language Models (LLMs) are revolutionizing the way we interact with machines. But their true potential lies in their ability to understand and reason about relationships between concepts. This is where graph databases like Neo4j come in.

Installation Steps:

  1. Download Neo4j Desktop: Head over to the official Neo4j website and download the latest version of Neo4j Desktop for your operating system https://neo4j.com/download/.
  2. Installation: Follow the on-screen instructions for installation. The process is straightforward and shouldn’t take long.
  3. Launch Neo4j Desktop: Once installed, launch Neo4j Desktop. You’ll be greeted by a welcome screen.

What is APOC?

APOC (Awesome Procedures on Cypher) library, which is an add-on library for Neo4j that provides hundreds of procedures and functions adding a lot of useful functionality.

This library is necessary for running any Langchain based application with Neo4j.

So, how do we install it?

  1. Open the DMBSs tab from the left hand side .

2. Create a new project using the above shown add button.

3. Once the project is created , click on the created project, you’ll the see the following window on the right, install the APOC plugin from here.

4. Now, open the dbms folder, how and where to find it, check the below image for reference.

Copy this file ‘apoc-5.14.0-core.jar’ or the relevant version apoc.jar file from labs folder to plugins folder

5. Update this file /var/lib/neo4j/conf/neo4j.conf

How? check the below image for reference:

Click on settings, find the below configurations in the config file and replace those with the following:

  • dbms.security.procedures.unrestricted=apoc.*
  • dbms.security.procedures.allowlist=apoc.*

Save it and apply.

Now, you are done with the configuration that is needed for using Neo4j with LangChain and LLM applications and all set for your project.

If you wish to get an idea of how a production ready code should be like, check out the below code repository:

https://github.com/kshitijkutumbe/usa-visa-approval-prediction

--

--

Kshitij Kutumbe
Kshitij Kutumbe

Written by Kshitij Kutumbe

Data Scientist | NLP | GenAI | RAG | AI agents | Knowledge Graph | Neo4j kshitijkutumbe@gmail.com www.linkedin.com/in/kshitijkutumbe/

No responses yet