> ## Documentation Index
> Fetch the complete documentation index at: https://docs.delphina.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Context Layer

> How Delphina builds, validates, and maintains the knowledge that makes answers trustworthy

Without documented context, the agent has to guess what `amt` means, whether churn includes downgrades, or which ID joins orders to customers. The context layer eliminates that guesswork — it's a versioned knowledge base of your tables, metrics, business rules, and domain knowledge that the agent draws on for every answer.

Delphina builds the context layer automatically, validates it continuously, and surfaces gaps for your team to fix: **Sources** feed **Jobs** that build **Knowledge**, **Evaluations** validate it, the **Inbox** surfaces gaps, you fix the knowledge, and the next cycle gets better.

<img src="https://mintcdn.com/delphina/HZ-dTGWYRP2B4d1f/images/context-layer.png?fit=max&auto=format&n=HZ-dTGWYRP2B4d1f&q=85&s=d7926459dc25cc0d4b0d76de9e4d7aed" alt="The Context Layer dashboard showing Sources, Jobs, Knowledge, Evaluations, and the Inbox" style={{ borderRadius: '8px', marginTop: '16px' }} width="2576" height="1383" data-path="images/context-layer.png" />

## Sources

Sources are the raw inputs that feed your context layer — database connections, file uploads, and MCP connections:

* **Warehouse connections** — Snowflake, BigQuery, Databricks, Redshift, or PostgreSQL with read-only credentials.
* **File uploads** — CSVs, spreadsheets, or other reference data uploaded through the UI.
* **MCP connections** — External tools and APIs connected via the Model Context Protocol.

Manage connections from **Org Admin**. See: [Warehouse Connections](/administration/warehouse-connections) | [MCP Connections](/administration/mcp-connections)

## Jobs

Jobs are background processes that build and keep the context layer up to date. View and trigger them from **Context > Jobs**.

* **Knowledge update** — Discovers schemas and query history, then documents your most important tables, metrics, and business rules. This is what runs during [automated onboarding](/knowledge-agent/onboarding).
* **Evaluations update** — Generates test cases from your current knowledge base so the system can validate its own accuracy.

Jobs run on a recurring schedule and can be triggered manually.

## Knowledge

Knowledge is the documented context the agent uses to answer questions — descriptions of tables, metrics, business rules, and known data nuances, organized into namespaces. Every edit is versioned for rollback.

The agent writes knowledge automatically during onboarding and jobs. Your team edits it with `/knowledge` in chat or directly in the UI.

See: [Automated Onboarding](/knowledge-agent/onboarding) | [Maintenance](/knowledge-agent/maintenance)

## Evaluations

Evaluations are quality checks that validate agent answers. Delphina auto-generates test cases from your knowledge base, and an LLM judge scores each response against expected results. Evaluations run weekly and can be triggered manually from **Context > Evaluations**.

A background [critic agent](/analytics-agent/critic) also reviews every chat response in real time, flagging missing knowledge and unjustified assumptions as inline annotations.

See: [Evaluations & Quality](/trust-and-quality/evaluations)

## Inbox

When an evaluation fails or the critic flags a problem, it surfaces as an issue in the **Context Layer > Inbox**. From there you can read the failure, open `/knowledge` to fix the documentation, and mark it resolved. Fix the knowledge, re-run evaluations, and the failing test passes.
