To get the most out of this book
You should have basic Natural Processing Language (NLP) knowledge and some experience with Python. Additionally, most of the programs in this book are provided as Jupyter notebooks. To run them, all you need is a free Google Gmail account, allowing you to execute the notebooks on Google Colaboratory’s free virtual machine (VM). You will also need to generate API tokens for OpenAI, Activeloop, and Pinecone.
The following modules will need to be installed when running the notebooks:
Modules |
Version |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Download the example code files
The code bundle for the book is hosted on GitHub at https://github.com/Denis2054/RAG-Driven-Generative-AI. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
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/9781836200918.
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 Twitter handles. For example: “self
refers to the current instance of the class to access its variables, methods, and functions”.
A block of code is set as follows:
# Cosine Similarity
score = calculate_cosine_similarity(query, best_matching_record)
print(f"Best Cosine Similarity Score: {score:.3f}")
Any command-line input or output is written as follows:
Best Cosine Similarity Score: 0.126
Bold: Indicates a new term, an important word, or words that you see on the screen. For example, text in menus or dialog boxes appears like this. Here is an example: “Modular RAG implementing flexible retrieval methods”.
Warnings or important notes appear like this.
Tips and tricks appear like this.