Glossary

Definitions of key terms and acronyms.

Fortemi Glossary

This glossary provides mappings between informal terminology used in the codebase and professional/academic terminology, along with detailed definitions. It serves as a reference for documentation, code comments, and AI agent context.


Product Identity

Fortemi

AttributeValue
Pronunciationfor-TEH-mee
EtymologyLatin fortis (strong) + Japanese emi (恵美, harmony/beauty)
MeaningResilient harmony

Definition: The official product name for this AI-enhanced knowledge management system. Fortemi combines hybrid retrieval (BM25 + semantic search), automatic knowledge graph construction, and W3C SKOS-compliant vocabulary management.

Domains: fortemi.com, fortemi.io, fortemi.info


Fortémi (Codename)

AttributeValue
StatusInternal codename / development name
UsageCrate names, internal references, repository structure

Definition: The internal development codename for Fortemi. The crate structure (`matric-core`, `matric-db`, `matric-api`, etc.) retains this naming for stability. The "matric" prefix refers to the parent MATRIC platform (Modular Agentic Task Routing for Intelligent Coordination).

Note: Documentation and user-facing materials use "Fortemi" while code internals retain "matric-*" naming.


How to Use This Glossary

  • For Documentation: Use professional terms with informal clarifications in parentheses
  • For Code Comments: Reference the citation (e.g., "RRF (Cormack et al., 2009)")
  • For AI Agents: This document provides canonical terminology mappings

Reciprocal Rank Fusion (RRF)

AttributeValue
Informal Termshybrid search, combined search, search fusion
Professional TermReciprocal Rank Fusion (RRF)
CitationCormack, Clarke, & Büttcher (2009)
REFREF-027

Definition: An unsupervised rank aggregation method that combines document rankings from multiple retrieval systems. RRF computes a fused score using the formula `RRFscore(d) = Σ 1/(k + rank(d))` where k is a smoothing constant. Fortémi uses k=20 (optimized via Elasticsearch BEIR benchmark grid search, 2024), which emphasizes top-ranked results more strongly than the original k=60 default. This gives higher-ranked documents more weight while still allowing lower-ranked documents to contribute.

Why It Matters: RRF consistently outperforms individual rankers and supervised learning-to-rank methods. It requires no training data and works with any number of input rankings.

In Matric-Memory: Used in `crates/matric-search/src/hybrid.rs` to combine BM25 full-text search results with semantic vector search results.


BM25 (Best Matching 25)

AttributeValue
Informal Termskeyword search, full-text search, FTS
Professional TermBM25 / Probabilistic Relevance Framework
CitationRobertson & Zaragoza (2009)
REFREF-028

Definition: A probabilistic ranking function that scores documents based on term frequency, inverse document frequency, and document length normalization. The key parameters are k1 (term frequency saturation, typically 1.2) and b (length normalization, typically 0.75).

Key Formula Components:

  • Term Frequency (TF): How often a term appears in a document
  • Inverse Document Frequency (IDF): Rarity of a term across all documents
  • Length Normalization: Prevents bias toward longer documents

Why It Matters: BM25 remains a competitive baseline even against neural retrievers. It excels at exact keyword matching and handles rare terms well.

In Matric-Memory: Implemented via PostgreSQL's `tsvector` and `ts_rank` functions for full-text search.


Dense Retrieval

AttributeValue
Informal Termssemantic search, vector search, embedding search
Professional TermDense Retrieval / Neural Information Retrieval
CitationKarpukhin et al. (2020)
REFREF-029

Definition: A retrieval approach that represents queries and documents as dense vectors (embeddings) in a continuous vector space. Relevance is computed via similarity metrics (typically cosine similarity or dot product) between query and document vectors.

Architecture:

  • Dual-Encoder: Separate encoders for queries and documents, enabling pre-computation of document embeddings
  • Cross-Encoder: Joint encoding of query-document pairs, more accurate but slower

Why It Matters: Dense retrieval captures semantic similarity beyond lexical overlap. "Machine learning" and "AI algorithms" can match even without shared words.

In Matric-Memory: Implemented in `crates/matric-inference/` using Ollama for embedding generation, with vectors stored in pgvector.


Convex Combination Fusion

AttributeValue
Informal Termsweighted score blending, score interpolation
Professional TermConvex Combination (CC) Fusion
CitationBruch, Gai, & Ingber (2023)
REFREF-059

Definition: A score fusion method that linearly interpolates normalized scores from multiple retrieval systems: `score = α × score_lexical + (1-α) × score_semantic`. Unlike RRF which uses ranks, CC uses calibrated scores.

