All insights
Technology ExplainedData & Database

How vector search finds incidents described in different words

A customer writes, “My laptop keeps turning itself back on.” An engineer once recorded a similar symptom as an intermittent reboot. Follow the search from those two descriptions to a ranked list, and see how an index can miss a close match or a keyword can recover an error code.

A speaker on the green Oracle Cloud Summit stage explains vector representations of images, documents and video.
Oracle Cloud Summit in Seoul 2025 · Representing different types of data as vectors

From “it turns itself back on” to an intermittent reboot

Imagine a support desk receives this message about a laptop: “It keeps turning itself back on while I’m using it.” An engineer who investigated a similar symptom wrote “intermittent reboot” in the incident record. The descriptions share few words. Finding that earlier report would let the support engineer check the hardware, the operating system and the fix that was tried.

Vector search retrieves records whose meaning is close even when their wording differs. An embedding model reads each past symptom description and turns it into a vector, an array of numbers. The same model embeds the incoming question. A distance measure appropriate to the model compares the vectors, and the top K records with the smallest distances form the result. A small distance gives an engineer a reason to read a case first. Establishing a common cause still requires the original diagnostic evidence.

What to store with the vector

When I review an index of support cases, I first follow a vector back to its source. A record identifier should lead to both the symptom text and its vector. Product numbers and reporting dates belong in separate fields. A search for “similar symptoms on this product in the last week” can then test dates and products directly and use distance to rank the symptoms.

You can import precomputed vectors, call an external embedding service or run a model inside the database. The decision depends on where incident records may travel and who updates the vector when the text changes. A separate search copy also needs a way to receive edits and changes to access permissions. From generating embeddings to running a search

When the closest record sits just outside the search

Exact search computes the distance from the question to every eligible record and returns the closest K. That ranking provides a baseline for the chosen model and distance measure. As the collection grows, the number of distance calculations per question grows with it. An approximate search uses an index to narrow the initial candidate set. How exact similarity search works

Two common indexes narrow the search in different ways. A hierarchical navigable small-world graph (HNSW) links neighboring vectors in layers. A query finds a promising region in an upper layer, then explores nearby records in more detail below. An inverted file index (IVF) groups vectors around cluster centers. At query time it selects a few nearby centers and compares records in those clusters. Graph and partition-based vector indexes

The small, one-dimensional example below shows what happens at a cluster boundary. The query Q is nearer the center of the first cluster, but its nearest individual record, C, belongs to the second. Distance to a cluster center and distance to a record answer different questions. Change the number of clusters to see when C enters the result.

One dimension, one query and four records
Q 4.8A 2.0B 4.0Group 1 · center 3.0C 5.1D 8.9Group 2 · center 7.0
The two closest records by search breadth
Exact search

Compare all four records with the query. The two shortest distances form the reference ranking.

1. C
Distance to query: 0.3
2. B
Distance to query: 0.8
Probe one cluster

The centers are 1.8 and 2.2 units from Q. Comparing A and B in the first cluster excludes C in the second.

1. B
Distance to query: 0.8
2. A
Distance to query: 2.8
Probe both clusters

Opening both clusters includes C. In this example all four records are considered, reproducing the exact ranking.

1. C
Distance to query: 0.3
2. B
Distance to query: 0.8

Opening only one cluster recovers B, one of the two nearest records in the exact result. Recall@2 for this query is 1/2. This measures how closely the index reproduces the distance ranking. To judge whether engineers actually find the records they need, pair representative questions with the cases that helped resolve them and evaluate those separately.

When a support ticket includes an error code

A ticket may contain both “recovery stopped midway” and an error code. Vector search can match different descriptions of a stalled recovery. A single digit in the error code can distinguish two otherwise similar incidents. If codes have their own column, filter on that value. If they occur in free text, first check that the search recognizes the hyphen and digits as one code.

Hybrid search combines evidence from both searches. To prioritize cases that match the code and resemble the symptom, inspect their intersection. To find older cases that omit the code, keep candidates from either search and combine ranks or normalized scores. I start with the cost of a miss: would overlooking the code or overlooking the symptom do more damage to this investigation? Combining keyword and vector search

When a retrieved record supports an answer

A list of similar cases gives an engineer records to open. Retrieval-augmented generation (RAG) also passes selected passages and the question to a language model to draft an answer. A previous case may say that an operating system update fixed a reboot. Until we know the current laptop model and software version, the passage is evidence about that earlier case.

I ask two questions in a search review. “Did the index retain the neighbors that exact search found?” And “Do those documents support this action for the current incident?” The first question tests the index configuration. The second tests the data and the retrieval criteria. The next article looks at questions that need a business record to determine which documents apply. From vector search to agents: designing the order of retrieval

How does a symptom become a ranked list of incidents?

From distance to rankIllustrative 2D vectors · Euclidean distance
  1. Embed the symptom
    It turns itself back onQ [0.2, 0.4]
  2. Compare distancesQABC
  3. Return the nearest records
    1. A
    0.10
    2. B
    0.40
    3. C
    0.60

Key concepts

Embedding
A model represents features of a sentence or image as an array of numbers. Using a compatible embedding space makes a new question comparable with the stored records.
Approximate nearest-neighbor search
Graph links or cluster centers narrow the set of candidates to inspect. Comparing fewer candidates saves distance calculations and can leave out a close record.
Hybrid search
Combine candidates from keyword and vector search to account for both exact clues, such as error codes, and symptoms described in different words.

Design considerations

When an important case is missing, run an exact search with the same constraints. If it returns the case, inspect the index search breadth. If the case also ranks poorly in exact search, check whether the source contains the clue and whether the model and distance measure preserve it.

Background and sources

Event
Oracle Cloud Summit in Seoul
Event date
Session title
Oracle AI Vector Search
Session
Track B
Role at the event
Oracle Korea · Principal Architect, Solution Engineering
Oracle's event announcement