Glossary

Domain terms with specific meanings in Qadra. Understanding these precisely is essential---we use words carefully.

Core Concepts

TermDefinitionNOT ThisWhy It Matters
AgentNamed specialist with a persona (display name, avatar, system prompt) that performs tasks via LLM calls. A team member with a defined role.A chatbot. A prompt wrapper.Agents have roles, expertise, and responsibilities---not open-ended capabilities.
WorkloadUnit of work that moves through pipeline stages (deal, ticket, project).A chat thread. A conversation.Workloads have completion criteria. They end when the pipeline is done.
PipelineConfigurable sequence of stages a workload traverses.A prompt chain. A workflow.Pipelines enforce ordering. Stage N must complete before stage N+1 begins.
TaskAgent assignment to a workload at a specific stage.A todo item. A background job.Tasks are created dynamically as workloads progress. They track execution state.
ArtifactOutput produced by an agent (document, analysis, report).A file. A response.Artifacts are deliverables for humans. Task outputs are data for downstream agents.
TenantOrganization with isolated data, agents, and pipelines.A user. An account.Complete isolation. One tenant cannot see another tenant's anything.
ConversationDirect chat interface where a user talks to agents. Agent can be switched per message.A workload. A pipeline execution.Conversations are freeform; workloads are structured. Both produce artifacts.

Agent Model

TermDefinitionWhy It Matters
System PromptThe agent's instructions and persona definition. Defines behavior, expertise, and communication style.Agents are LLM personas with structured prompts, not programs.
Control TypeWhat happens after an agent completes: retain (keep control), relinquish_to_parent (default), relinquish_to_start.Prevents infinite agent loops and controls orchestration flow.
Output VisibilityWhether output is shown to users (user_facing, default) or kept internal to orchestration (internal).Some agents do background work that should not surface to end users.
Safety RailsPer-pipeline max_handoffs_per_turn (default 25) and per-agent max_calls_per_parent_agent (default 3).Hard limits that prevent infinite loops and recursive abuse during orchestration.
Pipeline SnapshotImmutable JSONB copy of pipeline stages captured at workload creation time.Running workloads are unaffected by subsequent pipeline edits.

Agent Flows

TermDefinitionWhy It Matters
Agent FlowVisual, graph-based workflow definition stored as ReactFlow JSONB ({nodes, edges, viewport}). Tenant-scoped, supports multiple node types.Enables no-code orchestration of multi-step agent processes with branching and conditions.
Flow ExecutionRuntime instance of a flow. State machine: pending, running, paused, completed, failed, cancelled. Contains blackboard state, per-node states, and execution queue.Each execution is an independent run with its own state.
Flow NodeIndividual step in a flow graph. Types: Start, End, Agent, Condition, HumanInput, Loop, Http, ExecuteFlow, Transform, Delay, KnowledgeLookup, Extract, Research, Artifact.Each type has specific config data and execution behavior.
Flow State DictionaryJSONB blackboard shared across all nodes in an execution. Each node reads inputs and writes outputs.Key-value pairs flow downstream through the graph, enabling data passing between nodes.
HumanInput GateFlow node type that pauses execution and waits for user response. Sets execution to paused and node to waiting_for_input.Human-in-the-loop approval, data entry, or decision points within automated flows.
Flow ExecutorEvent-driven graph executor in src/flow_executor.rs. Processes the execution queue, runs nodes, evaluates conditions, handles branching/merging.Safety rails: MAX_TOTAL_STEPS=500, max Loop iterations=100, max Delay=300s.
Flow SnapshotImmutable copy of flow_data captured at execution start.Running executions are unaffected by subsequent edits to the flow definition.
SpoFilter NodeFlow node that queries the SPO store for triples (optionally filtered by asserter) and writes them into flow state.Lets a flow pull structured prior knowledge from the knowledge graph mid-execution.
SpoWrite NodeFlow node that persists an agent's output as SPO triples with provenance. Config: content_key, asserter, source, output_key.Closes the loop---agent outputs become queryable, grounded knowledge for downstream stages.
ClaimValidation NodeFlow node that grounds prior-stage claims against SPO triples, reporting SUPPORTED/CONTRADICTED/NOT_MENTIONED per claim.Catches ungrounded or contradicted claims before they reach a final deliverable.

Knowledge Graph