Trade-offs vs RRF:

  • CC can outperform RRF with proper tuning
  • CC requires score calibration across systems
  • RRF is parameter-insensitive (simpler deployment)

In Matric-Memory: Currently using RRF; CC is a potential optimization path.


Embeddings & Representation Learning

ColBERT

AttributeValue
Informal Termstoken-level embeddings, fine-grained matching
Professional TermColBERT (Contextualized Late interaction over BERT)
CitationKhattab & Zaharia (2020)
REFREF-056

Definition: Cross-encoder Late interaction over BERT. A token-level embedding approach where each token in a query is independently matched against each token in a document using MaxSim scoring. Enables fine-grained semantic matching by computing token-level interactions after retrieval rather than encoding entire texts into single vectors.

Why It Matters: Combines the efficiency of dual-encoders (pre-computed document embeddings) with the expressiveness of cross-encoders (token-level interactions). Particularly valuable for technical content where specific term matching matters.

In Matric-Memory: Migration: 20260205000000_colbert_embeddings.sql. Future enhancement for specialized search contexts.


Sentence Embeddings

AttributeValue
Informal Termstext vectors, semantic vectors, embeddings
Professional TermSentence Embeddings
CitationReimers & Gurevych (2019)
REFREF-030

Definition: Fixed-dimensional vector representations of sentences or paragraphs that capture semantic meaning. Unlike word embeddings, sentence embeddings represent the meaning of entire text spans.

Key Insight: Standard BERT requires expensive pairwise inference (65 hours for 10K sentences). Siamese architectures (Sentence-BERT) reduce this to 5 seconds by producing independent embeddings.

Pooling Strategies:

  • Mean Pooling: Average of all token embeddings (typically best)
  • CLS Token: Use the [CLS] token embedding
  • Max Pooling: Element-wise maximum across tokens

In Matric-Memory: Uses nomic-embed-text via Ollama, producing 768-dimensional embeddings.


Contrastive Learning

AttributeValue
Informal Termslearning from pairs, similarity training
Professional TermContrastive Learning
CitationChen et al. (2020) SimCLR, Gao et al. (2021) SimCSE
REFREF-069, REF-070

Definition: A self-supervised learning paradigm that learns representations by contrasting positive pairs (similar examples) against negative pairs (dissimilar examples). The model learns to maximize similarity for positive pairs while minimizing it for negatives.

Key Innovations:

  • In-Batch Negatives: Use other examples in the same batch as negatives (efficient)
  • Dropout as Augmentation (SimCSE): Pass same input twice with different dropout masks to create positive pairs
  • Hard Negative Mining (ANCE): Select difficult negatives from ANN index for better training signal

Why It Matters: Enables training powerful embeddings without labeled relevance data.

In Matric-Memory: The embedding model (nomic-embed-text) uses contrastive pre-training.


Anisotropy

AttributeValue
Informal Termsclustered embeddings, non-uniform space
Professional TermAnisotropy / Representation Degeneration
CitationGao et al. (2021) SimCSE
REFREF-070

Definition: A property of embedding spaces where vectors occupy a narrow cone rather than being uniformly distributed. Anisotropic embeddings have artificially high similarity scores even for unrelated texts.

Problem: Standard pre-trained models produce anisotropic embeddings, reducing discriminative power.

Solution: Contrastive learning transforms anisotropic spaces into more uniform (isotropic) distributions, improving similarity-based retrieval.

In Matric-Memory: The 0.7 similarity threshold for auto-linking assumes reasonably isotropic embeddings.


Hard Negative Mining

AttributeValue
Informal Termsdifficult examples, challenging negatives
Professional TermHard Negative Mining / ANN Negatives
CitationXiong et al. (2020) ANCE
REFREF-075

Definition: A training technique that selects negative examples which are difficult for the current model—examples that have high similarity but are not actually relevant. This provides stronger training signal than random negatives.

Methods:

  • Static Hard Negatives: Pre-computed from BM25 or similar
  • Dynamic ANN Negatives: Updated during training from an ANN index

Why It Matters: Models trained with hard negatives generalize better to challenging retrieval scenarios.


Instruction-Tuned Embeddings

AttributeValue
Informal Termstask-specific embeddings, prompted embeddings
Professional TermInstruction-Tuned Embeddings
CitationSu et al. (2022) INSTRUCTOR
REFREF-072

