What you will learn in AI-Powered Search
Chapter by chapter
Chapter 14: Question answering with a fine-tuned large language model
What you learn in chapter 14 →Concepts explained in this book
- similarity searchA search engine is software that indexes information and retrieves or ranks items in response to user queries.
- knowledge graphA knowledge graph is a graph-structured representation of entities and the relationships and attributes connecting them.
- embeddingA vector representation is a data structure or encoding used to store and work with the components of a vector.
- ranking modelA relevance model is a predictive model that estimates how well a document satisfies a query or user information need.
- lexical searchKeyword matching is a retrieval technique that identifies content by comparing query keywords with indexed textual terms.
- behavioral dataUser behavior is the set of observable actions and interactions that people perform while using a search or information system.
- rerankingA reranker is a search component that reorders an initially retrieved or ranked set of results using additional relevance information.
- personalizationPersonalization is the adaptation of search results or behavior to an individual user's characteristics, context, or history.
- language modelA large language model is a neural language model trained on large text corpora to predict and generate language and perform related language-understanding tasks.
- foundational modelA pretrained model is a model that has already been trained on general data before adaptation to a particular task or domain.
- retrieval-augmented generationRetrieval augmented generation is a technique that supplies retrieved external information to a generative model as context for producing a response.
- fine-tuningFine-tuning is additional training of a pretrained model on task-specific data to adapt its behavior or performance.
- question answeringQuestion answering is the task of producing an answer to a natural-language question from available information.
- intentionUser intent is the goal or information need that motivates a person's query or interaction with a search system.
- inner productA dot product is the sum of pairwise products of corresponding components of two vectors.
- training datasetA training set is the subset of examples supplied to a model during parameter fitting or adaptation.
- collaborative filteringCollaborative recommendation predicts items or content a user may prefer from the behavior and preferences of similar users.
- inputA feature is a numerical attribute of a document, query, or query-document relationship used to represent evidence for ranking.
- intent classificationQuery classification is the assignment of a search query to one or more predefined intent, topic, or behavior classes.
- cosine similarityCosine similarity measures the angular similarity between two vectors by dividing their dot product by the product of their magnitudes.
- approximate nearest neighbor algorithmApproximate nearest neighbor search is a retrieval technique that finds vectors likely to be nearest to a query vector while reducing the computations required for exact nearest-neighbor search.
- signal boosting modelA signal boosting algorithm ranks documents more highly when aggregated user-interaction signals indicate their importance for particular queries.
- signals boostingSignals boosting is a ranking technique that adjusts the prominence of results according to observed user-interaction signals.
- vector spaceA vector space is a mathematical space whose elements are vectors defined over a common set of dimensions.
- distributional hypothesisThe distributional hypothesis is the linguistic principle that words or phrases appearing in similar contexts tend to have related meanings.
- transformer architectureA transformer is a neural-network architecture that models relationships among sequence elements using attention and can encode and decode representations.
- evaluation datasetA validation set is a held-out dataset used to assess and tune a model during development, separately from training data and a final test set.
- query expansionQuery expansion is a retrieval technique that augments a query with additional terms or representations to improve matching with relevant content.
- contextContext is surrounding linguistic, domain, document, conversational, or user information that helps determine the intended meaning of a query or interaction.
- presentation biasPresentation bias is systematic distortion in observed interactions caused by which items are shown to users.
- query interpretationQuery interpretation is the process of converting a user's query into structured meaning, attributes, entities, or retrieval constraints.
- inverted indexAn inverted index is a data structure that maps terms or tokens to the documents and locations where they occur.
- cross-modal searchCross-modal search retrieves content in one modality from a query expressed in another modality.
- click modelA click model is a model that represents or predicts user clicks on search results to infer their relevance or examination behavior.
- latent spaceA latent factor is a learned, lower-dimensional attribute inferred from data to represent an underlying pattern associated with users or items.
- hybrid searchHybrid keyword and vector search combines lexical term matching with vector-similarity retrieval or ranking.
- semantic functionA semantic function is a domain-specific computational operation that interprets or transforms queries according to meaning rather than literal terms.
- pipelineA pipeline is an ordered sequence of processing stages in which each stage transforms or passes information to the next stage.
- quantizationQuantization is the transformation of numerical values into a smaller set of discrete values to reduce representation precision and resource requirements.
- polysemyPolysemy is the linguistic phenomenon in which a word or phrase has multiple related meanings that depend on usage and context.
- result summarizationThe process of rewriting one or more search results into a shorter, more readable response while preserving their information.
- relevanceA relevance grade is an ordinal, categorical, or numeric assessment of how relevant a document is to a query.
- guardrailA guardrail is a constraint that limits system behavior to prevent inappropriate, unsafe, or irrelevant outcomes.
- domain knowledgeDomain-specific knowledge is information, concepts, terminology, and relationships pertaining to a particular subject area.
- collectionA collection is a logical search-engine unit that contains a schema and configuration and holds indexed documents for searching and retrieval.
- unstructured dataUnstructured data is information without a rigid predefined schema, often containing rich content and relationships in flexible forms such as text, images, video, and audio.
- query treeA query tree is a hierarchical representation of a parsed query whose nodes contain query components and processing metadata.
- distributional semanticsDistributional semantics is a linguistic and computational approach that represents word or phrase meaning through patterns of co-occurrence and contextual distribution.
- canonical formA canonical representation is a normalized form that consistently identifies an entity or concept independently of its alternative textual expressions.
- disambiguationQuery disambiguation is the process of resolving multiple plausible interpretations of a search query.
- semantic parsingSemantic query parsing is the analysis of a query to recover its meaning, entities, relationships, constraints, and intended operation.
- extractive question answeringExtractive question answering selects and returns relevant words, sentences, or passages directly from source documents.
- surface formA surface form is the literal textual expression used to refer to an entity, concept, or meaning in a query or document.
- machine learningMachine learning is a subset of artificial intelligence that trains models on data to perform tasks based on patterns learned from that data.
- cold start problemThe cold start problem is the difficulty of making reliable recommendations for new users or items that have little or no interaction data.
- filteringFiltering is the retrieval operation that excludes items failing specified criteria without necessarily ordering the remaining items by relevance.
- prior probabilityA prior distribution is a probability distribution representing an initial belief about an unknown quantity before incorporating case-specific observations.
- continuous improvementIterative refinement is the progressive improvement of a task result through successive revisions based on new information or feedback.
- text chunkChunking is the process of dividing a document or other content into smaller sections for separate processing or retrieval.
- content-based recommenderA content-based recommendation is a recommendation generated by comparing attributes or features of users or items and suggesting entities with similar attributes.
- user profileA user profile is a representation of an individual user's attributes, preferences, or characteristics.
- retrieval rankingSearch ranking is the process of ordering retrieved items according to their estimated usefulness or relevance to a query.
- reflected intelligenceReflected intelligence is a search-improvement approach that learns from recorded user interactions and feeds the resulting knowledge back into future search behavior.
- position biasPosition bias is the systematic tendency for users to favor higher-ranked search results because of their displayed position, even when lower-ranked results are more relevant.
- query signalA query signal is a recorded search event representing a user's submitted query at a particular time.
- prompt engineeringPrompt engineering is the deliberate design and manipulation of model inputs to influence the behavior or output of a language model.
- signal aggregationSignal aggregation is the process of combining recorded search-interaction events into summarized measures for queries and documents.
- entity and relationship extractionEntity extraction is the identification and extraction of entities from textual content.
- answer spanAn answer span is a contiguous sequence of tokens or words selected from a document as the answer to a question.
- index-time boostingIndex-time boosting is a relevance technique that stores boost values with indexed documents so scoring can apply them without retrieving boost values during query execution.
- Gaussian processA Gaussian process is a collection of random variables whose finite subsets have joint Gaussian distributions and that defines a probability distribution over functions.
- scalar quantizationScalar quantization maps individual numerical vector components from a higher-precision representation to a lower-precision scalar format.
- simplified dynamic Bayesian networkA simplified dynamic Bayesian network is a probabilistic click model that estimates search-result relevance from user examination and click behavior.
- normalizationNormalization is the transformation of numerical features to a comparable scale, often by centering and scaling them according to their mean and standard deviation.
- BERTBERT is a transformer-based language model pretrained to produce contextual representations of text using bidirectional attention.
- generative searchGenerative search produces search responses or results with a generative model instead of only retrieving existing documents.
- abstractive question answeringAbstractive question answering synthesizes information into newly generated answer text rather than selecting text directly from source documents.
- joinA join is an operation that combines records or documents by matching a shared identifier, attribute, or resolved entity.
- judgment listA judgment list is a collection of labeled query-document pairs containing human or system relevance judgments.
- active learningActive learning is a machine learning strategy in which the learner selects informative examples for labeling or feedback.
- matrix factorizationMatrix factorization is a mathematical technique that decomposes a user-item interaction matrix into lower-dimensional factors representing users, latent attributes, and items.
- user-item interaction matrixA user-item interaction matrix is a matrix whose rows and columns represent users and items and whose entries represent the strength of their interactions or ratings.
- human-in-the-loopA judgment is a human assessment of the relevance of a search result to a query or information need.
- Matryoshka Representation LearningMRL is an embedding technique that preserves useful retrieval information when an embedding is truncated to fewer dimensions.
- co-occurrenceCo-occurrence is the occurrence of two terms within the same document or contextual unit.
- misspellingA misspelling is a written word or term that differs from its conventional spelling.
- finite state transducerA finite state transducer is a finite-state machine that maps input sequences to output sequences and can compactly represent and look up many term sequences.
- text taggerA text tagger is a search component that identifies indexed terms or entities occurring in an input text.
- Sentence-BERTSBERT, or Sentence-BERT, is a sentence-embedding method and Python library that adapts BERT-style models to produce semantically meaningful sentence vectors.
- term frequencyTerm frequency is the count or within-document frequency of a term's occurrences, used to measure how strongly a document matches that term.
- clusteringClustering is an unsupervised learning technique that groups items according to similarity.
- expected improvementExpected improvement is a Bayesian-optimization acquisition function that scores candidates by their expected gain over the current best result while accounting for predictive uncertainty.
- structured dataStructured data is information organized according to a predefined schema that supports direct querying and consistent field-based operations.
- sparse vectorA sparse vector is a vector representation in which most component values are zero or absent and only nonzero features are stored or processed.
- SVMrankSVMrank is a learning-to-rank algorithm that reformulates ranking preferences as binary classification examples for a support vector machine.
- recommender systemA software system that infers user interests or behaviors and delivers content or items that it predicts will match them, without requiring an explicit query for each result.
- similarity metricA similarity metric is a numerical measure that quantifies how closely two representations or objects correspond.
- tokenizationTokenization is the process of segmenting text into units such as words, subwords, or punctuation symbols.
- sidecar collectionA sidecar collection is an auxiliary search collection stored alongside a primary collection to hold data that supports search or ranking.
- binary quantizationBinary quantization is a quantization technique that represents each embedding feature with a single binary bit, typically 0 or 1.
- posterior probabilityA posterior distribution is a probability distribution representing an updated belief after incorporating observations into a prior distribution.
- document length normalizationDocument length normalization adjusts term-based relevance scores according to the length of the document containing the terms.
- cross-encoderA cross-encoder is a neural ranking model that jointly encodes two inputs, such as a query and document, to score their relevance using shared representations.
- foreign keyA foreign key is a value or column in one table that references an entity or key in another table to link records.
- traversalGraph traversal is the process of visiting nodes and relationships in a graph according to a specified path or sequence of steps.
- silver setA silver set is a provisional dataset containing automatically generated or weakly labeled examples that have not undergone complete human verification.
- query rewritingQuery rewriting is the transformation of an original search query into an alternative query that preserves or enhances its intended retrieval behavior.
- specialized terminologyA domain-specific phrase is a multiword expression whose meaning or usage is characteristic of a particular subject area.
- readerA reader is a question-answering model or component that analyzes document context and predicts the answer span for a question.
- experimentationA/B testing is an experiment that compares two or more variants by randomly assigning users and measuring outcome differences.
- edgeAn edge is a graph element representing a relationship between two nodes.
- postings listA postings list is an inverted-index structure containing document identifiers and positions associated with a term.
- click signalA click signal is a recorded event indicating that a user clicked a search result document associated with a query.
- hallucinationModel hallucination is the generation of plausible-sounding but incorrect or unsupported content by an AI model.
- retrieve-and-readA retriever-reader pattern is a question-answering architecture that retrieves relevant content and then uses a reader component to derive an answer from it.
- hyperparameterA hyperparameter is a configuration value that controls a model or learning procedure and is set rather than learned from individual examples.
- tokenizerA tokenizer is a text-processing component that segments text into tokens according to a model's tokenization scheme.
- user-item recommendationA user-item recommendation is a recommendation generated from similarity or preference relationships between users and items.
- entity resolutionEntity resolution is the process of determining when different representations refer to the same real-world entity.
- fuzzy foreign keyA fuzzy foreign key is a non-strict relationship identifier whose matches require resolving different representations of the same entity.
- natural language processingNatural language processing is the computational analysis and generation of human language.
- spelling correctionSpelling correction is the identification of misspelled terms and the generation of replacements with their likely conventional spellings.
- ontologyAn ontology is a formal representation of concepts in a domain and the relationships and constraints among them.
- trainingTraining is the process of optimizing a model's parameters from data so that it learns representations or predictive behavior.
- feature loggingFeature logging is the recording or computation of feature values associated with search examples for later model training or analysis.
- semantic similaritySemantic textual similarity is the task or measure of determining how closely two text segments correspond in meaning.
- related queryA related query is a query whose meaning or search behavior is sufficiently associated with another query to form a useful query pair.
- confidence biasConfidence bias is distortion in judged relevance caused by giving statistically unreliable observations the same or greater influence as observations supported by more evidence.
- reciprocal rank fusionReciprocal rank fusion is a rank-based result-combination algorithm that merges rankings from multiple retrieval systems using reciprocal-rank contributions.
- alternating least squaresALS is the alternating least squares algorithm, which estimates factor matrices by iteratively optimizing one factor while holding the other fixed.
- root mean squared errorRoot mean square error is the square root of the mean squared difference between predicted and actual values.
- SparkSpark is a distributed computing platform for processing large datasets and running scalable data-processing and machine-learning workloads.
- sparse vector semantic searchSparse vector search retrieves documents by matching nonzero textual features represented in sparse vectors, typically through an inverted index.
- alternative labelAn alternative label is a domain term or name recognized as an alias for a canonical concept or entity label.
- click-through rateClick-through rate is the number of clicks received by a displayed result divided by the number of times that result was displayed.
- query enrichmentQuery enrichment is the process of adding semantic information, related terms, classifications, or representations to a query before retrieval.
- HNSWHNSW is a graph-based approximate nearest neighbor indexing and search algorithm that builds a multilayer hierarchy of proximity graphs.
- corpusA document corpus is a collection of documents assembled for linguistic analysis or information retrieval.
- product quantizationProduct quantization is a vector-compression technique that partitions an embedding into subvectors and replaces each subvector with the identifier of a nearby centroid.
- data modalityA data modality is a distinct type or channel of information, such as text, images, audio, or behavioral signals.
- probability mass functionA probability mass function assigns probabilities to the possible values of a discrete random variable.
- unit normalizationUnit normalization is the transformation of a vector so that its magnitude equals one.
- artificial intelligenceArtificial intelligence is the capability of a computer program to perform tasks that previously required human intelligence.
- term frequency-inverse document frequencyTF-IDF is a text-weighting metric that combines term frequency and inverse document frequency to estimate a term's importance within a document collection.
- embedding-based retrievalA bi-encoder is a model that independently encodes two inputs, such as a query and a document, into separate embeddings for comparison.
- K-means clusteringK-means is an unsupervised clustering algorithm that partitions items into a specified number of groups by iteratively assigning items to and updating cluster centroids.
- natural language autocompleteNatural language autocomplete suggests completions based on semantic meaning rather than only literal character or keyword matching.
- SolrApache Solr is an open-source search platform built on Apache Lucene that provides indexing, retrieval, and search APIs.
- purchase signalA purchase signal is a recorded event representing the purchase of an individual item associated with a user's search interactions.
- natural language understandingNatural language understanding is the computational interpretation of human language to identify meaning, entities, concepts, relationships, and intent.
- understandingContent understanding is the analysis of information in searchable content to represent its meaning and searchable properties.
- sparse lexical expansionSparse lexical expansion is query expansion that adds weighted lexical terms represented as features in sparse vectors.
- query-time boostingQuery-time boosting is a retrieval technique that applies signal-derived scoring adjustments while processing a query, typically by looking up boost data separately.
- audioAudio is recorded or transmitted sound data, including speech, music, and non-language sounds.
- digital imageAn image is visual data represented as a grid of colors that forms a picture.
- videoVideo is time-ordered visual data consisting of multiple images, optionally accompanied by synchronized audio.
- CLIPCLIP is a multimodal model trained to align images and their associated text in a shared embedding space.
- text-to-image searchText-to-image search retrieves images whose visual content corresponds to a natural-language text query.
- generationA generative model is a model that produces new data or content according to patterns learned from its training data.
- category boostingCategory boosting increases the ranking score of documents whose categories are related to the query.
- date boostingDate boosting increases the ranking score of documents according to their recency or date value.
- field boostingField boosting assigns different ranking weights to matches depending on the document field in which they occur.
- geospatial boostingGeospatial boosting increases the ranking score of documents according to their geographic proximity to a reference location.
- query vectorA query vector is an ordered collection of feature values representing the factors used to calculate a query-dependent relevance score.
- popularity boostingPopularity boosting increases the ranking score of documents according to a measure of their popularity.
- semantic expansionSemantic expansion broadens matching or scoring with words or concepts related to the query terms and their context.
- contextualized late interactionContextualized late interaction is a retrieval technique that compares context-aware representations of individual document and query tokens rather than only a single representation for each item.
- multivalued vector fieldA multivalued vector field is a search-index field that stores multiple vector values for one document.
- crowdsourcingCrowdsourcing is obtaining information, judgments, or work from a large and distributed group of people, often through an online system.
- vector indexAn approximate nearest-neighbor index is an index structure that efficiently retrieves vectors close to a query vector while allowing approximate results.
- nodeA graph element representing a query-defined set of documents or another graph object.
- feedbackUser feedback is information supplied directly or indirectly by a user about the quality, usefulness, or correctness of a system response.
- additive boostingAn additive boost is a scoring adjustment in which function-calculation values are summed to form or increase the final relevance score.
- multiplicative boostingA multiplicative boost is a scoring adjustment in which function values are combined multiplicatively to modify relevance scores.
- personalized relevancePersonalized relevance is relevance determined partly by an individual user's preferences and relationships inferred from interaction patterns.
- spamSpam is unwanted or low-quality content or activity distributed in a way that is generally irrelevant, deceptive, or abusive, including fabricated behavioral signals.
- relationship nodeA graph node whose query-defined meaning represents a relationship between other nodes.
- sessionA session is a bounded sequence of interactions associated with a user or client context during a period of activity.
- multimodalA generative multimodal model generates content while accepting or representing information from multiple data modalities.
- synthetic dataSynthetic training data is artificially generated data created to support the training or evaluation of machine-learning models.
- related query discoveryRelated query discovery is the process of identifying query terms that are associated through shared user behavior, clicked products, or other retrieval signals.
- pairwise transformA pairwise transform algorithm converts preferences between relevant and irrelevant examples into transformed training instances for classification.
- edit distanceEdit distance is a measure of the minimum number of character-level insertions, deletions, substitutions, or related edits needed to transform one string into another.
- composite metricA composite score is a calculated metric that combines multiple component scores or signals into one value.
- pmi2PMI2 is a k=2 variation of pointwise mutual information that normalizes association scores to reduce sensitivity to word-frequency differences.
- pointwise mutual informationPointwise mutual information is a measure of how much the observed co-occurrence of two events differs from the co-occurrence expected by chance.
- taxonomyA taxonomy is a hierarchical classification of concepts or entities into categories and subcategories.
- time decayA time-decay function assigns progressively less weight to information as its age increases.
- user understandingUser understanding is the representation of an individual user's preferences and interests for producing relevant results.
- examineAn examine is the event or probability that a user consciously considers a displayed search result.
- cloze testA Cloze test is a language-comprehension assessment that evaluates whether a model can predict omitted tokens or words from context.
- masked language modelingMasked language modeling is a self-supervised training objective that predicts tokens deliberately removed or masked from an input sequence.
- behavior-based recommenderA recommender that matches users and items according to overlapping interactions from similar users with similar items.
- poolingPooling is the aggregation of multiple representation values into a single lower-level or fixed-size representation.
- sentence-transformersSentence Transformers is a software library and collection of models for computing semantically meaningful vector representations of sentences and other text.
- hyponym relationshipA hyponym is an entity or term whose meaning is included within that of a more general entity or term in an is-a relationship.
- noun phraseA noun phrase is a grammatical constituent centered on a noun or pronoun and including its modifiers or complements.
- self-supervised learningSelf-supervised learning is model training in which supervisory targets are derived from the input data itself rather than supplied as external labels.
- privacyPrivacy is the protection of information about a person from unauthorized access, use, or disclosure.
- vector databaseA vector database is a database optimized for storing, indexing, and retrieving vector representations by similarity.
- phrase matchingPhrase search retrieves documents containing a specified sequence of consecutive terms, typically in the same order.
- all-mpnet-base-v2all-mpnet-base-v2 is a pretrained sentence-embedding model that maps sentences and short passages to 768-dimensional vectors.
- personalization vectorA personalization vector is an embedding that represents a query adjusted toward a user's interests or prior interactions.
- classifierClassification is a machine-learning task that assigns an input to one or more predefined classes.
- precisionPrecision is the degree of accuracy or detail retained by a vector representation relative to the information it represents.
- feature setA feature set is a collection of named features defined together for use by a machine-learning or search system.
- probabilistic judgmentA probabilistic judgment is a relevance assessment represented as a probability that a user considers a result relevant.
- forward indexA forward index is a data structure that maps each document and field to the terms contained in that document.
- semantic relatednessSemantic relatedness is a normalized statistical measure of how strongly terms are associated through their distributions across document sets.
- evaluationEvaluation is the systematic measurement of a model's performance on data separate from the examples used for training.
- SPLADESPLADE is a neural sparse lexical expansion model that produces weighted lexical representations for information retrieval.
- synonymA synonym is a replacement term sequence that represents the same or a very similar thing as another term sequence.
- user-guided recommendationA user-guided recommendation combines recommendation signals with explicit keyword or query input to constrain suggested results.
- hyperplaneA separating hyperplane is a flat boundary in a feature space that divides examples into regions associated with different classes or ranking outcomes.
- promptA prompt is input text supplied to a language model to provide instructions, questions, or contextual material.
- over-personalizationOver-personalization is the excessive adaptation of results to user history or inferred preferences in a way that reduces query relevance or user control.
- audio searchAudio search retrieves audio content or content characterized by sound in response to textual, spoken, or audio queries.
- image searchImage search retrieves images or related content in response to visual or textual queries.
- natural language queryingNatural language search retrieves or ranks information from queries expressed in ordinary human language rather than only fixed keywords.
- video searchVideo search retrieves video content or scenes matching textual, audio, or visual query descriptions.
- Vision TransformerA vision transformer is a transformer-based neural model that represents and processes visual data such as images.
- inverse document frequencyInverse document frequency is a term-weighting measure that assigns greater weight to terms appearing in fewer documents and lower weight to common terms.
- add-to-cartAdd-to-cart is a user action that places a product into a shopping cart.
- criticismNegative feedback is information indicating that a system result or recommendation was unsatisfactory or irrelevant.
- half-life functionA half-life is the duration required for a decaying signal value to decrease to one-half of its prior value.
- signal ageSignal age is the elapsed time since an interaction signal occurred.
- NMSLIBNMSLIB is an open-source library for efficient similarity search in non-metric spaces, including approximate nearest-neighbor search.
- knowledge graph searchKnowledge graph search retrieves or ranks items by traversing and comparing entities and their relationships represented in a knowledge graph.
- spaCyspaCy is an open-source Python library for natural language processing that provides pretrained models and linguistic analysis pipelines.
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.
