--- title: Manage vector data slug: /knowledge --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import Icon from "@site/src/components/icon"; import PartialGlobalModelProviders from '@site/docs/_partial-global-model-providers.mdx'; Vector data is critical to AI applications. Langflow provides several components to help you store and retrieve vector data in your flows, including embedding models, vector stores, and knowledge bases. ## Embedding models Embedding model components generate text embeddings using a specified Large Language Model (LLM). There are two common use cases for these components: * **Store vectors**: Generate embeddings for content written to a vector database. * **Search vectors**: Generate an embedding from a query to run a similarity search. In both cases the embedding model component is attached to a vector store component. For more information, examples, and available options, see [Embedding model components](/components-embedding-models). Alternatively, you can use [knowledge bases](#knowledge-bases), which include built-in support for several embedding models. ## Vector stores Vector store components read and write to vector databases. Typically, these components connect to remote databases, but some vector store components support local databases. import PartialVectorRagBlurb from '@site/docs/_partial-vector-rag-blurb.mdx';
Example: Vector search flow import PartialVectorRagFlow from '@site/docs/_partial-vector-rag-flow.mdx';
## Knowledge bases import PartialKbSummary from '@site/docs/_partial-kb-summary.mdx'; ### Knowledge base storage locations Each knowledge base is a [ChromaDB](https://docs.trychroma.com/docs/overview/introduction) vector database. Each database is stored in a separate directory that contains the following: - **Vector embeddings**: Embeddings are stored using the Chroma vector database. - **Metadata files**: Configuration and embedding model information. - **Source data**: The original data used to create the knowledge base. Knowledge bases are stored local to your Langflow instance. The default storage location depends on your operating system and installation method: - **Langflow Desktop**: - **macOS**: `/Users//.langflow/knowledge_bases` - **Windows**: `C:\Users\\AppData\Roaming\com.LangflowDesktop\knowledge_bases` - **Langflow OSS**: - **macOS/Windows/Linux/WSL with `uv pip install`**: `/lib/python3.12/site-packages/langflow/knowledge_bases` (Python version can vary. Knowledge bases aren't shared between virtual environments.) - **macOS/Windows/Linux/WSL with `git clone`**: `/src/backend/base/langflow/knowledge_bases` If you set the `LANGFLOW_CONFIG_DIR` environment variable, the `knowledge_bases` subdirectory is created relative to that path. To change the default `knowledge_bases` directory path, set the `LANGFLOW_KNOWLEDGE_BASES_DIR` environment variable: ```bash export LANGFLOW_KNOWLEDGE_BASES_DIR="/path/to/parent/directory" ``` ### Create a knowledge base In this example, you'll create a knowledge base of chunked customer orders. To follow along with this example, download [`customer-orders.csv`](/files/customer_orders.csv) to your local machine, or adapt the steps for your own structured data. 1. On the [**Projects** page](/concepts-flows#projects) page, click