Definition: Embedding models that accept natural language instructions alongside the text to encode, producing task-specific representations from a single model.

Example:

Instruction: "Retrieve technical documentation about this programming concept"
Text: "async/await in JavaScript"
→ Embedding optimized for technical doc retrieval

Why It Matters: One model handles diverse retrieval tasks without fine-tuning, adapting via instructions.

In Matric-Memory: Future enhancement for specialized search contexts (code search, concept search, etc.).


Matryoshka Representations

AttributeValue
Informal Termsflexible dimensions, truncatable embeddings
Professional TermMatryoshka Representation Learning (MRL)
CitationKusupati et al. (2022)
REFREF-073

Definition: An embedding training approach that encodes information at multiple granularities within a single vector. The first N dimensions contain a valid (lower-resolution) embedding, allowing dimension truncation without retraining.

Benefits:

  • Storage Efficiency: Store 256-d instead of 768-d for fast filtering
  • Compute Efficiency: Use short embeddings for coarse ranking, full for re-ranking
  • No Retraining: Single model serves multiple precision levels

In Matric-Memory: Potential optimization for tiered storage or fast similarity checks. A training approach that produces embeddings useful at multiple dimensions (e.g., 768 → 256 → 128), enabling 12× storage savings with minimal quality loss. Used with compatible models like nomic-embed-text.


MRL (Matryoshka Representation Learning)

AttributeValue
Informal Termsflexible dimensions, nested embeddings, multi-resolution vectors
Professional TermMatryoshka Representation Learning (MRL)
CitationKusupati et al. (2022)
REFREF-073

Definition: A training approach that produces embeddings useful at multiple dimensions (e.g., 768 → 256 → 128), enabling 12× storage savings with minimal quality loss. The first N dimensions of an MRL embedding form a valid embedding at lower precision, allowing truncation without retraining.

Why It Matters: Enables two-stage retrieval with 128× compute reduction: coarse-to-fine search where initial filtering uses compact 128-d vectors and final ranking uses full 768-d precision.

In Matric-Memory: Used with compatible models like nomic-embed-text for storage optimization and efficient retrieval.


Vector Search & Indexing

HNSW (Hierarchical Navigable Small World)

AttributeValue
Informal Termsvector index, ANN index, similarity index
Professional TermHNSW (Hierarchical Navigable Small World)
CitationMalkov & Yashunin (2020)
REFREF-031

Definition: A graph-based algorithm for approximate nearest neighbor (ANN) search. HNSW constructs a multi-layer graph where higher layers contain fewer nodes with longer-range connections, enabling fast navigation to the query's neighborhood.

Key Properties:

  • Query Complexity: O(log N) - logarithmic scaling with corpus size
  • Build Complexity: O(N log N) - efficient index construction
  • Recall: Typically 95-99% of exact nearest neighbors

Parameters:

  • M: Maximum connections per node (affects memory and accuracy)
  • ef_construction: Search width during index building (affects build quality)
  • ef: Search width during queries (affects query accuracy/speed)

In Matric-Memory: Used via pgvector extension with `M=16, ef_construction=64`.


AttributeValue
Informal Termsfast vector search, similarity search
Professional TermApproximate Nearest Neighbor (ANN) Search
CitationVarious
REFMultiple

Definition: Algorithms that find vectors similar to a query vector in sub-linear time by accepting approximate (not exact) results. The trade-off is small accuracy loss for dramatic speed improvement.

Common Algorithms:

  • HNSW: Graph-based (used in pgvector)
  • IVF: Inverted file with clustering
  • LSH: Locality-sensitive hashing
  • Product Quantization: Compression-based

Why It Matters: Exact nearest neighbor search is O(N) and infeasible for large collections. ANN enables sub-second queries over millions of vectors.


Query Enhancement

Hypothetical Document Embeddings (HyDE)

AttributeValue
Informal Termsfake document generation, query expansion
Professional TermHypothetical Document Embeddings (HyDE)
CitationGao et al. (2022)
REFREF-063

Definition: A zero-shot retrieval technique that uses an LLM to generate a hypothetical document that would answer the query, then retrieves real documents similar to this hypothetical one.

Process: 1. User query: "How does photosynthesis work?" 2. LLM generates hypothetical answer (even if imperfect) 3. Embed the hypothetical document 4. Retrieve real documents similar to the hypothetical

Why It Matters: Bridges the query-document gap. Short queries become rich document-like representations, improving retrieval for conceptual questions.

In Matric-Memory: Potential enhancement for vague or conceptual searches.


