Glossary — Lawyer Assistant
One-line definitions for every technical term used in this project, with pointers to the docs that explain them in depth. Terms are alphabetical.
Use this as a companion toAGENT_KNOWLEDGE_BASE.md(Q&A) andREADME.md(index).
A–C
- AsyncSqliteSaver — LangGraph checkpointer that persists agent thread state to
data/conversations.dbon disk (falls back toMemorySaver). Note the checkpointer is project-independent — it does not move with the workspace. →BACKEND.md§4 - BGE-M3 — the multilingual embedding model (BAAI, 1024-dim, L2-normalized) used to turn text chunks and queries into vectors for dense search. →
BACKEND.md§5 - BGE-Reranker-v2-M3 — the cross-encoder model that re-scores retrieved candidates to pick the best top-5. →
BACKEND.md§5 - BM25 — the classic keyword (sparse) ranking algorithm used for the
sparseretrieval leg, backed by a prebuilt inverted index in<project>/workspace/bm25_index/when a workspace is active, elsedata/bm25_index/. →BACKEND.md§5,DATA_FLOW.md - Bypass edge — a temporary particle edge created when a pipeline node is removed, rewiring its incoming sources straight to its outgoing targets so the flow stays connected; tagged
bypass-<nodeId>-so re-enabling finds it. →PIPELINE_EDITOR.md§3 - Chain-of-thought (thinking) — the LLM's intermediate reasoning tokens streamed to the UI (before tools are called) and shown as a collapsible "thinking" block. →
FRONTEND.md§6 - Checkpointer — the LangGraph component that stores conversation graph state (threads), enabling human-in-the-loop pause/resume across HTTP requests. →
BACKEND.md§4b - ChromaDB — the local vector database (collection
legal_chunks, cosine distance, HNSW index) storing chunk embeddings and metadata. With a workspace active it lives in<project>/workspace/chroma_db, elsedata/chroma_db. →BACKEND.md§5 - Chunk — a 480-token slice of a document (sections never split) that gets embedded and stored; the atomic unit of retrieval. →
DATA_FLOW.md - Citation — the source reference (file, page, section) attached to a retrieved chunk and shown inline in answers; clicking opens the SourceViewerModal. →
FRONTEND.md§2, §5 - Conversation ID — the thread identifier passed with every chat request (client-supplied, falling back to a server-generated UUID) so agent state and history follow the conversation. →
BACKEND.md§3 - CORS — backend middleware allowing the Vite dev origin (
http://localhost:5173) andfile://to call the API. →BACKEND.md§1
D–H
- Dense retrieval — semantic search over ChromaDB embeddings (vector similarity), the
densepipeline node. →BACKEND.md§5,PIPELINE_EDITOR.md§2 - Docling — the document-parsing library (with OCR) used during ingestion to extract text, tables, and structure from PDFs/images. →
BACKEND.md§5,DATA_FLOW.md - Electron — the desktop shell that hosts the app: launches the Python backend and Vite dev server, owns the window, exposes IPC. →
ARCHITECTURE.md§1, §3 - Embedding — a 1024-dim numeric vector representing text semantics, produced by BGE-M3; cosine similarity between vectors drives dense search. →
BACKEND.md§5 - FastAPI — the Python web framework serving the app's HTTP + SSE API on port 8765 (
backend/main.py). →BACKEND.md§1 - Flag — a compliance finding from the playbook scan (severity, rule id, page, reason, clause text); statuses
open→resolved/dismissed/escalated, persisted to SQLite. →BACKEND.md§6 - HITL (human-in-the-loop) — the approval step where the LangGraph agent pauses via
interrupt()before executing a tool and waits for the user to approve/reject; resumed through/api/chat/resume. →BACKEND.md§4b - HNSW — the approximate nearest-neighbor graph index inside ChromaDB that makes dense search fast. →
BACKEND.md§5 - Hybrid search — combining dense (vector) and sparse (BM25) results; the default mode merges them (RRF / boost-only / combine-and-dedup strategies). →
BACKEND.md§5
I–P
- Mode — the chat request mode:
rag(retrieve + answer, default),retrieval_only(search only, no LLM), ordirect(LLM only, no retrieval). →BACKEND.md§2 - Ingestion — the pipeline that turns raw files into indexed chunks: parse (Docling/OCR) → chunk → embed → store (ChromaDB + BM25). →
DATA_FLOW.md,BACKEND.md§5 - Intent classifier / router — the default RAG orchestrator (
router_intent.py): classifies the message intent, writes a short plan, detects the tool from the plan, executes it, and writes the answer. →BACKEND.md§4a - IPC — Electron's inter-process communication used for window controls and backend health/port queries. →
ARCHITECTURE.md§1 - LangGraph — the orchestration framework powering the agentic router's
StateGraph(agent → approval → tools) and checkpointer. →BACKEND.md§4b - MemorySaver — the in-memory fallback checkpointer used when the SQLite checkpointer can't be created. →
BACKEND.md§4b - Ollama — the local LLM runtime (
http://localhost:11434) providing generation for RAG answers, relevance checks, and scanning. →BACKEND.md§7 - Particle edge — the animated ReactFlow edge type used throughout the pipeline editor to visualize data flowing between nodes. →
PIPELINE_EDITOR.md§1 - Playbook — a JSON rule set (
backend/legal_retrieval/playbook/playbooks/, e.g.default.json) defining clause types and compliance rules the scanner checks documents against. →BACKEND.md§6 - Playbook scan — the clause-level compliance check: chunk → classify clause type → check rules → emit flags → persist. →
BACKEND.md§6
R–S
- RAG (retrieval-augmented generation) — answering a question by first retrieving relevant document chunks, then having the LLM write an answer grounded in those chunks with citations. →
BACKEND.md§3, §5 - ReAct — the "Reasoning + Acting" agent loop (legacy
router.py) where the LLM decides which tool to call at each step. →BACKEND.md§4b - Reranker — the cross-encoder (BGE-Reranker-v2-M3) that re-scores the ~50 retrieved candidates and keeps the top 5; can be skipped (
skip_rerank). →BACKEND.md§5 - RRF (Reciprocal Rank Fusion) — the rank-based merge strategy used in hybrid search to combine dense and sparse rankings. →
BACKEND.md§5 - Sparse retrieval — BM25 keyword search over the inverted index; the
sparsepipeline node. →BACKEND.md§5 - SSE (Server-Sent Events) — the
text/event-streamprotocol the backend uses to stream chat tokens, statuses, tool calls, node progress, and scan progress to the UI in real time. →BACKEND.md§3,FRONTEND.md§2 - Streaming event — one typed SSE payload (e.g.
token,status,tool_call,node_start,done); the frontend switches on these types. →BACKEND.md§3
T–Z
- Thread / thread_id — the LangGraph conversation thread key (same as the conversation id) used to pause, store, and resume agent state. →
BACKEND.md§4b - Tool — a function the agent can call:
search_documents,verify_relevance,scan_document,ingest_file. →BACKEND.md§4c - Top-k — how many results are requested/returned: 50 candidates retrieved, 5 returned after reranking (
top_k_final). →BACKEND.md§5 - Upload — saving an attached file into the active project folder via
/api/uploadso it can be ingested/scanned with the next message (a workspace must be selected first). →BACKEND.md§2 - Vector store — ChromaDB's persistent storage of chunk embeddings + metadata (file, page, section) used for dense retrieval. →
BACKEND.md§5 - Warmup — the background thread at backend startup that preloads the embedder, reranker, LLM, and classifier references so the first query is fast. →
BACKEND.md§1 - Working set — the pinned/selected sources panel that collects documents of interest during a session. →
FRONTEND.md§5 - Zustand — the lightweight React state store persisting conversations (
freebuff-chat-storage) and holding all streaming/approval state. →FRONTEND.md§3