> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hr-easy.nlead.ch/llms.txt
> Use this file to discover all available pages before exploring further.

# Semantic search

> Embeddings, multi-dimensional sentiment, semantic event history, and the reasoning layer.

Keyword search finds the word you typed. Semantic search finds what you meant. The
module layers four capabilities, each usable on its own and combined by a reasoning
engine.

## 1. Embeddings

Records are indexed as vector embeddings using Voyage AI — a text model for written
content and a multimodal model where documents carry visual structure.

Indexing is incremental: entities are indexed as they change, removed when they are
deleted, and can be batch-indexed for a backfill. A search returns the semantically
nearest records with their similarity.

This is what turns "primary teacher with special-needs experience and French" into a
useful candidate list even when no application contains that phrase.

## 2. Sentiment

Multi-dimensional sentiment analysis across **eight dimensions**, computed for an
individual or aggregated for a team, with a trend over time.

<Warning>
  Sentiment is a **signal about text**, not a measurement of a person. It is not presented as a
  score in a personnel file, it does not feed a ranking, and it is not available to roles that
  cannot already read the underlying content. Per [ADR-006](/concepts/design-philosophy), a
  pseudo-objective number about a human being is not permitted to masquerade as a fact.
</Warning>

Team-level aggregates follow the same small-population caution as
[surveys](/guides/people/surveys): an aggregate that identifies an individual is not an
aggregate.

## 3. Semantic event history

Material events are recorded with their semantic content, so history can be queried by
meaning and by time — "what changed for this team in the six months before the
resignations?" — rather than by scrolling an audit log.

Events are entity-scoped, so a history query returns one person's or one team's arc.

## 4. The reasoning layer

The reasoning engine combines the three layers to answer an HR question in language:
it retrieves the semantically relevant records, pulls the relevant history, and reasons
over them.

What it returns includes **what it looked at**. An answer without its basis is not
usable in an HR conversation, and per ADR-006 it is not acceptable as a product
either.

## Permissions

Semantic search does not widen access. Results are filtered to what the asking user is
already permitted to see — a manager searching candidates sees the positions they are
responsible for; salary content stays masked according to the
[visibility rules](/guides/people/compensation#salary-visibility).

Notably, `SYSTEM_ADMIN` is excluded from the AI surfaces entirely, precisely because
they can reproduce indexed employee content.

## Auditing

Searches, reasoning calls, sentiment computations and indexing runs are all audited as
`AI_OPERATION`, with token usage recorded.

## Applicant opt-out

An applicant who declines AI processing has no index entry. If they withdraw consent
after one was created, both the generated summary **and the search index entry derived
from their application are deleted**. See [AI transparency](/guides/ai/transparency).

## Configuration

Requires `VOYAGE_API_KEY` for embeddings and `ANTHROPIC_API_KEY` for reasoning and
sentiment. Disable with `FEATURE_SEMANTIC_SEARCH=false`.