Document Expansion by Query Prediction (Doc2Query)

AttributeValue
Informal Termspredicted queries, query prediction
Professional TermDocument Expansion by Query Prediction
CitationNogueira et al. (2019)
REFREF-064

Definition: An index-time technique that predicts likely user queries for each document and appends them to the document text. This expands the lexical coverage without changing query-time behavior.

Process: 1. For each document, generate likely queries using a seq2seq model 2. Append generated queries to document text 3. Index the expanded document 4. Query-time search proceeds normally

Why It Matters: Improves BM25 recall by adding query-like terms to documents. No query-time latency cost.

In Matric-Memory: Potential enhancement for improving note discoverability.


Chain-of-Thought Query Expansion

AttributeValue
Informal TermsLLM query rewriting, smart expansion
Professional TermChain-of-Thought (CoT) Query Expansion
CitationJagerman et al. (2023)
REFREF-065

Definition: Using LLMs with chain-of-thought prompting to expand queries by reasoning through what information would be relevant, generating related terms and concepts.

Process: 1. Original query: "python async" 2. CoT prompt: "Think step-by-step about what documents would help..." 3. LLM reasons: "User wants to understand asynchronous programming in Python, relevant concepts include coroutines, event loops, asyncio library, await keyword..." 4. Expanded query includes these terms

Why It Matters: Outperforms traditional pseudo-relevance feedback. LLMs have world knowledge beyond the document collection.


Pseudo-Relevance Feedback (PRF)

AttributeValue
Informal Termsresult-based expansion, automatic expansion
Professional TermPseudo-Relevance Feedback (PRF)
CitationClassical IR literature
REFN/A (foundational)

Definition: A query expansion technique that assumes top-ranked documents from an initial retrieval are relevant, extracts terms from them, and adds these terms to the query for a second retrieval pass.

Limitations:

  • Requires two retrieval passes (latency)
  • Can drift if initial results are poor
  • Limited to terms in the collection

In Matric-Memory: Not currently implemented; LLM-based expansion (HyDE, CoT) offers more powerful alternatives.


Re-ranking & Late Interaction

Late Interaction

AttributeValue
Informal Termstoken-level matching, fine-grained similarity
Professional TermLate Interaction
CitationKhattab & Zaharia (2020) ColBERT
REFREF-056

Definition: A retrieval architecture that independently encodes queries and documents (like dual-encoders) but then applies fine-grained token-level interaction at retrieval time, combining efficiency with expressiveness.

Contrast with Other Approaches:

  • Dual-Encoder: Single similarity score (fast, less expressive)
  • Cross-Encoder: Full attention (expressive, slow)
  • Late Interaction: Token interactions (balanced)

MaxSim Operation: For each query token, find the maximum similarity to any document token, then sum across query tokens.

In Matric-Memory: Future enhancement path for technical notes where exact term matching matters.


Multi-Stage Ranking Pipeline

AttributeValue
Informal Termsretrieve then re-rank, two-stage search
Professional TermMulti-Stage Ranking Pipeline
CitationNogueira et al. (2019)
REFREF-067

Definition: A retrieval architecture that uses a fast first-stage retriever (BM25, dense) to get candidate documents, then applies an expensive neural re-ranker to the top-K candidates.

Stages: 1. Retrieval: Fast (BM25, dense), returns top-1000 2. Re-ranking: Slow (BERT cross-encoder), re-scores top-100 3. Final: Return re-ranked top-10

Ranking Approaches:

  • Pointwise (monoBERT): Score each document independently
  • Pairwise (duoBERT): Score document pairs for relative ordering

In Matric-Memory: Current architecture is retrieval-only. Re-ranking is a potential enhancement.


Knowledge Organization

Knowledge Graph

AttributeValue
Informal Termslinked notes, auto-linking, relationships
Professional TermKnowledge Graph
CitationHogan et al. (2021)
REFREF-032

Definition: A graph-structured knowledge representation where nodes represent entities (notes) and edges represent relationships between them. In Fortémi, relationships are discovered automatically via embedding similarity.

Graph Types:

  • RDF Graphs: Subject-predicate-object triples (Semantic Web)
  • Property Graphs: Nodes and edges with arbitrary properties (our approach)

In Matric-Memory: Notes with >70% cosine similarity are automatically linked. The `note_links` table stores bidirectional edges with similarity scores. The graph quality pipeline (SNN → PFNET → Louvain) runs periodically via the `GraphMaintenance` job.


