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

# How EDN works

> The path from content in to governed context out.

## The pipeline

EDN turns raw content into governed context in a fixed sequence of steps.

**1. Content enters**

Your application sends content to EDN: a conversation round, a document to
upload, or a correction. Each item arrives through a typed endpoint in the
API.

**2. Classification**

EDN labels each record with a provenance class that records its origin, for
example whether a user stated it, a user confirmed it, it came from a
document, or a model inferred or generated it.

**3. Governed storage**

Records are stored with their type, provenance and domain. Replaced records
are marked rather than silently overwritten, so history stays traceable.

**4. Retrieval**

When your application asks for context, EDN finds the stored records that
are relevant to the query, considering only the provenance classes that are
allowed as context. No model chooses the records.

**5. Governed context**

The selected records are assembled into a compact package, the SIP
(Session Initialisation Package). Unconfirmed AI output never enters it.
Your application places this package in your model's prompt.

## API call flow

Each turn of a conversation takes two calls to EDN: one before your model
replies, and one after.

![API call flow: the user sends a message, your app builds a SIP from EDN memory, your model replies using the SIP, and your app saves the turn to EDN memory.](https://mintcdn.com/tensor-pro/zMI0H6UG_-_OjVOU/images/api-call-flow-light.svg?fit=max\&auto=format\&n=zMI0H6UG_-_OjVOU\&q=85\&s=6f05ab78aaac14ec66d4d15112967a1b)

See [Build a SIP](https://docs.tensorpro.ai/api-reference/build-sip.md) and
[Save a conversation turn](https://docs.tensorpro.ai/api-reference/ingest-round.md) for each call.

Want users to confirm the assistant's answers? See
[Classify an assistant reply](https://docs.tensorpro.ai/api-reference/infer-round.md) for the optional
confirm flow.

## Where a model is used

EDN never answers questions for you. Your model reads the SIP and produces the
answer.

EDN does use a language model internally to classify some of what it stores:
facts stated in a user's message, corrections, and, on some turns, whether an
assistant reply is supported by the context it was given. Building the SIP uses
no model.

See [Provenance](https://docs.tensorpro.ai/concepts/provenance.md) for which provenance classes are
used as context, and [The SIP](https://docs.tensorpro.ai/concepts/sip.md) for how citations work.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.