The Lexicon
Terms I crashed into while building my Private AI Tax Assistant.
A running glossary updated as the project evolves. Definitions are functional — what the term means in the context of this build, not an academic treatment.
Chunking Breaking a large document into smaller, overlapping segments of fixed word count. Allows a language model to process manageable pieces of text rather than an entire document at once. Overlap between chunks preserves meaning that would otherwise be lost at segment boundaries.
Cosine similarity A mathematical measure of how similar two vectors are, based on the angle between them. Values range from -1 (opposite) to 1 (identical). Used in retrieval systems to compare a query’s embedding against stored document embeddings and rank them by relevance.
Embedding A fixed-length numerical vector that represents the semantic meaning of a piece of text. Generated by a model trained to place semantically similar texts near each other in vector space. In this project, each text chunk is converted into a 384-dimensional embedding.
Forking Creating a divergent copy of a codebase, process, or conversation thread that can evolve independently from the original. In software development, forking a repository produces a separate version that can be modified without affecting the source. In AI-assisted coding, forking a session means starting a new thread that does not carry forward the context of the previous one.
Hallucination When a language model generates output that is factually incorrect, fabricated, or unsupported by its input context. The model produces text that reads as confident and coherent but has no grounding in the data it was given. A primary risk in any system that relies on LLM output for factual answers.
LLM (Large Language Model) A neural network trained on large volumes of text data to predict and generate language. Operates by processing sequences of tokens and producing statistically probable continuations. Examples include Mistral, LLaMA, and GPT.
NumPy A Python library for numerical computation. Provides efficient storage and manipulation of large arrays of numbers. In this project, used to store embedding matrices and perform cosine similarity calculations across hundreds of chunk vectors.
Ollama A tool for running large language models locally on consumer hardware. Handles model downloading, quantization, and inference without requiring cloud access or GPU clusters. In this project, Ollama runs Mistral 7B on a MacBook Pro M3.
Parallelism Executing multiple computations simultaneously rather than sequentially. In computing, this can mean splitting a task across multiple processor cores, running multiple model queries at once, or processing several documents in parallel. Reduces total processing time but introduces complexity in coordinating results.
Prompt engineering The practice of designing and iterating on the instructions given to a language model to control its output. Includes specifying constraints, format requirements, and behavioural rules. Effective prompting can eliminate hallucinations, enforce source-grounded answers, and suppress default disclaimer behaviour.
Quantization Reducing the numerical precision of a model’s parameters — for example, from 32-bit floating point to 4-bit integers. Decreases model size and memory requirements, enabling large models to run on consumer hardware. Introduces minor accuracy trade-offs in exchange for significant performance gains.
RAG (Retrieval-Augmented Generation) An architecture that combines a language model with a document retrieval system. Instead of relying solely on its training data, the model first retrieves relevant text from a specified document store, then generates its answer using that retrieved context. Reduces hallucination by grounding responses in source material.
SentenceTransformer A Python framework for generating sentence-level and paragraph-level embeddings. Uses pre-trained transformer models to convert text into fixed-dimensional vectors suitable for similarity search. In this project, the model all-MiniLM-L6-v2 generates 384-dimensional embeddings locally.
Tokenization The process of converting raw text into a sequence of discrete units (tokens) that a language model can process. Tokens may represent whole words, subwords, or individual characters depending on the tokenizer. The first step in any language model pipeline.
Transformer A neural network architecture based on self-attention mechanisms that process all positions in a sequence simultaneously rather than sequentially. The foundational architecture behind most current large language models. Consists of stacked layers of attention heads and feed-forward networks.
Vector An ordered list of numbers representing a point in multi-dimensional space. In the context of embeddings, a vector captures the semantic meaning of a text passage as a position in high-dimensional space, where proximity to other vectors indicates similarity of meaning.
Last updated: June 2026. New terms added as the build progresses.