Shared Nearest Neighbors (SNN)

AttributeValue
Informal Termsneighborhood overlap score, graph normalization
Professional TermShared Nearest Neighbors (SNN)
REFN/A (graph quality technique)

Definition: A graph edge weighting method that replaces raw similarity scores with a neighborhood-overlap score. For two notes A and B, the SNN score is the number of notes that appear in both A's k-nearest neighbors and B's k-nearest neighbors. High SNN scores indicate mutually-confirming similarity; low scores indicate coincidental proximity.

Why It Matters: Raw cosine similarity can produce misleading links if a highly popular note (a "hub") is cosmetically similar to many unrelated notes. SNN penalizes such links because the hub's broad neighborhood does not overlap well with any one note's specific neighborhood.

Configuration: `GRAPH_SNN_K` (neighbor count), `GRAPH_SNN_PRUNE_THRESHOLD` (minimum score to retain)

In Matric-Memory: Applied as Step 2 of the `GraphMaintenance` job pipeline.


Pathfinder Network (PFNET)

AttributeValue
Informal Termsgraph pruning, edge sparsification
Professional TermPathfinder Network Scaling (PFNET)
CitationSchvaneveldt, Durso, & Dearholt (1989)
REFN/A (cognitive network analysis)

Definition: An algorithm that prunes edges from a weighted graph by removing any edge where a stronger indirect path exists. Given edge (A→C) with score s, the edge is pruned if there exists an intermediate node B such that both (A→B) and (B→C) have scores ≥ s.

Why It Matters: Raw fully-connected graphs are cluttered with redundant edges that make community structure hard to detect. PFNET retains only direct relationships — the minimum spanning structure that preserves all neighborhood proximity information.

Configuration: `GRAPH_PFNET_Q` controls the metric space (typically q=∞ for ultrametric, or a finite value for tunable sparsity)

In Matric-Memory: Applied as Step 3 of the `GraphMaintenance` job pipeline.


Louvain Community Detection

AttributeValue
Informal Termstopic clustering, graph clustering
Professional TermLouvain Method for Community Detection
CitationBlondel et al. (2008)
REFN/A

Definition: A hierarchical modularity-optimization algorithm for detecting community structure in graphs. It greedily assigns nodes to communities to maximize modularity (a measure of how dense connections are within communities compared to between them), then collapses each community into a super-node and repeats.

Why It Matters: Identifies topical clusters in the knowledge graph without requiring the number of communities to be specified in advance. Each community typically corresponds to a coherent topic domain.

Configuration: `GRAPH_COMMUNITY_RESOLUTION` controls the granularity of communities. Higher values produce more, smaller communities.

In Matric-Memory: Applied as Step 4 of the `GraphMaintenance` job pipeline. Community assignments (`community_id`, `community_label`, `community_confidence`) are returned on graph nodes from `GET /api/v1/graph/{id}`.


Seashell Pattern

AttributeValue
Informal Termshub collapse, star topology defect
Professional TermHub-induced Star Topology (graph quality defect)
REFN/A (internal term)

Definition: A topology defect in knowledge graphs where a highly-connected hub note pulls many unrelated notes into apparent proximity, producing a star-shaped cluster radiating from the hub rather than a meaningful topic cluster. The resulting visual shape resembles a seashell.

Cause: Raw cosine similarity treats any note similar to a hub as similar to all other notes similar to that hub, even when those notes share no meaningful relationship with each other.

Solution: SNN scoring penalizes edges to broad hubs because their large neighborhoods do not overlap specifically with any one note's neighborhood. PFNET further removes hub-to-spoke edges that are redundant given spoke-to-spoke paths.

In Matric-Memory: The combination of SNN (Step 2) and PFNET (Step 3) in the `GraphMaintenance` pipeline is specifically designed to eliminate seashell patterns.


MRL Coarse Embedding

AttributeValue
Informal Terms64-dim embedding, fast embedding, coarse vector
Professional TermMRL Coarse-Resolution Embedding
CitationKusupati et al. (2022)
REFREF-073

Definition: A truncated embedding at 64 dimensions produced from a Matryoshka Representation Learning (MRL) model. Because MRL encodes information hierarchically, the first 64 dimensions retain a usable (lower-resolution) representation of the full embedding.

Why It Matters: Coarse embeddings enable efficient first-pass retrieval and graph operations at a fraction of the compute cost of full-dimensional embeddings. Fortémi uses 64-dim MRL embeddings for community detection on large knowledge bases via `POST /api/v1/graph/community/coarse`.

