
Discover the fundamentals and applications of vector databases, explore SQLite and Chroma DB, and build hands-on skills with Pinecone, Python code, and real-world use cases.
Discover how vector databases store and index high dimensional vectors from unstructured data via embeddings, enabling fast semantic and similarity search for AI and LLM use cases.
Explore vector database use cases from augmenting llms with up-to-date knowledge to semantic and similarity search across text, audio, images, and video, plus recommendations, clustering, and anomaly detection.
Explore interfacing with vector databases using python, performing vector embedding, storage, and similarity search with sqlite and chroma, and scale toward pinecone for production use.
Learn the fundamentals of a vector database by turning objects into embeddings, measuring Euclidean distance, and performing vector search and indexing with nearest-neighbor methods like k-d trees.
Learn to set up a sqlite3 in-memory sql db, create a connection and cursor, define an employees table, and perform insert and select operations.
Learn how to store and retrieve vectors in SQLite by converting numpy arrays to binary blobs, creating a vectors table, and deserializing back to numpy objects.
We were using a SQL database to showcase how vectors can be stored and retrieved. SQL is no way the right tool to index vectors and map similar vectors together. At the end of the lesson you will see that I am using a SQL query like this to retrieve similar vector. I used this following command,
SELECT vector FROM vectors ORDER BY abs(vector - ?) ASC
But in order to find the actual distance between vectors we need to calculate the Euclidean distance. This can be achieved python/numpy easily but in SQL it is little bit complicated because you have to essentially do the math using SQL on binary data. That complex SQL is out of scope of this.
As expected because I didn't take the Euclidean distance between vectors to find which one is closer to our query_vector we ended up having a wrong vector.
Here is the way anyone would calculate in python:
import numpy as np
vect1 = np.array([1.2, 3.4, 2.1, 0.8])
vect2 = np.array([2.7, 1.5, 3.9, 2.3])
qry_vect = np.array([1.0, 3.2, 2.0, 0.5])
d1 = np.linalg.norm(vect1 - qry_vect)
d2 = np.linalg.norm(vect2 - qry_vect)
then sort d1 and d2 to find the closest vectors.
you will find [1.2, 3.4, 2.1, 0.8] is the closest to our query_vector instead of the other one showed in the video.
To do the all these in a vector we need a true vector database which is the topic of subsequent sections.
Install and initialize Chroma db for in-memory vector similarity search. Create a collection of article documents, generate vector embeddings by default, and insert metadata and IDs.
Explore Chroma db local vectors and the dot add vs dot upsert distinction, perform semantic vector queries, and shift from in-memory to persistent memory with settings and a persistent directory.
Set up a Pinecone vector database account, verify your email, and obtain an API key. Explore free tier limits, a default project, and creating your first index.
Explore the Pinecone console, a web interface for managing vector databases, indexes and collections. Upsert, query, and delete vectors, configure dimensions and similarity metrics, and manage API keys and teams.
Set up a Windows development environment, install Python, upgrade pip, install the Pinecone client with pip, and verify the installation by importing Pinecone.
Explore pinecone 5.0.0 with a hello world script, creating a test index of dimension 3 using serverless spark and an API key in US East one free tier.
If you are using older pinecone (v-2.2.1) this video tutorial is still relevant. If you upgraded to later version please skip this one and see the next lesson.
Master crud operations in a vector database by creating vectors from embeddings, reading with queries for similar items, updating vectors with data, and deleting obsolete records using Pinecone with Python.
Master vector databases with Python by inserting vectors into Pinecone, creating an index, upserting data, and managing vector ids and high-dimensional vectors in a serverless setup.
Learn how to fetch vectors by id using Pinecone in Python, connect to a test index, and retrieve single or multiple vectors with their values and sparse indices.
Learn to delete vectors from a Pinecone vector index by IDs or all, after initializing Pinecone with your API key and environment and selecting the index.
You can skip this one if you have already completed it in previous section.
This lesson was prepared using Pinecone version 2.2.1. For newest version (v5.0.0) please refer to the attached notebook. Only initialization syntax got changed.
Learn to query vector data with Pinecone by creating a pointer to the index, setting top-k, and using cosine similarity to retrieve relevant vectors.
Discover how to fetch vectors by id and fetch multiple vectors from a Pinecone index in Python, including sparse values, indices, and values, with setup via API key and environment.
Learn to delete vectors in Pinecone by ID or by removing all, including initializing Pinecone with API key and environment, inspecting indexes, and confirming vector counts.
Learn to manage Pinecone vector databases by distinguishing index, a queryable named vector collection, from collection, a static backup for migrating vectors to a new index.
Learn how to upsert vectors into a Pinecone index using namespaces in Python, explore subject, body, and other partitions, and map integer IDs to strings for namespace-specific vector storage.
Learn to manage pinecone indices end-to-end by creating, listing, describing, updating, and deleting indices. Configure dimension, distance metrics, and pod type for the index.
Explore semantic search and how it understands meaning behind terms, uses embeddings and transformers to retrieve relevant results from a vector database, improving accuracy and intent-aware search.
Explore building a semantic search engine for medium articles using a Kaggle 125k post titles dataset, loading data with pandas, and identifying subtitles for relevance.
Clean and prepare data for semantic search by removing incomplete rows, combining title and subtitle into a text blob, and structuring category metadata for 81,000 vectors in Pinecone.
Prepare and upsert a 6k dataset into a Pinecone index by embedding titles with a sentence transformer, converting IDs to strings, and packaging metadata (title, subtitle, category) for semantic search.
Learn how to perform semantic search using a vector index: encode queries, convert numpy arrays to Python lists, and query with top k while inspecting metadata.
Explore named entity recognition and its role in enhancing semantic search in vector databases, identifying people, organizations, and dates with spaCy examples.
Explore hands-on named entity recognition in Python using Jupyter Notebook, Transformers, and a pre-trained token classification model from Hugging Face to extract entities like person and organization.
Explore vector embedding models and load data for semantic search and entity recognition, using sentence transformer with 768-d embeddings, create a pinecone index, prepare data, and upsert vectors for querying.
Prepare data for semantic search powered by named entity recognition by dropping missing values, sampling 10,000 rows with seed 45, and creating a text extended field from title and content.
Explore extracting named entities with a batch nlp workflow using a transformer. Prepare data, run the nlp engine, and build a helper to return a list of entities per document.
Generate ids from the dataframe index and upsert vectors and metadata into the pinecone index. Drop text fields to fit metadata, process in batches, and monitor vector counts during updates.
Build a retrieval AI agent with LangChain and OpenAI by setting up a notebook, installing libraries, creating embeddings, indexing vectors in Pinecone, and enabling vector querying.
Learn how to obtain an OpenAI API key by signing up on openai.com, verifying identity, claiming credits, and creating a secret key for use in the next session.
Learn to generate embeddings with OpenAI's text embedding Ada 002 model, set up API key, clean inputs, and parse vectors in Python; note 1436-dimension vectors inform a Pinecone index.
Set up a pinecone vector database for AI and LLM use by initializing pinecone, creating an index named AI agent with 1536 dimensions, using dot product metrics.
Learn how to generate embeddings with OpenAI in a hands-on notebook, manage rate limits and free-tier constraints, and implement batch processing and timing strategies.
Learn how to perform semantic search with OpenAI by embedding queries and documents, using LangChain and Pinecone for a vector store, and executing similarity searches.
Define and invoke a retrieval QA agent for retrieval augmented generation (RAG) using a vector store and conversational memory for context, powered by OpenAI chat models.
Explore using a retrieval QA agent to fetch direct answers from a knowledge base with LLMs, contrasting it with semantic search and showing how a conversational agent maintains context.
Set up the environment for audio similarity search, load libraries and data, perform basic analysis with Librosa, and initialize the audio embedding model and Pinecone for vector indexing and querying.
Explore loading and playing audio data in Python with IPython's audio and display, analyze samples like washing machine sounds, and experiment with categories from a 2000-sample dataset.
Initialize the audio embedding model by detecting the device, importing the audio tagging module, and instantiating the model on cuda or cpu; determine 2048-dimensional vectors to prepare the pinecone index.
Index audio vectors in Pinecone through batch processing and upsert, using embeddings, IDs, and metadata. Handle batch sizing, progress tracking with tqdm, and correct metadata formatting for scalable vector databases.
Learn to query your own audio data with a vector database by embedding audio and performing out-of-sample searches, using Librosa, downloading audio from Google APIs, and interpreting similarity results.
Query your own audio data with embeddings and vector search, loading with Librosa and playing results, using metadata to compare out-of-sample sounds like coughing and frogs.
In this comprehensive course on Vector Databases, you will delve into the exciting world of cutting-edge technologies that are transforming the field of artificial intelligence (AI), particularly in generative AI. With a focus on Future-Proofing Generative AI, this course will equip you with the knowledge and skills to harness the power of Vector Databases for advanced applications, including Language Model Models (LLM), Generative Pretrained Transformers (GPT) like ChatGPT, and Artificial General Intelligence (AGI) development.
Starting from the foundations, you will learn the fundamentals of Vector Databases and their role in revolutionizing AI workflows. Through practical examples and hands-on coding exercises, you will explore techniques such as vector data indexing, storage, retrieval, and conditionality reduction. You will also gain proficiency in integrating Pinecone Vector Data Base with other tools like LangChain, OpenAI API using Python to implement real-world use cases and unleash the full potential of Vector Databases.
Throughout the course, we will uncover the limitless possibilities of Vector Databases in generative AI. You will discover how these databases enable content generation, recommendation systems, language translation, and more. Additionally, we will discuss performance optimization, scalability considerations, and best practices for efficient implementation.
Led by an expert instructor with a PhD in computational nano science and extensive experience as a data scientist at leading companies, you will benefit from their deep knowledge, practical insights, and passion for teaching AI and Machine Learning (ML). Join us now to embark on this transformative learning journey and position yourself at the forefront of Future-Proofing Generative AI with Vector Databases. Enroll today and unlock a world of AI innovation!