To get the most out of this book
To fully benefit from this book, you should have a basic understanding of databases, familiarity with Neo4j and its Cypher query language, and a working knowledge of LLMs and GenAI concepts. Prior experience with Python and Java will also be helpful for implementing the code examples and working with frameworks such as Haystack, as well as LangChain4j and Spring AI for Java-based applications.
You’ll be guided through building and deploying intelligent applications, so you may need to create free accounts on platforms such as Neo4j AuraDB, Google Cloud Platform (GCP), and OpenAI (or equivalent embedding providers). While no special hardware is required, a machine with at least 8 GB RAM and internet access is recommended for smooth development and testing.
Download the example code files and database dump
The code bundle for the book is hosted on GitHub at https://github.com/PacktPublishing/Building-Neo4j-Powered-Applications-with-LLMs. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing. Check them out!
You can download the database dump from this link https://packt-neo4j-powered-applications.s3.us-east-1.amazonaws.com/Building+Neo4j-Powered+Applications+with+LLMs+Database+Dump+files.zip.
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://packt.link/gbp/9781836206231.
Conventions used
There are a number of text conventions used throughout this book.
CodeInText
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and X (Twitter) handles. For example: “Install the Hugging Face Transformers library for handling model-related functionalities: pip install transformers
.”
A block of code is set as follows:
documents = [
"The IPL 2024 was a thrilling season with unexpected results.",
.....
"Dense Passage Retrieval (') is a state-of-the-art technique for information retrieval."
]
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
tokenizer = T5Tokenizer.from_pretrained('t5-small', legacy=False)
model = T5ForConditionalGeneration.from_pretrained('t5-small')
Any command-line input or output is written as follows:
pip install numpy==1.26.4 neo4j transformers torch faiss-cpu datasets
Bold: Indicates a new term, an important word, or words that you see on the screen. For instance, words in menus or dialog boxes appear in the text like this. For example: “Artificial Intelligence (AI) is evolving beyond niche and specialized fields to become more accessible and able to assist with day-to-day tasks.”
Warnings or important notes appear like this.
Tips and tricks appear like this.