Trade-off: ~3-5% quality loss compared to full-dimensional embeddings, with 12× storage reduction.

In Matric-Memory: Used for coarse community detection in `GraphMaintenance`. Also used in the MRL two-stage retrieval pipeline (coarse candidate retrieval → full-dimensional reranking).


SKOS (Simple Knowledge Organization System)

AttributeValue
Informal Termstags, labels, vocabulary
Professional TermW3C SKOS (Simple Knowledge Organization System)
CitationMiles & Bechhofer (2009)
REFREF-033

Definition: A W3C standard for representing controlled vocabularies, taxonomies, and thesauri in a machine-readable format. SKOS provides a data model for organizing knowledge concepts.

Core Elements:

  • Concept: A unit of thought (tag)
  • prefLabel: The preferred name (one per language)
  • altLabel: Alternative names/synonyms
  • hiddenLabel: Search variants (misspellings)
  • broader/narrower: Hierarchical relationships
  • related: Associative relationships

In Matric-Memory: Implemented in `crates/matric-db/src/skos_tags.rs` with full hierarchy support.


Controlled Vocabulary

AttributeValue
Informal Termstag list, approved tags
Professional TermControlled Vocabulary
CitationLibrary science, W3C SKOS
REFREF-033

Definition: A restricted set of terms used for indexing and retrieval, ensuring consistency in how concepts are labeled. Unlike free-text tags, controlled vocabularies prevent synonymy problems (multiple terms for one concept) and polysemy problems (one term for multiple concepts).

Benefits:

  • Consistent tagging across users/time
  • Enables faceted navigation
  • Improves search recall via synonym expansion

Document Type Registry

A catalog of 131+ pre-configured document types that determine how content is chunked, embedded, and searched. Each type has detection rules, chunking strategies, and embedding recommendations.

Categories: 19 categories including code, prose, config, markup, data, api-spec, iac, database, shell, docs, package, observability, legal, communication, research, creative, media, personal, and custom.

Detection: Automatic detection from filename patterns (confidence 1.0), file extensions (0.9), or content magic patterns (0.7).

Why It Matters: Different content types require different processing strategies. Code benefits from syntactic chunking that respects function boundaries, while prose benefits from semantic chunking that follows natural paragraph breaks. The registry automatically applies the optimal strategy.

In Matric-Memory: Implemented in `crates/matric-db/src/document_types.rs` with REST API and MCP tools for management.


Chunking Strategy

The algorithm used to split documents into smaller pieces for embedding. The choice of strategy significantly impacts embedding quality and retrieval performance.

Strategies:

  • semantic: Natural paragraph/section boundaries (optimal for prose, documentation)
  • syntactic: Language-aware code parsing respecting function/class boundaries (optimal for source code)
  • fixed: Fixed-size token windows with overlap (optimal for logs, unstructured data)
  • per_section: Heading-based splits (optimal for structured documents with markdown/HTML headings)
  • whole: No splitting, embed entire document (optimal for atomic content like tweets, short messages)

Why It Matters: Proper chunking preserves semantic coherence. Splitting mid-sentence or mid-function degrades embedding quality and retrieval relevance.

In Matric-Memory: Chunking strategy is determined by document type. The system automatically selects the appropriate strategy based on detected document type.


Extraction Strategy

The method used to extract searchable text and metadata from uploaded file attachments. Different file formats require different extraction approaches.

Strategies:

  • text_native: Direct text extraction (for .txt, .md, .csv)
  • pdf_text: PDF text layer extraction (for .pdf)
  • code_ast: Abstract syntax tree parsing (for source code files)
  • vision: AI vision model analysis (for images)
  • audio_transcribe: Speech-to-text transcription (for audio files)
  • structured_extract: Schema-aware parsing (for .json, .xml, .yaml)

Why It Matters: The extraction strategy determines what text content is available for chunking and embedding. A PDF processed with `text_native` would yield garbled output, while `pdf_text` correctly extracts readable text.

In Matric-Memory: Implemented via the `ExtractionAdapter` trait pattern in `crates/matric-jobs/src/adapters/`. Strategy is auto-assigned from MIME type via `ExtractionStrategy::from_mime_type()`.


Document Type Inference

A background job that automatically classifies uploaded file attachments into document types using a confidence-scored detection cascade.

Detection Priority: 1. Filename pattern match (confidence: 1.0) 2. MIME type match (confidence: 0.95) 3. File extension match (confidence: 0.9) 4. Content/magic pattern match (confidence: 0.7) 5. Default fallback (confidence: 0.1)

