AI educationIntermediate

Vector Search vs Keyword Search in Study Tools

Keyword search finds exact words; vector search finds nearby meaning. Strong study systems usually need both.

Vector searchKeyword searchRAGHybrid retrieval
Abstract blue lexical signals and gold semantic signals converging into a ranked stream of documents.

Visual explainer

Two search engines. One answer.

Tap a signal to see what it contributes. Hybrid search keeps the precision of exact terms and the intuition of meaning.

What changesExact words

A lexical index locks onto identifiers, names, acronyms, and precise phrases. It is the fast, literal signal.

Interactive model

Two signals, one ranked evidence set

The ranked evidence demo shows why exact keyword matches and vector similarity should both influence retrieval.

Live HTML simulation · adjust the controls and watch the computed output respond.

Interactive

Hybrid retrieval turns a vague study question into ranked evidence

Syllabus policieslexical 0.50 / expanded meaning 0.68
0.58
Canvas calendar exportlexical 0.50 / expanded meaning 0.68
0.58
Lecture: embeddingslexical 0.33 / expanded meaning 0.45
0.39
Study guide draftlexical 0.00 / expanded meaning 0.23
0.10

This is a simplified teaching model. Its displayed values are computed from the controls; the article explains where the model stops.

Site connection

Lykke uses document embeddings, hybrid search, and reranking to retrieve course evidence before generating study artifacts.

Two Kinds of Relevance

Keyword search is lexical. It cares whether the same tokens appear. Vector search is semantic. It cares whether two chunks mean similar things under an embedding model.

Keyword winsCourse codes, theorem names, exact acronyms, dates, formulas.
Vector winsParaphrases, conceptual questions, vague student language.
Hybrid winsMost real study questions, because students mix exact terms and fuzzy intent.

Why Exact Matching Still Matters

Keyword search is lexical: it indexes terms and finds records containing matching tokens or phrases. When a student asks for 'CS 111 Project 2 rubric,' the course code, project number, and rubric label should remain strong signals.

Full-text indexes such as SQLite FTS5 support token-based queries and ranking. Their strength is literal precision, not human-like understanding, so vocabulary mismatch remains a predictable failure mode.

Why Semantic Search Matters

Students rarely ask in the words used by a slide deck. A lecture may say 'gradient-based optimization' while the student asks 'how does the model learn from error?' Embeddings can connect those meanings, although proximity is not proof that a passage answers the question.

The Lykke source describes vector similarity plus keyword hybrid search, followed by reranking and source-linked study artifacts.

Reference table for this concept
Query typeUseful first signal
Exact assignment nameKeyword
Vague conceptual questionVector
Formula with notationKeyword plus metadata
Study-plan requestVector plus calendar metadata
Acronym or abbreviationKeyword

Worked Example

For 'Why does the optimizer move opposite the slope?', a chunk titled 'Gradient Descent Update Rule' may never use that exact phrase. Vector search can surface the paraphrased relationship even when lexical overlap is thin.

For 'Find the CS 210 gradient descent lab rubric,' semantic retrieval may return many explanations, while lexical matching favors the exact course code, lab name, and word 'rubric.' Hybrid retrieval collects both; current-course metadata and reranking should put the rubric first.

Lexical relevance and vector similarity may use unlike scales, so their scores should not be averaged blindly. Fusion must be explicit, overlap deduplicated, and final evidence inspected.

Keep the query and corpus fixed while comparing lexical, vector, and hybrid modes; otherwise differences may come from the test setup.

How Hybrid Ranking Is Built

A hybrid system runs lexical and vector retrieval and receives two ranked lists. A documented normalization or rank-fusion rule combines candidates without assuming raw scores mean the same thing.

Deduplication removes repeats, metadata can filter the current course or content type, and a reranker can score a smaller set against the full query. Incorrect metadata can also hide the right passage, so every stage needs tests.

Reference table for this concept
DecisionPurposeRisk
Candidate depthGive both signals enough recallToo shallow misses evidence; too deep adds cost and noise
Fusion ruleCombine unlike rankings consistentlyRaw-score addition may be meaningless
DeduplicationReserve slots for distinct evidenceNear-duplicates crowd out coverage
RerankingUse richer query-passage comparisonCannot repair missing candidates

Evaluation by Query Type

Build a labeled set of exact identifiers, paraphrases, formulas, misspellings, multi-part requests, and stale-versus-current documents instead of judging a few memorable searches.

Compare recall and ranking position on the same corpus for each configuration. Measure latency and inspect failure clusters because an aggregate gain can hide regressions on exact assignment queries.

Limits and Common Misconceptions

Keyword search is not obsolete, and vector search does not understand a document as a human does. Vector proximity can mean broad topical similarity without answering the query; lexical overlap can occur in irrelevant boilerplate.

Hybrid search is not automatically superior. Poor tokenization, a mismatched embedding model, incomparable score scales, stale metadata, duplicates, or a weak fusion rule can make it worse than a tuned single method.

No ranking algorithm can return a formula, table, or rubric condition that parsing and chunking discarded.

Common Pitfalls

  • Using only vector search and missing exact course identifiers.
  • Using only keyword search and missing paraphrases.
  • Merging rankings without deduplication.
  • Letting semantically similar but stale course content outrank the current assignment.

Sources and Further Reading

Related Explainers