Similarity-based retrieval expands curated few-shot examples into a fine-tuning training set by drawing related examples from a larger pool. section 4.9.2
Similarity search
Retrieval that selects items according to their similarity to a query or example.
How LLM Customization and Fine-Tuning covers it
- How deep it goes
- Describes retrieval’s role in expanding a seed set but does not specify ranking methods or implementation.
- Examples
- Uses curated few-shot examples as seeds and a larger pool as the source of added examples.
- What you can do after
- Apply similarity-based retrieval to expand curated few-shot examples into a fine-tuning training set.
- How it connects
- Connects few-shot learning with fine-tuning through training-set expansion.
Also explained in
-
AI-Powered SearchA search engine is software that indexes information and retrieves or ranks items in response to user queries.
-
Retrieval Augmented Generation, The Foundational IdeasSimilarity search finds items whose representations are close to a query representation according to a similarity or distance function.
-
Natural Language Processing in Action, Second EditionInformation retrieval, or search, is the process of finding relevant information or documents in a collection in response to a query.
-
Build an Advanced RAG Application (From Scratch)Information retrieval is the process of finding relevant information from a collection of documents or other stored data in response to a query.
-
Grokking AI ApplicationsA search method that finds stored vectors whose representations are most similar to a query vector.
-
Advanced Algorithms and Data StructuresSimilarity search is a query technique for finding objects in large multidimensional spaces based on similarity between pairs of objects.
-
AI Agents and ApplicationsRetrieval is the process of finding relevant stored documents from an indexed collection in response to a query.
-
Build AI-Enhanced Web AppsRetrieval is the process of locating and obtaining relevant information from a stored collection or data source.
-
The Art of AI Product DevelopmentSearch is the process of locating information relevant to a query from one or more sources.
-
Machine Learning System DesignThe field concerned with finding and ordering relevant information items in response to queries.
-
Generative AI in ActionRetrieval is the process of selecting relevant information from a collection in response to an information need.
-
AI Agents in Action, Second EditionRetrieval is the process of finding relevant information from an external source and bringing it into a model's context.
-
MongoDB 8.0 in Action, Third EditionSemantic search retrieves information according to meaning and conceptual similarity rather than only exact term matches.
-
Build AI Drug Discovery PipelinesSimilarity search retrieves or ranks molecules according to their structural similarity to one or more query molecules.
-
Build an AI Agent (From Scratch)Retrieval is the technique of obtaining relevant information from external data sources for use during task execution.
-
Designing AI SystemsVector search retrieves items by comparing numerical vector representations of queries and candidate content.
-
Machine Learning Platform EngineeringRetrieval is the process of finding and returning relevant information from a collection or information store.
-
LLM Evaluation and Alignment, The Foundational IdeasInformation retrieval is the process of identifying and extracting relevant resources from large data collections in response to an information need.
-
Grokking Data StructuresSearch is an operation that determines whether a target value occurs in a collection and identifies its position.
-
Transformers in ActionRetrieval is the process of finding and returning relevant information from a collection or database in response to a query.
-
Math and Architectures of Deep LearningThe task of finding documents relevant or similar to a query or another document using feature representations.
-
LLMs in ProductionSemantic search retrieves information according to the meaning represented by queries and documents rather than relying only on exact lexical matches.
-
Grokking AI Algorithms, Second EditionA search algorithm systematically explores a space of possible states or solutions to find a target or an optimal result.
-
Enterprise RAGRetrieval is the process of finding and returning source content relevant to a user query.
-
AI Agents in ActionKnowledge retrieval is the process of locating relevant information from a knowledge store for use in reasoning or generation.
-
Building Reliable AI SystemsA search technique that retrieves content based on meaning or semantic similarity rather than only exact keyword overlap.
-
The Design of Web APIs, Second EditionA search operation is an API operation that retrieves resources matching supplied search criteria.
-
AI GovernanceSimilarity search is a retrieval technique that finds data items whose representations are close to a query representation in a vector space.
-
Optimization Algorithms: AI techniques for design, planning, and control problemsA systematic examination of possible states that begins at an initial state and seeks to reach a goal state.
-
Domain-Specific Small Language ModelsThe process of searching external sources to find information relevant to a query or prompt.
-
Build a Multi-Agent System (from Scratch)Similarity search retrieves items according to their similarity to a query, often using vector representations.
-
Delivering Machine Learning Projects: From design to deploymentNearest neighbor search retrieves data items whose vector representations are closest to a specified query representation.
-
Grokking Software ArchitectureSimilarity search retrieves items whose numerical representations are close to a query representation in a vector space.
-
Vibe EngineeringSimilarity search retrieves items whose vector representations are nearest to a query vector according to a similarity measure.
-
Context EngineeringNearest-neighbor search, or vector similarity search, finds stored items whose vector representations are most similar to a query representation.
-
Financial AI in PracticeSimilarity search is the retrieval of items whose representations are similar to a query representation.
Compare how 37 books explain similarity search →
Related concepts
- retrieval-augmented generationused by · Retrieval-augmented generation is a technique that retrieves relevant information from external sources and supplies it as context to a generative model when producing an output.
- hybrid searchused by · Hybrid search is an information-retrieval technique that combines multiple retrieval methods or relevance signals to find or rank relevant results.
- knowledge baseuses · A knowledge base is an organized body or representation of information that people or computational systems can consult to support retrieval, reference, reasoning, or tasks.
- FAISSused by · FAISS is an open-source software library for efficient similarity search and clustering of dense vectors.
- lexical searchalternative to · Lexical search retrieves or ranks items by matching query terms or other surface-text features against indexed content, often using sparse representations and statistical weighting.
- k-d treeused by · A k-d tree is a binary space-partitioning tree that organizes points in multidimensional space by recursively comparing coordinate dimensions.
This explainer was generated by Manning's knowledge graph from the text of LLM Customization and Fine-Tuning. The section links point to the parts of the book it draws on.




