Why It Matters: Correct document type classification ensures the optimal chunking strategy is applied, improving embedding quality and search relevance.

In Matric-Memory: Runs as a `document_type_inference` job in the background worker. Detection logic in `crates/matric-db/src/document_types.rs`.


Embedding Set

A named collection of embeddings with independent configuration for model, dimensions, and lifecycle management.

Types:

  • Filter Set (default): Shares embeddings from the default embedding set
  • Full Set: Maintains independent embeddings with dedicated configuration

Why It Matters: Different use cases benefit from different embedding models. Research notes might use a high-dimensional model for precision, while quick lookups use a smaller model for speed.

In Matric-Memory: Managed via `/api/v1/embedding-sets/*` REST endpoints and MCP tools. Supports MRL (Matryoshka Representation Learning) for storage-efficient multi-resolution embeddings.


AttributeValue
Informal Termslocation-time search, memory search, geo-temporal queries
Professional TermTemporal-Spatial Search
CitationW3C PROV, PostGIS documentation
REFN/A (domain standard)

Definition: Search queries that combine geographic location (PostGIS radius queries) and time range (tstzrange) filters to find memories based on when and where they were captured. Built on the W3C PROV temporal-spatial extension.

Key Operations:

  • Spatial: ST_Distance radius searches with GiST index on geography type
  • Temporal: tstzrange containment queries with GiST index
  • Combined: Intersection of spatial and temporal filters

Why It Matters: Enables contextual retrieval beyond content similarity. Find "photos from Paris during vacation" or "notes created near the office last week" without relying on text content.

In Matric-Memory: Spatial memory search is implemented via `GET /api/v1/memories/search`. Supports location-based (PostGIS), temporal, and combined queries on file provenance data.


AI Enhancement

Retrieval-Augmented Generation (RAG)

AttributeValue
Informal TermsAI revision, context-aware generation
Professional TermRetrieval-Augmented Generation (RAG)
CitationLewis et al. (2020)
REFREF-008

Definition: A paradigm that combines retrieval systems with generative language models. Instead of relying solely on parametric knowledge, the model retrieves relevant documents and uses them as context for generation.

Architecture: 1. Query: User input or note content 2. Retrieve: Find relevant documents/notes 3. Augment: Add retrieved context to prompt 4. Generate: LLM produces output with retrieved context

Why It Matters: Reduces hallucination, enables knowledge updates without retraining, provides source attribution.

In Matric-Memory: Used in the AI revision pipeline to enhance notes with context from related content.


RAG-Fusion

AttributeValue
Informal Termsmulti-query RAG, comprehensive retrieval
Professional TermRAG-Fusion
CitationRackauckas (2024)
REFREF-060

Definition: An extension of RAG that generates multiple query variations from different perspectives, retrieves documents for each, and fuses results using RRF before generation.

Process: 1. Original query → Generate N query variations 2. Retrieve documents for each variation 3. Apply RRF to fuse all retrieved documents 4. Generate with comprehensive context

Why It Matters: Improves coverage by retrieving from multiple angles. Mitigates single-query blindspots.

In Matric-Memory: Potential enhancement for AI revision pipeline.


Evaluation & Benchmarks

BEIR (Benchmarking IR)

AttributeValue
Informal Termsretrieval benchmark, search evaluation
Professional TermBEIR (Benchmarking IR)
CitationThakur et al. (2021)
REFPending

Definition: A heterogeneous benchmark for zero-shot evaluation of information retrieval models, comprising 18 diverse datasets across different domains and tasks.

Key Datasets:

  • MS MARCO: Web passage retrieval
  • NFCorpus: Biomedical
  • SciFact: Scientific claim verification
  • TREC-COVID: COVID-19 scientific literature

Why It Matters: Tests generalization—models must perform well on domains unseen during training.

In Matric-Memory: Target benchmark for validating hybrid search quality.


MTEB (Massive Text Embedding Benchmark)

AttributeValue
Informal Termsembedding benchmark, embedding leaderboard
Professional TermMTEB (Massive Text Embedding Benchmark)
CitationMuennighoff et al. (2023)
REFPending

Definition: A comprehensive benchmark covering 56 datasets across 8 embedding tasks: classification, clustering, pair classification, reranking, retrieval, STS, summarization, and bitext mining.

Why It Matters: Evaluates embedding models across diverse use cases, not just retrieval.

In Matric-Memory: Reference for embedding model selection (nomic-embed-text vs E5 vs others).


