Feeding Your Local Data to LLMs (II) A developer tutorial demonstrates extending local LLM data feeding by storing embeddings in a Neo4j graph database and combining similarity search with full-text search, using a local LLM and Python packages including langchain_community, tiktoken, neo4j, openai, sentence-transformers, ipywidgets, and pdfplumber. Member-only story Feeding Your Local Data to LLMs II Using Graph Database combined with full-text search In the previous article https://medium.com/dev-genius/feeding-your-local-data-to-llms-ec410b3aa95a , I presented a simple way for feeding local data into LLM queries. In this article, it is extended in two ways. - The embedding will be stored in a graph database - Similarity search will be combined with full-text search I will use Neo4j graph database. For this article, a community version is deployed on Kubernetes. The detailed deployment steps are available in Deploying Neo4j Graph Database in Kubernetes https://medium.com/dev-genius/deploying-neo4j-graph-database-in-kubernetes-a367e10bfe0f article. The overall procedure is shown in the diagram below. Code Walk-through In this section, we will go through a running example code. We use a local LLM and a Neo4j graph database as a knowledge database. We install the following Python packages for the example code. - langchain community - tiktoken - neo4j - openai - sentence-transformers - ipywidgets - pdfplumber We set all the environment specific variables in the .env file and load it using the load dotenv function.