AI fundamentals

Vector

AI-assisted editorial review:

A vector is an ordered list of numbers. In AI embedding applications, it can represent the meaning of a word, sentence, image or piece of code so that a computer can work with it. Models are trained so that items with similar meanings end up close together in this vector space.[1][2] Vectors produced this way are often called embeddings.[2][3]

What does Vector mean in simple terms?

A vector gives each piece of content a set of "coordinates". If similar content is placed at nearby coordinates, a computer can answer "what is similar to this?" just by measuring distance.[3] Recommendation systems use this idea: Spotify has used nearest-neighbor search over vectors for features such as Discover Weekly and Home.[6] The same idea sits behind AI assistants that answer from company documents: the question is turned into a vector, and the passages closest in meaning are retrieved and used in the answer (retrieval-augmented generation, or RAG).[4] That is why vectors matter for search, recommendations and RAG alike.

How can Vector be explained with an analogy?

Every item gets coordinates on one shared map, and a question is placed on the same map so the nearest items can be picked first.

Where is Vector used?

Case 1

OpenAI text-embedding-3 — Better multilingual retrieval at a lower price

In January 2024 OpenAI released two embedding models, text-embedding-3-small and text-embedding-3-large.[4] By default, text-embedding-3-small returns a 1,536-dimension vector and text-embedding-3-large a 3,072-dimension vector.[3] On the MIRACL multilingual retrieval benchmark, the average score rose from 31.4% for the previous text-embedding-ada-002 to 44.0% for the small model and 54.9% for the large model.[4] At launch, the small model cost USD 0.00002 per 1,000 tokens, one fifth of ada-002's USD 0.0001.[4] This kind of model helps find questions that use different words but mean the same thing, which keyword search often misses.
Result: MIRACL average 31.4% → 44.0% (small) and 54.9% (large); small-model price cut 5x at launch (OpenAI, 2024-01-25).[4]

Case 2

Woowa Brothers (Baemin) — Choosing a vector search setup for real-time restaurant recommendations

Woowa Brothers, which runs the Korean food delivery app Baemin, described in January 2025 how it built real-time recommendations: user interests and restaurants are turned into embeddings and compared by vector similarity.[5] Recommendations had to be limited to restaurants that can deliver to the user's current location, which is only known at request time. In this setup, filtering first meant the prebuilt approximate-search index (such as HNSW) could not be used, so the team compared exact search options.[5] After functional tests and load tests of Atlas MongoDB, OpenSearch and PostgreSQL with pgvector on Amazon RDS, pgvector on RDS handled the most requests per second without failures in their scenario.[5] The team noted that results reflect their own scenario and the versions available at the time.[5]
Result: pgvector on Amazon RDS chosen after load testing; the post's summary of its earlier installment reported CTR up 23% for the overall real-time recommendation system (company tech blog, 2025-01-13).[5]

Case 3

Spotify Voyager — A faster nearest-neighbor library for recommendations

Spotify built and open-sourced Annoy, a nearest-neighbor search library, in 2013, and used it for features such as Discover Weekly and Home.[6] In October 2023 it released Voyager, based on the HNSW library hnswlib, as Annoy's successor for production use.[6] Spotify reported that Voyager runs more than 10 times faster than Annoy at the same recall, or up to 50% more accurate at the same speed, and uses up to 4 times less memory.[6] Voyager had been serving production traffic at Spotify since 2022.[6]
Result: More than 10x the speed of Annoy at the same recall (Spotify Engineering, 2023-10-25).[6]

Case 4

Research — A "truth direction" inside an LLM

In "The Geometry of Truth" (October 2023), Samuel Marks and Max Tegmark studied how large language models represent simple true and false statements.[7] Visualizations showed clear linear structure, probes trained on one dataset transferred to others, and intervening on the model's internal activations made it treat false statements as true and vice versa.[7] The authors concluded that, at sufficient scale, LLMs linearly represent whether a factual statement is true.[7] This shows vectors are also a tool for understanding what happens inside a model, not only for search.
Result: Evidence that LLMs represent truth along a linear direction; simple difference-in-mean probes generalized as well as other probing methods (arXiv, 2023-10).[7]