Recall@K

AttributeValue
Informal Termstop-K accuracy, retrieval accuracy
Professional TermRecall@K
CitationStandard IR metrics
REFN/A (foundational)

Definition: The proportion of relevant documents that appear in the top-K retrieved results. Recall@100 = 0.95 means 95% of relevant documents are in the top 100.

Related Metrics:

  • Precision@K: Proportion of top-K that are relevant
  • MRR (Mean Reciprocal Rank): Average of 1/rank for first relevant result
  • NDCG: Normalized discounted cumulative gain (position-weighted)

Sparse Neural Retrieval

Learned Sparse Representations (SPLADE)

AttributeValue
Informal Termsneural BM25, learned term weights
Professional TermLearned Sparse Representations / SPLADE
CitationFormal et al. (2021)
REFREF-068

Definition: A retrieval approach that learns sparse (mostly-zero) document representations using neural networks. Unlike dense retrieval (all dimensions active), SPLADE produces interpretable term weights compatible with inverted indices.

Key Features:

  • Neural Expansion: Adds semantically related terms not in original text
  • Learned Importance: Term weights learned via supervision
  • Log-Saturation: Regularization to control sparsity

Why It Matters: Combines benefits of neural models (semantic understanding) with inverted index efficiency (fast retrieval).

In Matric-Memory: Potential future replacement for BM25 component.


Quick Reference Table

InformalProfessionalCategory
hybrid searchReciprocal Rank Fusion (RRF)Retrieval
keyword searchBM25Retrieval
semantic searchDense RetrievalRetrieval
vector searchANN SearchIndexing
vector indexHNSWIndexing
embeddingsSentence EmbeddingsRepresentation
training from pairsContrastive LearningRepresentation
auto-linkingKnowledge Graph ConstructionKnowledge
tagsSKOS Controlled VocabularyKnowledge
AI revisionRAGGeneration
query expansionHyDE / Doc2Query / PRFEnhancement
re-rankingLate Interaction / Cross-EncoderRanking
token matchingMaxSim OperationRanking
flexible dimensionsMatryoshka RepresentationsEfficiency
64-dim embeddingMRL Coarse EmbeddingEfficiency
retrieval benchmarkBEIREvaluation
graph normalizationShared Nearest Neighbors (SNN)Graph Quality
graph pruningPathfinder Network (PFNET)Graph Quality
topic clusteringLouvain Community DetectionGraph Quality
hub star defectSeashell PatternGraph Quality

References

Core Papers

1. REF-027: Cormack, G. V., Clarke, C. L. A., & Büttcher, S. (2009). Reciprocal rank fusion outperforms condorcet and individual rank learning methods. SIGIR '09.

2. REF-028: Robertson, S., & Zaragoza, H. (2009). The probabilistic relevance framework: BM25 and beyond. Foundations and Trends in Information Retrieval.

3. REF-029: Karpukhin, V., et al. (2020). Dense passage retrieval for open-domain question answering. EMNLP 2020.

4. REF-030: Reimers, N., & Gurevych, I. (2019). Sentence-BERT: Sentence embeddings using siamese BERT-networks. EMNLP 2019.

5. REF-031: Malkov, Y. A., & Yashunin, D. A. (2020). Efficient and robust approximate nearest neighbor search using hierarchical navigable small world graphs. IEEE TPAMI.

6. REF-032: Hogan, A., et al. (2021). Knowledge graphs. ACM Computing Surveys.

7. REF-033: Miles, A., & Bechhofer, S. (2009). SKOS simple knowledge organization system reference. W3C Recommendation.

8. REF-008: Lewis, P., et al. (2020). Retrieval-augmented generation for knowledge-intensive NLP tasks. NeurIPS 2020.

Extended Papers

See `docs/research/retrieval-research-papers.md` and `docs/research/TEXT_EMBEDDINGS_RESEARCH.md` for the complete corpus of 30+ papers supporting Fortémi's implementation.


Revision History

DateAuthorChanges
2026-01-25Claude CodeInitial comprehensive glossary with 30+ terms
2026-02-02Technical WriterAdded ColBERT, MRL, Temporal-Spatial Search entries for v2026.2.0
2026-02-03Claude CodeAdded Fortemi product identity section; Fortémi designated as codename
2026-02-18Technical WriterAdded SNN, PFNET, Louvain Community Detection, Seashell Pattern, MRL Coarse Embedding entries for graph quality pipeline (issues #470-#484)