---
title: "什么是 Vector Database？"
canonical: https://wavect.io/zh/glossary/vector-database/
language: zh
description: "一种把文本存储为数值向量的数据库，使你能够按含义而非精确关键词来搜索，它是大多数 RAG 系统所运行的检索引擎。"
image: "https://wavect.io/img/general/bak/open_graph_preview.jpg"
---

技术

# Vector Database

一种把文本存储为数值向量的数据库，使你能够按含义而非精确关键词来搜索，它是大多数 RAG 系统所运行的检索引擎。

最近审阅: 2026-06-02 审阅人 [Kevin Riedl](/zh/team/kevin-riedl/) [wiki ↗](https://www.wikidata.org/wiki/Q139796365)

向量数据库存储 Embedding：文本（或图像、或音频）的数值表示，其中相似的含义被映射到空间中相近的点。你不是去匹配精确关键词，而是用同样的方式嵌入用户的查询，并向数据库索取最接近的向量。这就是相似性搜索，正是它让系统在文档实际写着「订阅终止流程」时仍能找到「我怎么取消我的套餐」。

在 RAG 流水线中，这是检索层。你的答案质量在很大程度上取决于它：好的 Embedding 和好的搜索会返回正确的文本块喂给模型，差的则喂进垃圾，而模型会自信地把这些垃圾总结出来。这就是为什么决定 RAG 项目成败的通常是检索，而不是模型。

这里是供应商会跳过的部分：你常常并不需要专用的向量数据库。如果你的语料库很小（数千而非数百万个文本块），在你本就运行的 Postgres 上加一个向量扩展（pgvector）更简单、更便宜，也少运维一个系统。如果你的搜索主要由关键词驱动，朴素的全文搜索甚至可能直接胜过向量搜索。只有当规模、延迟或高吞吐量下的混合搜索确实证明其合理时，才动用专用向量数据库，而不是因为它出现在架构图上。

把这件事过度工程化的例子：一个团队要给几千页文档做一个内部助手，结果在还没有一个用户之前，就上了一个托管向量数据库、一条独立的 Embedding 流水线和一个 Rerank 服务。他们现在要运维四个系统，去回答本来用现有 Postgres 上的 pgvector 就能搞定的问题，而其中每一个都是一件新的要监控、要保护、要花钱的东西。那个枯燥的版本一周就能上线，并且在语料库真正变大之前都扩展得很好。当数字逼着你上（数百万个向量、严苛的延迟预算、高吞吐量的混合搜索）时，再去动用专用数据库，而不是因为加上它能让架构图看起来更唬人。

我们在 [人工智能](/zh/services/artificial-intelligence/) 下有意选择足够枯燥的方案，因为每多一个系统，就多一件要在凌晨三点保持运转的事情。

// FAQ

## 常见问题

### 向量数据库用来做什么？

用来按含义而非精确关键词搜索。文本被存储为 Embedding（数值向量），查询返回最接近的匹配。它是大多数 RAG 系统所依赖的检索层。

### 我需要专用的向量数据库吗？

通常不需要。对于小型语料库，像 pgvector 这样的 Postgres 向量扩展更简单也更便宜。对于关键词密集的搜索，全文搜索可能取胜。只有当规模、延迟或混合搜索证明合理时，才动用专用向量数据库。

### 什么是 Embedding？

文本的数值表示，其中相似的含义落在向量空间中相近的点上。它们让系统即使在措辞完全不同的情况下，也能把查询与相关内容匹配起来。

相关术语

- [RAG](/zh/glossary/rag/)
- [LLM](/zh/glossary/llm/)

相关服务

- [人工智能](/zh/services/artificial-intelligence/)

相关案例研究

- [Quivr](/zh/case-studies/quivr/)

相关指南

- [如何为 MVP 选择技术栈](/zh/software-development-guide/how-to-choose-a-tech-stack-for-mvp/)

聊聊

## Structured Data

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@id": "https://wavect.io/#organization",
      "@type": [
        "Organization",
        "ProfessionalService",
        "LocalBusiness"
      ],
      "employee": [
        {
          "@id": "https://wavect.io/team/kevin-riedl/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Kevin Riedl",
          "url": "https://wavect.io/team/kevin-riedl/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        },
        {
          "@id": "https://wavect.io/team/christof-jori/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Christof Jori",
          "url": "https://wavect.io/team/christof-jori/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        }
      ],
      "founder": [
        {
          "@id": "https://wavect.io/team/kevin-riedl/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Kevin Riedl",
          "url": "https://wavect.io/team/kevin-riedl/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        },
        {
          "@id": "https://wavect.io/team/christof-jori/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Christof Jori",
          "url": "https://wavect.io/team/christof-jori/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        }
      ],
      "legalRepresentative": [
        {
          "@id": "https://wavect.io/team/kevin-riedl/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Kevin Riedl",
          "url": "https://wavect.io/team/kevin-riedl/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        },
        {
          "@id": "https://wavect.io/team/christof-jori/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Christof Jori",
          "url": "https://wavect.io/team/christof-jori/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        }
      ],
      "name": "Wavect GmbH",
      "subjectOf": {
        "@id": "https://wavect.io/verified-claims.json#dataset",
        "@type": "Dataset",
        "creator": {
          "@id": "https://wavect.io/#organization",
          "@type": [
            "Organization",
            "ProfessionalService",
            "LocalBusiness"
          ]
        },
        "description": "A machine-readable registry of quantitative and qualitative claims published by Wavect, with review dates, localized page appearances and public third-party citations where available.",
        "inLanguage": "en",
        "isAccessibleForFree": true,
        "license": "https://creativecommons.org/licenses/by/4.0/",
        "name": "Wavect verified publication claims",
        "url": "https://wavect.io/verified-claims.json"
      },
      "url": "https://wavect.io/"
    },
    {
      "@id": "https://wavect.io/team/kevin-riedl/#person",
      "@type": "Person",
      "jobTitle": "Managing Director",
      "name": "Kevin Riedl",
      "sameAs": [
        "https://www.wikidata.org/wiki/Q139796365",
        "https://www.linkedin.com/in/wsdt",
        "https://github.com/wsdt"
      ],
      "url": "https://wavect.io/team/kevin-riedl/",
      "worksFor": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      }
    },
    {
      "@id": "https://wavect.io/team/christof-jori/#person",
      "@type": "Person",
      "jobTitle": "Managing Director",
      "name": "Christof Jori",
      "sameAs": [
        "https://www.wikidata.org/wiki/Q139796367",
        "https://www.linkedin.com/in/jocr77/",
        "https://github.com/jo-chris"
      ],
      "url": "https://wavect.io/team/christof-jori/",
      "worksFor": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      }
    },
    {
      "@id": "https://wavect.io/#website",
      "@type": "WebSite",
      "inLanguage": [
        "en",
        "de",
        "es",
        "zh"
      ],
      "name": "Wavect",
      "potentialAction": {
        "@type": "SearchAction",
        "query-input": "required name=search_term_string",
        "target": {
          "@type": "EntryPoint",
          "urlTemplate": "https://wavect.io/search/?q={search_term_string}"
        }
      },
      "publisher": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      },
      "url": "https://wavect.io/"
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@id": "https://wavect.io/zh/glossary/vector-database/#term",
      "@type": "DefinedTerm",
      "alternateName": [
        "Embeddings",
        "Vector Search",
        "Vector DB"
      ],
      "description": "一种把文本存储为数值向量的数据库，使你能够按含义而非精确关键词来搜索，它是大多数 RAG 系统所运行的检索引擎。",
      "inDefinedTermSet": "https://wavect.io/zh/glossary/#termset",
      "name": "Vector Database",
      "termCode": "vector-database",
      "url": "https://wavect.io/zh/glossary/vector-database/"
    },
    {
      "@id": "https://wavect.io/zh/glossary/vector-database/#webpage",
      "@type": "WebPage",
      "about": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      },
      "author": {
        "@id": "https://wavect.io/team/kevin-riedl/#person",
        "@type": "Person",
        "name": "Kevin Riedl",
        "url": "https://wavect.io/team/kevin-riedl/"
      },
      "dateModified": "2026-06-02",
      "description": "一种把文本存储为数值向量的数据库，使你能够按含义而非精确关键词来搜索，它是大多数 RAG 系统所运行的检索引擎。",
      "headline": "Vector Database",
      "inLanguage": "zh",
      "isPartOf": {
        "@id": "https://wavect.io/#website",
        "@type": "WebSite"
      },
      "lastReviewed": "2026-06-02",
      "mainEntity": {
        "@id": "https://wavect.io/zh/glossary/vector-database/#term"
      },
      "mentions": [
        {
          "@id": "https://wavect.io/#organization",
          "@type": [
            "Organization",
            "ProfessionalService",
            "LocalBusiness"
          ]
        },
        {
          "@type": "Service",
          "name": "人工智能",
          "url": "https://wavect.io/zh/services/artificial-intelligence/"
        }
      ],
      "name": "Vector Database",
      "reviewedBy": {
        "@id": "https://wavect.io/team/christof-jori/#person",
        "@type": "Person",
        "name": "Christof Jori",
        "url": "https://wavect.io/team/christof-jori/"
      },
      "speakable": {
        "@type": "SpeakableSpecification",
        "cssSelector": [
          ".gls-single__h1",
          ".gls-single__tldr"
        ]
      },
      "url": "https://wavect.io/zh/glossary/vector-database/"
    },
    {
      "@type": "BreadcrumbList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "item": "https://wavect.io/zh/",
          "name": "首页",
          "position": 1
        },
        {
          "@type": "ListItem",
          "item": "https://wavect.io/zh/glossary/",
          "name": "技术、产品与合作模式术语表",
          "position": 2
        },
        {
          "@type": "ListItem",
          "item": "https://wavect.io/zh/glossary/vector-database/",
          "name": "Vector Database",
          "position": 3
        }
      ]
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "用来按含义而非精确关键词搜索。文本被存储为 Embedding（数值向量），查询返回最接近的匹配。它是大多数 RAG 系统所依赖的检索层。"
      },
      "name": "向量数据库用来做什么？"
    },
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "通常不需要。对于小型语料库，像 pgvector 这样的 Postgres 向量扩展更简单也更便宜。对于关键词密集的搜索，全文搜索可能取胜。只有当规模、延迟或混合搜索证明合理时，才动用专用向量数据库。"
      },
      "name": "我需要专用的向量数据库吗？"
    },
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "文本的数值表示，其中相似的含义落在向量空间中相近的点上。它们让系统即使在措辞完全不同的情况下，也能把查询与相关内容匹配起来。"
      },
      "name": "什么是 Embedding？"
    }
  ],
  "speakable": {
    "@type": "SpeakableSpecification",
    "cssSelector": [
      ".faq-question",
      ".faq-answer"
    ]
  }
}
```