Try it today

  1. Pick about 50 entries from your company FAQ or wiki and turn them into vectors with an embedding model such as text-embedding-3-small.[3]
  2. Write a short script that finds the FAQ entry with the highest cosine similarity to a user question.[3]
  3. Run the same questions through keyword search and vector search, and compare how often the right answer appears in the top 3.
  4. Load the vectors into pgvector or a managed vector database, and measure response time as the data grows.[5][10]
  5. Note the question types that are still missed, and decide what to try next: another embedding model, a different number of dimensions, or a re-ranking step.

Limits and direction

Similarity scores need care. A 2024 paper by Steck, Ekanadham and Kallus showed that cosine similarity between learned embeddings can produce arbitrary results depending on how the model was trained and regularized, and cautioned against using it blindly.[8] Do not make decisions from a single score: before going live, check results with your own evaluation set and combine vector search with keyword search or re-ranking. A model that scores well on an English benchmark may behave differently on your language and domain, so test with your own data. Larger vectors cost more compute, memory and storage, so weigh fit and cost instead of always choosing the biggest model.[4]

On the infrastructure side, HNSW, proposed by Malkov and Yashunin in 2016, builds a layered graph for fast approximate nearest-neighbor search.[9] It underpins tools such as Spotify's Voyager and is supported in pgvector.[5][6] Managed services keep pushing scale: InfoQ's December 2025 report on Pinecone's Dedicated Read Nodes preview cited vendor-shared figures for an e-commerce customer serving about 1.4 billion vectors at 5,700 queries per second with median latency in the tens of milliseconds.[10] OpenAI's text-embedding-3 models let developers shorten vectors with a dimensions parameter while keeping most of their meaning, so storage cost and speed can be tuned directly.[3][4] Research such as "The Geometry of Truth" suggests that directions in a model's vector space can relate to concepts such as truth, extending vectors into interpretability and safety work.[7]

Which concepts are related to Vector?

  • Related concept
    ThroughputA basic concept that often comes up alongside vectors when sizing vector search systems.
  • Related concept
    LatencyA basic concept that often comes up alongside vectors; vector search is usually judged by its response time.
  • Related concept
    SWE-benchAnother basic term from the same category that often appears in AI model discussions.

Which sources explain Vector?

  1. arXiv — Mikolov et al., Efficient Estimation of Word Representations in Vector Space (2013-01-16) — https://arxiv.org/abs/1301.3781
  2. Stanford University — CS224N Lecture 2: Word Vectors (2026) — https://web.stanford.edu/class/cs224n/slides_w26/cs224n-2026-lecture02-wordvecs.pdf
  3. OpenAI — Vector embeddings, API guide (accessed 2026-10-13) — https://developers.openai.com/api/docs/guides/embeddings
  4. OpenAI — New embedding models and API updates (2024-01-25) — https://openai.com/index/new-embedding-models-and-api-updates/
  5. Woowa Brothers Tech Blog — Real-time responsive recommendation, part 2: vector search (2025-01-13, Korean) — https://techblog.woowahan.com/21027/
  6. Spotify Engineering — Introducing Voyager: Spotify's new nearest-neighbor search library (2023-10-25) — https://engineering.atspotify.com/2023/10/introducing-voyager-spotifys-new-nearest-neighbor-search-library
  7. arXiv — Marks & Tegmark, The Geometry of Truth: Emergent Linear Structure in LLM Representations of True/False Datasets (2023-10-10) — https://arxiv.org/abs/2310.06824
  8. arXiv — Steck, Ekanadham & Kallus, Is Cosine-Similarity of Embeddings Really About Similarity? (2024-03-08) — https://arxiv.org/abs/2403.05440
  9. arXiv — Malkov & Yashunin, Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs (2016-03-30) — https://arxiv.org/abs/1603.09320
  10. InfoQ — Pinecone Introduces Dedicated Read Nodes in Public Preview for Predictable Vector Workloads (2025-12-23) — https://www.infoq.com/news/2025/12/pinecone-drn-vector-workloads/