TermDefinitionWhy It Matters
SPO IndexSubject-Predicate-Object triple store for structured fact storage and retrieval.Facts are queryable and verifiable. You can check if a claim is grounded.
TripleA single fact: (Subject, Predicate, Object). Example: (Apple, founded_by, Steve Jobs).The atomic unit of factual knowledge. Triples link to form a knowledge graph.
Epistemic MetadataWho made a claim (asserter) and its epistemic status: fact, claim, or opinion.Not all knowledge is equal. Facts from NASA differ from opinions in a blog post.
Vector StoreEmbedding storage for semantic similarity search (pgvector with HNSW indexes).Enables "find similar content" without exact keyword matching.
Document IngestionPipeline in src/ingestion/ that analyzes content, extracts SPO triples, chunks text, and embeds vectors.Intelligent routing---facts go to SPO, narrative goes to vectors.
Content RoutingAnalyzer classifies content as Spo (triples only), Vector (chunks only), Both, or Discard.Prevents junk content from polluting the knowledge graph.
Document ProposalHuman-gated ingestion flow. Agents propose documents (pending_approval); humans approve or reject before ingestion runs.Lifecycle: pending_approval then approved then processing then completed/failed, or pending_approval then rejected.
Knowledge LookupQuerying the SPO index and vector store together. SPO navigates structure; pgvector retrieves similar content.Standard RAG searches everything. SPO-RAG searches where the knowledge graph points.
Provenancedocument_triples and document_chunks tables link extracted knowledge back to source documents.Every fact in the knowledge graph traces to its origin.
GroundingValidating LLM outputs against SPO facts.The antidote to hallucination. Ungrounded claims are flagged.
Semantic CacheRedis-based cache storing verification results by embedding similarity.Avoids redundant LLM calls for semantically similar queries.
Entity AliasSurface form to canonical SPO node mapping. Handles synonyms and abbreviations."AAPL", "Apple Inc.", and "Apple" all resolve to the same entity.

Attribution (KG-SMILE)

TermDefinitionWhy It Matters
KG-SMILEKnowledge Graph Structured Metrics for Interpretable LLM Explanations.Academic foundation for explainable GraphRAG.
Two Gates ModelPre-synthesis competence gate + post-synthesis verification gate."Should I attempt this?" + "Did I represent the context faithfully?"
Competence GatePre-synthesis check: does the knowledge graph have enough coverage for this query?Prevents attempts on queries outside the system's knowledge.
Verification GatePost-synthesis check: does the response faithfully represent the retrieved context? Two LLM-free verifiers run in production (rule-based grounding + Belnap four-valued); perturbation attribution is a future higher-precision path.Catches hallucinations and unfaithful responses.
Rule-Based Grounding GateProduction verifier (verify_response_rule_based): extracts implied triples from the response and checks word-overlap against context triples; passes iff faithfulness ≥ 0.5.The default verifier on every chat response — no LLM.
Belnap Four-Valued GateProduction verifier (verify_with_belnap, qadra-belnap crate): grounds each claim against a polarity-tagged SPO graph over Belnap logic — Grounded / Contradicted / Contested / Ungrounded. Fails only on Contradicted.Distinguishes "false" from "no evidence"; pure-Rust, optional ONNX UD parser.
Perturbation AnalysisSystematically removing triples to measure their impact on responses (verify_response). Higher-precision attribution path, not yet on the live chat pipeline.Reveals which facts actually influenced the output.
FidelityHow well perturbation responses align with the original (R-squared).High fidelity = attributions explain the variance.
FaithfulnessCorrelation between attributions and actual response impact.High faithfulness = attributions are trustworthy.
StabilityRobustness of responses to knowledge graph modifications.High stability = responses do not flip on minor changes.

Agent Evaluation

TermDefinitionWhy It Matters
Rubric / RubricKindThe primary metric kind scored for an agent: SourceCoverage (Scarlet---triple provenance), FilterAccuracy (Ayana), GroundingScore (Eliza), ReviewCompleteness (Reagan).Each persona is judged on the dimension that matters for its job, not a one-size-fits-all score.
Release Gaterelease_gate_check: fails if any agent's golden-fixture average falls below its threshold.Stops regressions in agent quality from shipping---a hard CI gate on persona behavior.

Architecture

TermDefinitionWhy It Matters
Rust CoreThe truth layer. Stateless Rust application handling all NATS subjects. Owns PostgreSQL and MongoDB connections. Eight handler groups: epistemic, workload, auth, email, audit, observer, admin, flow.Source of truth for all data operations. Never accessed directly via HTTP.
GatewayNode.js HTTP service (gateway/) that handles JWT creation/validation, CORS, file uploads to MinIO, and routes HTTP requests to Rust Core via NATS. Never touches PostgreSQL directly.Thin HTTP surface translating REST into NATS request-reply.
Python AgentPython service (agent/) that handles LLM-driven orchestration. Receives NATS messages for workload execution, agent queries, and document verification.The intelligence layer---Rust handles data, Python handles reasoning.
NATSMessage bus for all inter-service communication. Request-reply pattern. JetStream enabled for durable streams.Decouples services. Core, Agent, and Gateway communicate only through NATS.
NATS ObserverCatch-all NATS subscriber (qadra.>) that records every message to MongoDB nats_audit collection. Metadata only, no payload content. Fire-and-forget.Full audit trail without modifying existing handlers. Skips qadra.audit.> to avoid recursion.
ServiceContainerIoC container wiring all trait implementations. Built via ServiceContainer::from_config(config).Single point of configuration. Easy testing with mocks. Swap backends without code changes.
Hot LayerRedis cache/streams for frequently accessed data.10-100x faster than PostgreSQL for repeated reads.
Source of TruthPostgreSQL. All authoritative state lives here.If Redis says X and PostgreSQL says Y, PostgreSQL wins.

