Vector Search

Vector search is the underlying technology that powers ChatFrame's Local RAG (Retrieval-Augmented Generation) feature. It is a method of searching for information based on the semantic meaning of the content, rather than just keywords.

How it Works in ChatFrame

  1. Embedding: When you add a file (PDF, code, etc.) for indexing, the content is broken down into chunks. A local embedding model converts each chunk of text into a high-dimensional numerical representation called a vector (or embedding).
  2. Vector Store: These vectors are stored in a local vector database (or vector store) on your machine.
  3. Query Conversion: When you ask a question in the chat, your question is also converted into a vector.
  4. Similarity Search: ChatFrame performs a vector search in the local vector store to find the stored vectors that are numerically closest to your question's vector. These closest vectors represent the most semantically relevant chunks of text from your indexed files.
  5. Context Retrieval: The original text chunks corresponding to the most relevant vectors are retrieved and sent to the LLM as part of the prompt's context.

Local and Private

The entire vector search process, including embedding generation and storage, happens locally within the ChatFrame application. This ensures that your private data is never exposed to external services, maintaining the application's commitment to security and privacy.