CH09 VectorStore
The vector store storage phase is the fourth phase of the Retrieval-Augmented Generation (RAG) system, the previous phase Efficiently store and manage generated embedding vectors It is a process to do. This step is in the future Quickly look at vectors in the search process doing, Essential for quickly finding relevant documents is.
The need to store vector stores
Fast search speed : By effectively storing and indexing embedding vectors, among large amounts of data Quickly search for related information You can.
Scalerability : As data continues to increase, Vector store provides sufficient scalerability to accommodate it Should do. The efficient storage structure ensures the scalability of the database and allows you to manage this large-scale data without compromising system performance.
Semantic Search Support: I need to look up similar paragraphs for the user's question and meaning rather than keyword-based searches, but the vector store supports these features. For DBs where the text itself is stored, there is a limit to rely on keyword-based searches, but vector stores enable semantically similar paragraph searches.
(Example) Question: "What is the business name that introduced the artificial intelligence technology that works on the mobile device?"
Vector store importance
The vector store storage phase Direct connection with the RAG system's search function In, the whole system Great impact on response time and accuracy Goes. This step allows data to be well managed and immediately accessible when needed, providing quick and accurate information to the user.
code
Copy
from langchain_community.vectorstores import FAISS
# Step 4: Create DB and save
# Create a vector store.
vectorstore = FAISS.from_documents(documents=documents, embedding=embeddings)Reference
Last updated