Relevance
Relevance is the degree to which information, a result, or a response pertains to a query, task, purpose, or information need.
Elasticsearch in Action, Second Edition
Relevance is the degree to which a search result matches a query's intent or information need.
- How it is used
- Ranks full-text search results so documents most appropriate to a user query appear first.
- How deep it goes
- Defines scored ranking, explains BM25 factors and field-length normalization, and defers detailed alternatives to similarity algorithms.
- Examples
- Uses Java book-title searches, Stack Overflow results, retail searches, and a Java-score result figure.
- What you can do after
- Apply it via Elasticsearch full-text queries to retrieve and rank documents for text searches.
Read how Elasticsearch in Action, Second Edition explains relevance →
MongoDB 8.0 in Action, Third Edition
A relevance score is a numeric value representing how closely a search result matches the search criteria.
- How it is used
- Ranks Atlas Search matches by how closely documents satisfy search criteria.
- How deep it goes
- Explains scoring factors and demonstrates score extraction, sorting, and summary statistics without deriving Lucene’s scoring formula.
- Examples
- Uses inspection searches with required text matches and a local fuzzy search that returns the three highest-scoring results.
- What you can do after
- Apply it via Atlas Search to display scores and order matching documents by relevance.
Read how MongoDB 8.0 in Action, Third Edition explains relevance →
AI-Powered Search
A relevance grade is an ordinal, categorical, or numeric assessment of how relevant a document is to a query.
- How it is used
- Orders matching search results and supplies query–document judgments for training ranking models.
- How deep it goes
- Distinguishes computed scores from training grades, then works through filtering, feature weights, and click-derived grades without defining an absolute score threshold.
- Examples
- Uses movie-query judgments and a search-session table of clicks, examinations, and grades.
- What you can do after
- Apply it via Solr boost queries to adjust ranking separately from filtering, and evaluate training grades against their click evidence.
AI for Everyday IT
Relevance is the quality of directly relating information or requirements to the task or use case being addressed.
- How it is used
- Keeps AI prompts focused on the task, situation, and intended use of the response.
- How deep it goes
- Explains relevance through contrasting prompts and practical revisions, while stopping short of model internals.
- Examples
- Uses database selection, IT-support ticket sorting, small-project planning, and role-specific interview practice.
- What you can do after
- Apply relevance by adding situation, purpose, and requirements to prompts before evaluating the resulting response.
Effective Conversational AI
Answer relevance is the degree to which an answer directly addresses the user's question and context.
- How it is used
- Assesses whether a generated chatbot answer addresses the user’s particular question and context.
- How deep it goes
- Defines question–answer fit and contrasts it with faithfulness, but gives no scoring formula for answer relevancy.
- Examples
- Contrasts an order-status reply with unnecessary detail and generic restaurant advice with location-specific guidance.
- What you can do after
- Evaluate/understand whether a chatbot’s response answers the user’s actual question, separately from whether retrieved information supports it.
Generative AI in Action
Answer relevancy is a metric that measures how directly a generated answer addresses the question or information need.
- How it is used
- Uses relevance to assess whether LLM outputs satisfy the context and intent of their intended application.
- How deep it goes
- Defines a five-point rubric and comparison steps, but defers deeper metric mechanics and full framework implementation.
- Examples
- Compares two summaries of a Gates Foundation article and demonstrates G-Eval and DeepEval evaluation workflows.
- What you can do after
- Evaluate summaries and other LLM outputs with explicit criteria, scores, comparisons, and ongoing test monitoring.
The Art of AI Product Development
A metric measuring how directly a generated answer addresses the user's query or intent.
- How it is used
- Evaluates whether generated RAG responses satisfy the user’s query, requested content, and required depth.
- How deep it goes
- Defines relevance, contrasts it with groundedness, and illustrates evaluation criteria without specifying a formal scoring method.
- Examples
- Uses an AI-trends report, requested depth, user-specific transformations, and style or tone feedback as evaluation cases.
- What you can do after
- Evaluate/understand RAG responses with query-specific criteria and identify when prompting, retrieval, or generation needs improvement.
Read how The Art of AI Product Development explains relevance →
WordPress Power Toolkit: Harness AI to build next-level websites
Search relevance is the degree to which a search result corresponds to the meaning and subject matter of a user's query.
- How it is used
- Explains how search systems prioritize meaningful results and how website elements support a page’s central message.
- How deep it goes
- Defines relevance, connects it to semantics and latent semantic indexing, and applies it to a visual critique without developing the underlying mathematics.
- Examples
- Uses query interpretation, the meanings of “right,” semantically rich content, and a disconnected potato image on an Instant Pot homepage.
- What you can do after
- Evaluate search content and website elements for alignment with user intent, subject matter, message, placement, and context.
Read how WordPress Power Toolkit: Harness AI to build next-level websites explains relevance →
Build an AI Agent (From Scratch)
Relevance is the degree to which an answer focuses on the central aspects of a user's question without unrelated content.
- How it is used
- Evaluates whether an agent answers the user’s core question directly instead of producing unrelated, evasive, or incomplete content.
- How deep it goes
- Defines binary PASS/FAIL criteria and embeds them in a rubric-based evaluator, without using partial credit for this item.
- Examples
- Uses user prompts, final answers, expected answers, evidence excerpts, and PASS/FAIL evaluation outputs as assessment artifacts.
- What you can do after
- Evaluate agent answers with a binary rubric and track answer relevancy rates alongside other quality indicators.
Read how Build an AI Agent (From Scratch) explains relevance →
Starting Data Analytics with Generative AI and Python
Relevance is the data-quality property of being pertinent to the specific business question or problem being addressed.
- How it is used
- Keeps text analysis tied to the specific business question and the portion of reality being examined.
- How deep it goes
- Defines relevance and supplies inspection questions, but stops short of prescribing a formal relevance score or algorithm.
- Examples
- Uses competitor reviews, outdated reviews, order-linked comments, general impressions, and duplicated complaints as checks.
- What you can do after
- Evaluate whether text data belongs to the business question before analyzing it.
Read how Starting Data Analytics with Generative AI and Python explains relevance →
Building Reliable AI Systems
A measure of how directly an answer addresses the question or task posed.
- How it is used
- Evaluates how relevant generated answers are to their questions in RAG systems.
- How deep it goes
- Calculates question-answer embedding cosine similarity but does not detail model selection or implementation.
- Examples
- Uses a question-answer similarity score of 0.85 as an answer-relevance example.
- What you can do after
- Evaluate answer relevance by comparing question and answer embeddings with cosine similarity.
Related concepts
- Ragaspart of · Ragas is an open-source framework and Python library for evaluating retrieval-augmented generation systems and applications.
- cosine similaritymeasured by · Cosine similarity measures the directional alignment of two nonzero vectors as the cosine of the angle between them, equivalently their dot product divided by the product of their magnitudes.
- human-in-the-loopmeasured by · Human-in-the-loop is a system pattern in which people provide input, judgment, review, or intervention within an automated process.
- retrieval metricmeasures · A retrieval metric measures how relevant, accurate, complete, or useful the information returned by an information-retrieval system is for a query or task.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.










