This is the code repository for Building Neo4j-Powered Applications with LLMs, First Edition, published by Packt.
Ravindranatha Anthapu, Siddhant Agarwal
Embark on an expert-led journey into building LLM-powered applications using Retrieval-Augmented Generation (RAG) and Neo4j knowledge graphs. Written by Ravindranatha Anthapu, Principal Consultant at Neo4j, and Siddhant Agrawal, a Google Developer Expert in GenAI, this comprehensive guide serves as the starting point for developers exploring alternatives to LangChain, covering frameworks like Haystack, Spring AI, and LangChain4j. As LLMs reshape how businesses interact with customers, this book helps you to develop intelligent applications using RAG architecture and knowledge graphs, with a strong focus on overcoming one of AI’s most persistent challenges—mitigating hallucinations. You'll also learn how to model and construct Neo4j knowledge graphs with Cypher to enhance LLM responses. Through real-world use cases like vector-powered search and personalized recommendations, the authors help you build hands-on experience with Neo4j GenAI integrations across Haystack and Spring AI. Supported by access to a companion GitHub repository, you’ll work through code-heavy examples to confidently build and deploy GenAI apps on Google Cloud. By the end of this book, you’ll have the skills to ground LLMs with RAG and Neo4j, optimize graph performance, and strategically select the right cloud platform for your GenAI applications.
- Design, populate, and integrate a Neo4j knowledge graph with RAG
- Model data for knowledge graphs
- Enhance knowledge exploration with AI-powered search
- Maintain and monitor your AI search application with Haystack
- Leverage LangChain4j and Spring AI for recommendations and personalization
- Deploy your application on Google Cloud Platform
- Introducing LLMs, RAGs, and Neo4j Knowledge Graphs
- Demystifying RAG
- Building a Foundational Understanding of Knowledge Graph for Intelligent Applications
- Building Your Neo4j Graph with Movies Dataset
- Implementing Powerful Search Functionalities with Neo4j and Haystack
- Exploring Advanced Knowledge Graph Capabilities
- Introducing the Neo4j Spring AI and LangChain4j Frameworks for Building Recommendation Systems
- Constructing a Recommendation Graph with H&M Personalization Dataset
- Integrating LangChain4j and SpringAI with Neo4j
- Creating an Intelligent Recommendation System
- Choosing the Right Cloud Platform for GenAI Applications
- Deploying your Application on Cloud
- Epilogue
Hardware requirement: no special hardware is required, a machine with at least 8 GB RAM and internet access is recommended for smooth development and testing.
| Chapter | Software required | OS required |
|---|---|---|
| 1-13 | Python | Any OS |
| 1-13 | Java | Any OS |
| 1-13 | Neo4j and Cypher | Any OS |
- Neo4j AuraDB
- Google Cloud Platform (GCP)
- OpenAI (or equivalent embedding providers)
Note all files are made available here on GitHub, and for the files that are not available here you can refer the following links:
- Database dump file, 9th chapter
- hmreco_post_augment_with_summary_communities.dump, 10th chapter
- In preface To keep up with the latest developments in the fields of Generative AI and LLMs, subscribe to our weekly newsletter, AI_Distilled, at https://packt.link/Q5UyU should be https://packt.link/8Oz6Y
Ravindranatha Anthapu Ravindranatha Anthapu has more than 25 years of experience in working with W3C standards and building cutting-edge technologies, including integrating speech into mobile applications in the 2000s. He is a technology enthusiast who has worked on many projects, from operating system device drivers to writing compilers for C language and modern web technologies, transitioning seamlessly and bringing experience from each of these domains and technologies to deliver successful solutions today. As a principal consultant at Neo4j today, Ravindranatha works with large enterprise customers to make sure they are able to leverage graph technologies effectively across various domains.
Siddhant Agarwal Siddhant Agarwal is a seasoned DevRel professional with over a decade of experience cultivating innovation and scaling developer ecosystems globally. Currently leading Developer Relations across APAC at Neo4j and recognized as a Google Developer Expert in Gen-AI, Sid transforms local developer initiatives into global success stories with his signature "Local to Global" approach. Previously at Google managing flagship developer programs, he has shared his technical expertise at diverse forums worldwide, fueling inspiration and innovation.