Infrastructure

TermDefinitionWhy It Matters
KongAPI gateway for JWT validation, rate limiting, and routing. DB-less mode with declarative config.Offloads auth concerns from application. Proven at scale.
pgvectorPostgreSQL extension for vector similarity search with HNSW indexes.Native vector search without a separate vector database.
MinIOS3-compatible object storage for files, avatars, tenant logos, documents. Self-hosted.S3 API is industry standard. Same code works with AWS S3, Backblaze B2, etc.
ImaginaryHTTP-based image processing service (resize, crop, format conversion).Avatar uploads auto-resized to 256x256 WebP. Falls back gracefully if unavailable.
OTelOpenTelemetry---observability framework for traces, metrics, logs to Loki/Prometheus/Grafana.Industry standard. Trace requests across services.

Multi-Tenancy and Auth

TermDefinitionWhy It Matters
UserTenantJunction record linking a user to a tenant with a per-tenant role and is_default flag.Users can belong to multiple organizations.
Super AdminPlatform-level is_super_admin boolean on users table. NOT a per-tenant role. Capabilities: create tenants, drop into any tenant, reset passwords, promote/demote.Server-wide privilege for platform operators. First super admin promoted via direct SQL.
Admin Drop-InSuper admin switching into a tenant they do not belong to. Creates a synthetic JWT with target tenant context. Does NOT add to user_tenants.Platform support without polluting tenant member lists.
Team InviteToken-based invitation (7-day expiry). Smart routing: existing users added directly, unknown users receive email invite.Supports both internal user addition and external email invitations.

Templates and Output

TermDefinitionWhy It Matters
Artifact TemplateReusable structure defining expected sections, output format, and optional renderer binding. Tenant-scoped, versioned.Standardizes agent output. Ensures documents always have consistent sections.
Email TemplatePer-tenant email template with Handlebars {{var}} syntax. Global defaults with tenant_id IS NULL; tenant overrides by slug.Consistent, customizable email communication per organization.
Notification LogAudit record of a sent notification (email, future SMS/push). Multi-channel from day one.Every email the platform sends is traceable for compliance.
PluginLightweight program that transforms data without model calls. Types: extractor, validator, evaluator.Deterministic data processing---fast, cheap, predictable.

File Storage

TermDefinitionWhy It Matters
FileRecordMetadata record in files table linking a tenant-scoped file to its S3 object. Polymorphic via purpose, entity_type, entity_id.No URL column---URLs are always gateway-proxied for tenant isolation.
StorageProviderEnum (internal or s3) indicating where files are stored. internal = platform MinIO. s3 = tenant's own S3.Tenants can bring their own storage backend.

Investment Banking Domain

TermDefinitionWhy It Matters
DealA workload in the investment banking pipeline.The unit of work we are tracking. Each deal produces an investment recommendation.
Due DiligencePipeline stage where claims are validated and risks assessed.Where grounding matters most. Every claim is verified against facts.
Investment MemoArtifact synthesizing findings into investment recommendation.The deliverable for the Investment Committee.
ICInvestment Committee---group that reviews investment memos.Decision-makers. The memo is written for them.
CIMConfidential Information Memorandum. Source document for deal analysis.Primary input. Contains company financials, strategy, market position.

Anti-Glossary

Terms we deliberately do not use---and what to say instead:

AvoidUse InsteadWhy
"Chat""Conversation" or "Workload"Conversations are freeform agent chat. Workloads are structured pipeline execution. Neither is a generic chatbot.
"Message""Task output" or "Artifact"Agents produce work products. (Exception: conversation messages are called messages.)
"Prompt""System prompt" or "Agent persona"Agents have structured personas, not ad-hoc prompt strings.
"AI Assistant""Agent"Agents are specialists with defined capabilities, not general assistants.
"RAG""Knowledge retrieval" or "SPO + vector"We use structured facts AND semantic search. RAG undersells it.
"Context window""Requirements" or "Forwarded context"Agents receive structured context from prior stages, not raw token dumps.
"Hallucination""Ungrounded claim"Be specific. Claims are grounded or ungrounded against SPO facts.