Skip to main content
Zimei TechnologyEnterprise AI · Development and delivery
EnglishEN
Discuss a project

Enterprise AI Project Wiki · Data, knowledge, and models

Context

Also calledModel context · LLM context · Input context · Runtime context · Inference context · Context assembly · 上下文

Definition

Context is the set of runtime information that an application actually makes visible to a model or orchestrator during one AI inference or governed agent step so it can interpret the current request and produce the next output. A governed context version records at least the original request; each item's role and provenance; subject and access scope; business time and validity; original or derived status; selection and exclusion reasons; order and boundaries; token accounting and truncation; model and interface versions; and what the resulting output may cite or trigger.

Context is what this inference can actually see, not everything the model knows

A model may have encountered vast amounts of information during training, but one response can rely only on what the application makes available for that turn. This boundary shows which material supported an answer, what was missing, and which state never entered the model's view.

An employee asks, “Can I still submit the overseas-purchase attachments for this request tomorrow?” The system must resolve who “I” is, the absolute date meant by “tomorrow,” the applicable organisation and region, the request's current state, and the current policy and exceptions. Identity and time zone come from trusted application state, request status from an authorised business system, clauses from retrieval, and the question from the user. They serve one task but have different provenance and authority.

Context exists at runtime. Information learned into model parameters, documents that remain in an index but were not retrieved, history stored but not loaded, and data that a tool could fetch but has not returned are not part of this inference's actual context. Information previously displayed in the interface is not necessarily sent to the model; information sent to the model is not necessarily shown to the user.

A context window is a model or interface capacity boundary, not a content strategy. Filling it with more documents can improve coverage, but can also add repetition, conflicts, stale or unauthorised material, malicious instructions, and positional noise. Original research has also shown that models can use relevant information differently depending on its position in a long input.

Make every context replayable at both call and item level

Saving only the final answer cannot reconstruct what the model saw. A replayable record identifies each item's source, version, access, selection reason, order, and truncation so the call can be reviewed later.

Call identity

Record request, turn, and trace IDs; user or service subject; tenant; session; task; language; trusted current time; and target business object. Do not ask free text to establish trusted identity.

Model and interface

Fix provider, model or endpoint, exact version or deployment, message API, supported roles and modalities, tokeniser or counting API, context limit, output reserve, and inference parameters.

Item manifest

Give each item a context-item ID, type, role, source/object/version, original locator, acquisition time, business-validity interval, access labels, trust class, original/derived status, and checksum.

Selection and exclusion

Retain why an item was included, deduplicated, expanded, summarised, degraded, excluded, or truncated, together with query, filters, ranks, thresholds, business rules, and versions. Do not preserve only one unexplained concatenated string.

Structure and priority

Record interface roles such as system, developer, user, and tool; block boundaries; titles; source labels; order; conflict rules; and permissible citations. Formatting labels are not a security boundary.

Budget and transformations

Account separately for instructions, history, evidence, tools, schemas, modalities, and reserved output. Record cleaning, transcription, translation, summarisation, compression, and the actual truncation boundary.

Use contract

State which items must support the answer, which are only user assertions, which can populate tool parameters, how insufficient evidence stops processing, which citations are required, and what the model cannot decide.

Outcome and retention

Link outputs, citations, tool calls, validations, human decisions, errors, and feedback. Based on classification, retain encrypted text, a restricted snapshot, identifiers/hashes, or metrics, with access, retention, and deletion controls.

Different context components carry different responsibilities; they are not one block of background

System instructions set task boundaries, user input expresses the present need, retrieval supplies evidence, and business APIs return live state. All enter the input but carry different authority; merging them makes it hard for both model and reviewer to distinguish instructions from data.

ComponentResponsibility and boundary
Controlled instructionsDefine role, task, prohibitions, tools, and output format under application-owner control. They are not business facts and cannot enforce security by wording alone.
Current user inputExpresses a question, material, or intent. It is data to process, not a trusted instruction source; identity, access, amount, and dates need authoritative validation.
Conversation historyResolves references and maintains continuity, but can contain old answers, corrections, sensitive data, and stale state. It should not grow indefinitely without selection.
Retrieved evidencePolicy clauses, tables, images, or chunks selected from authorised sources. Preserve source, version, position, time, and access; relevance alone does not establish sufficiency or truth.
Structured business stateTrusted code supplies fields such as subject, tenant, time zone, order status, allowance, or feature state. Keep them separate from values inferred from prose.
Tool descriptionsDescribe available capabilities, parameter schemas, and purposes to the model. Actual permission, validation, invocation, and execution remain application controls.
Tool resultsReturn current data or an error for a particular invocation, with ID, parameters, source, time, and state. External content can still be untrusted.
Examples and formatsDemonstrate classification, extraction, or output shape. They guide behaviour but do not prove current facts; example values must be clearly synthetic and safe.
Retrieved memoryA preference, commitment, or summary selected from short- or long-term storage. Confirm subject, provenance, consent, validity, and purpose; the whole memory store is not current context.

Provenance, message role, and trust are different properties

An official document has an identifiable source, but instructions inside it do not gain system authority. Likewise, placing text in a message role does not make its facts true. Record provenance, protocol role, and trust class separately.

Provenance

Identify whether content came from a user, business system, knowledge document, external page, tool, model summary, or human confirmation. Following W3C PROV, connect original entities, processing activities, derived entities, and responsible agents.

Message role

System, user, assistant, and tool are model-API structure and behavioural signals. Vendors support them differently, and a role never proves truth, authority, authorisation, or attack resistance.

Scope of authority

A policy source can establish rule text but not the live state of an individual's request. A user can express intent but not self-grant access. A model summary can derive wording but cannot elevate the source's authority.

Trust class

Separate controlled application instructions, verified structured state, approved originals, user input, external content, and model-derived content. Treat every user, document, page, tool response, and memory write as untrusted data.

Visible transformation

Translation, OCR, table transcription, summarisation, deduplication, and compression can change meaning. Preserve the original locator, processor/model/prompt version, and human correction; cite authoritative originals for factual claims.

Independent enforcement

Tenant isolation, object access, schemas, amount limits, tool allowlists, and approvals are enforced by deterministic code or authorised systems. “Ignore malicious instructions” cannot be the only control.

Context assembly starts from the task and authorised set, not from concatenating Top-K

Assembly is more than appending ranked search results to a prompt. It begins with the current subject, business object, and question, then selects the smallest authorised set that jointly supports the task while restoring necessary headings, table headers, conditions, and exceptions.

Identify the turn's task

Decide whether the system must answer, extract, compare, summarise, or prepare an action. Define objects, constraints, time, risk, required evidence, and allowed outputs; split compound needs into traceable subtasks.

Acquire trusted runtime state

The application reads subject, tenant, role, locale, time zone, session, business object, and access scope, and exposes only fields necessary for the current step.

Obtain candidate information

Invoke retrieval, databases, or tools as required and retain candidate and return states. Keep candidate generation distinct from final context selection so missing retrieval and missing assembly can be diagnosed separately.

Validate and unify identity

Check access, validity, withdrawal, provenance, version, and format. Deduplicate by stable source/object/chunk identity and reconnect parent clauses, table headers, definitions, exceptions, and attachments.

Select the evidence combination

Cover every required part and material counterexample, favouring authoritative, current, direct, and locatable evidence. Preserve independent conflicts rather than deleting an exception because of a lower rank.

Structure the input

Place controlled instructions, question, business state, evidence, and tool data into well-separated fields or messages with source IDs and allowed uses. Commands inside source content remain data.

Budget and degrade

Reserve capacity for critical instructions, question, minimum evidence, output, and tool turns before history and supplementary material. On overflow, apply an approved compression, re-retrieval, decomposition, clarification, or stop path.

Pre-submission gate

Confirm mandatory facts are present, conflicts are governable, secrets and unauthorised data are absent, truncation preserves semantics, and citations resolve. Otherwise, do not produce a definitive answer or high-risk action.

Relevance, sufficiency, minimisation, and usability are separate tests

A rule about the same topic is relevant but may still omit the subject, time, condition, or exception needed for an answer. Context must also remain small enough to keep the focus and complete enough to preserve units, negation, and source location.

Relevant

An item directly supports a question part, condition, exception, or counterevidence. Search similarity and term matches are candidate signals, not final relevance judgements.

Sufficient

Evidence covers the subject, object, rule, conditions, time, exceptions, and live state needed for the response. A general principle without the applicable condition remains insufficient.

Minimal

Send only information necessary for the approved task. Extra chat, other customers' data, entire documents, implicit identity fields, and secrets enlarge privacy, security, noise, and cost risk.

Usable

Retain heading hierarchy, table headers and units, negation, footnotes, definitions, parent relations, and source locations so the model can interpret and the user can verify. An isolated sentence can be relevant but unusable.

Multi-source composition

A fact found by both lexical and vector channels is still one source. When independent corroboration is needed, count source and responsibility. Never merge clauses from different sources into an unattributed quotation.

Explicit gaps

Record which question parts lack evidence and which sources failed or were access denied. Insufficiency is a managed state, not a blank to fill from model familiarity or vaguely similar passages.

Structure, order, and boundaries change how the same information is used

The same passages can behave differently when clearly partitioned or mixed together. Keep source boundaries, separate current state from history and tool results, and test evidence placed at the beginning, middle, and end of long inputs.

Layered regions

Separate task policy, user question, trusted state, source evidence, tool results, and output schema through native API roles/content blocks or stable structure rather than one long natural-language prefix.

Source separation

Label every evidence item with source ID, title, version, location, and effective time so adjacent sources are not fused and citations do not point to the wrong document.

Semantic neighbourhood

Include definitions, headers, negation, prerequisites, exceptions, and parents needed to understand a hit. Add neighbours based on the question rather than always copying N chunks before and after.

Ordering basis

Order by question subpart, evidentiary responsibility, authority, time, and retrieval relevance, retaining the rule. Do not assume the model uses all positions equally well.

Duplication and bias

Repeated facts consume budget and create an implicit vote. Remove mirrors and overlapping chunks while preserving genuinely independent sources and conflicts.

Multimodal relationships

Images, tables, audio, and pages need captions, coordinates, units, reading order, and links to surrounding text. Transcription and description are derived data, not the original.

Positional regression

Move key evidence to the beginning, middle, and end while varying distractors and total length. Fitting within the context window does not prove positional robustness.

The token budget constrains input, output, tool turns, latency, and cost together

Even a large context window needs room for the response and later tool turns. Budget is not only a character count: longer input adds first-token latency, cost, caching and logging load, and makes decisive conditions easier to lose through truncation.

Count with the target interface

Characters, Chinese characters, words, image bytes, and file sizes are not tokens. Use the target model/API method and include role, system, tool-schema, attachment, and wrapper overhead, recording the counting version.

Reserve output and later turns

The context limit can be shared by input and generation or constrained by product rules. Reserve capacity for the answer, citations, structured output, tool call, and subsequent tool-result invocation.

Budget priority

Retain non-negotiable controlled instructions, the current question, trusted state, and minimum sufficient evidence before history, examples, secondary sources, and redundant explanation.

Detect truncation

Do not rely on silent provider truncation. Record original tokens, sent tokens, removed items, and the final boundary; ensure JSON, tables, clauses, negation, and multibyte content remain intact.

Compression is lossy

Summaries, conversation compaction, extraction, and context compression can omit detail or introduce error. Mark derivation, preserve access to originals, and test by task; retain original high-risk values and conditions.

Long-context trade-off

A larger window can hold more material but increases prefill latency, input cost, cache and logging burden, and can reduce effective use. Approve a quality–latency–cost curve, not an instruction to fill the advertised limit.

A cache is not memory

Context or prompt caching reuses computation for repeated input prefixes to reduce some latency or cost. It does not update facts, expand access, or create cross-session memory; govern TTL, region, keying, invalidation, and sensitivity separately.

History and long-term memory become context only when selected for this turn

A stored conversation is not necessarily visible in this call, and a remembered preference may no longer apply to this person or task. Every retrieval should recheck subject, time, purpose, and whether a later correction superseded it.

ObjectRelationship to current context
Complete conversation recordStores prior messages, attachments, and events for audit or later selection. It should not automatically be resent in full.
Current history windowA selected set of original messages used for references and continuity. Remove withdrawn, unrelated, unauthorised, and stale material.
Conversation summaryA derived compression of older messages that saves tokens but may omit negation, correction, and responsibility. Preserve summary version and links to source messages.
Structured session stateApplication-owned selections, object IDs, workflow steps, time zone, and authority state. Each field needs provenance, TTL, and update rules.
Long-term memoryPreferences, facts, or task state retained across sessions. It needs consent, subject binding, purpose, expiry, correction, and deletion; a selected memory then becomes a context item.
Parametric memoryCapabilities and information learned into model weights. Applications usually cannot enumerate or delete it per request, and it is not an auditable runtime item.

Corrections supersede

When a user later corrects an address, date, or object, old and new values should not remain equal. Store supersession and current validity rather than hoping the model follows the last sentence.

Subject isolation

A session ID is not identity. Revalidate user, tenant, delegation, and purpose whenever loading history or memory to prevent cross-user session or cache leakage.

Failure recovery

Retries, disconnects, and concurrent turns need turn/invocation IDs, ordering, and idempotency so tool results are not duplicated, corrections lost, or failed output saved as confirmed memory.

Tool descriptions, calls, and results enter context separately; execution authority stays in the application

A model can see a tool description and propose arguments, but the application still owns access checks, business validation, and execution. A returned tool message is also data; a sentence claiming success cannot rewrite the authoritative business state.

Tool catalogue

Expose only tools needed for this task, with minimal schema, purpose, prerequisites, and return type. A tool description is a capability description, not a credential or grant.

Parameter provenance

Mark whether a parameter came from user text, trusted session state, retrieval, or model inference. Independently validate subject IDs, amounts, targets, access, and irreversible options.

Invocation linkage

Bind a call and result through invocation ID, tool version, parameter hash, start/end times, and status. Timeout, partial, unknown, and success are distinct states.

Result minimisation

A tool may return a full record to the application, which can pass only the necessary fields and error state to the model. Exclude unrelated personal data, internal fields, secrets, and other tenants' content.

Result trust boundary

An authorised internal API can be authoritative for specific fields, but pages, mail, files, and third-party responses can contain errors or malicious instructions. Keep all as separated data and validate.

Output to action

Model recommendations or function arguments are untrusted output. Deterministic controls enforce schema, business rules, access, duplicate detection, human approval where required, execution, and receipt.

Multi-step agents

Each step receives only context needed for that decision and records observations, selections, tool results, and stop reasons. Do not treat an entire hidden scratchpad or internal reasoning as an authoritative business record.

Time, version, conflicts, and insufficiency must be explicit during assembly

A current policy, an old notice, and live order state may each be authentic without being interchangeable. Assembly chooses the right time basis, preserves conflicting sources, and distinguishes missing, timed-out, inaccessible, and nonexistent information.

Query time

Resolve “today,” “then,” and “currently valid” to a trusted absolute time and zone. Distinguish event, record, publication, effective, expiry, retrieval, and invocation times.

Version selection

Use the approved current version for present questions and the corresponding historical version for past questions. Label drafts, superseded, and withdrawn versions; latest modification is not necessarily applicability.

Dynamic and static authority

Policy documents explain rules, while a live system determines current balance, status, or inventory. Do not answer live-transaction questions from cached prose or let a live field interpret policy exceptions.

Preserve conflicts

When sources, versions, tools, and user claims conflict, record each item and scope of authority. Resolve under approved priority rules instead of asking fluent generation to average them.

Insufficient material

When subject, condition, attachment, current state, applicable rule, or authoritative source is missing, state the gap and clarify, retrieve again, call a tool, hand over, or stop. Do not fill it with unrelated tokens.

Unavailable states

Access denied, source timeout, empty retrieval, parse failure, context overflow, and nonexistent content are distinct outcomes with separate user language and retry or stop paths.

Everything a model reads crosses both a data and control boundary

Sending material to a model is a data disclosure and an opportunity for untrusted content to enter the control chain. Access, minimum fields, provider region, logs, caches, and injection controls belong before transmission—not only after an answer is generated.

Least-privilege reads

Filter retrieval, history, memory, and tools by current subject, tenant, object, and purpose. Unauthorised content must not enter context first and be hidden only from final output.

Indirect prompt injection

NIST and OWASP note that attack instructions can be placed in pages, files, or other data likely to be retrieved. Separation, provenance labels, and prompt text reduce but cannot perfectly remove the risk.

Instruction–data separation

Users, attachments, retrieved chunks, tool results, and memory writes are untrusted data. They cannot change system policy, demand secrets, widen tools, or redefine the application's purpose.

Secret isolation

API keys, access tokens, connection strings, complete sensitive system instructions, and other users' content do not enter input merely for convenience. Tools use server-side identity and expose only necessary results.

Region and provider boundary

Confirm processing region, retention, logging, human access, subprocessors, and training-use terms for inputs and caches. Context caches are temporary data objects requiring their own controls.

Log minimisation

Full prompts aid replay but concentrate sensitive data. According to classification, store encrypted text, restricted snapshots, IDs/hashes, or metrics; limit access and retention and support deletion propagation.

High-risk actions

Even when a model claims it understood trusted context, payments, approvals, deletions, notifications, and external transmission still require business validation, least privilege, idempotency, human confirmation where needed, and an execution receipt.

Adversarial validation

Test direct and indirect injection, hidden text, image instructions, conflicting roles, unauthorised sources, tool-result injection, memory poisoning, encoding tricks, and overlong inputs, observing disclosure and action attempts.

Evaluate candidates, final context, model use, and business outcome separately

A wrong answer does not prove weak model capability: evidence may never have been retrieved, may have been excluded by selection, ignored in a long input, or derived from stale tool state. Layered evaluation gives each fix a defined target.

Fixed combination version

Freeze test queries, identities, access, sources/chunks, retrieval, selector, ordering, template, tokeniser, model, tools, and parameters, changing one main variable at a time.

Context relevance

Judge whether each selected item supports a question part, restriction, exception, or counterexample, reporting irrelevant and duplicate items and precision rather than inferring it from the answer.

Evidence completeness

Check that every required question part appears, including headers, units, negation, exceptions, time, and current state. Separate evidence never retrieved from evidence retrieved but not selected.

Utilisation and groundedness

Determine which context the response used and whether each verifiable claim is supported by the cited source. High groundedness still does not prove source truth or business correctness.

Correctness and task outcome

Authorised domain roles verify answer, citations, refusals, clarification, tool parameters, human handoff, and final business result. Do not replace risk judgement with one automated-judge score.

Position and length

Vary evidence position, distractor count, total tokens, order, repetition, and distance between needed sources. Prove stable task use rather than mere acceptance under the limit.

Security and privacy

Use separate gates for unauthorised and cross-tenant content, revoked access, historical sensitive values, injection, secrets, logs, caches, and deletion. Leakage cannot be averaged away by correctness.

Statistics and review

Stratify by task, language, document, length, source quality, risk, and insufficiency reason; resample nondeterministic output and retain human guidance, disagreement, and adjudication. Validate automated evaluators separately.

Operate the assembly chain, not only the model API

A 200 response from the model API says the call completed, not that context was complete, compliant, or economical. Production traces identity reads, retrieval, selection, compression, tokens, generation, tools, and validation as one chain.

Stage latency

Record P50/P95/P99 for identity and state reads, retrieval, source fetch, deduplication, parent expansion, compression, token counting, model prefill/generation, tools, and validation.

Scale distribution

By type, monitor input/output tokens, item and source counts, history length, tool schemas, attachment size, truncation, cache hits, and overflow. Means alone hide tails.

Quality signals

Sample context relevance and completeness, citations, conflicts, insufficiency, user corrections, and handoffs. Response likes are biased by interface, position, and users' inability to see hidden errors.

Cost attribution

Separate retrieval, storage, context cache, input, output, reranking, tools, and retries, and attribute them to a successful task rather than a single invocation.

Degradation matrix

For retrieval, source, token-count, compression, cache, model, or tool failure, define retry, narrower task, read-only answer, clarification, human handoff, or stop. Never silently remove decisive evidence and continue confidently.

Change governance

Every source, chunk, selector, ordering, template, role, tokeniser, model, limit, cache, memory, and tool-schema change has an owner, evaluation, approval, release, rollback, and impact record.

Handover

Transfer context schemas, selectors, source/access mappings, budgets, templates, test sets, traces, dashboards, runbooks, retention/deletion controls, provider limits, and known failures so a new team can replay the chain.

One context for a procurement knowledge question

This constructed example illustrates content responsibilities and assembly order. It is not a client policy, real interface, token limit, access rule, achieved result, or default product design.

Current request

The user asks, “Can I still submit the overseas-equipment attachments for PR-4821 tomorrow?” Retain the wording, turn ID, and language; do not treat “I” or “tomorrow” as structured fact.

Trusted state

The application obtains user, tenant, organisation, and time zone from the authenticated session and owner, state, and current attachment list from the procurement API, exposing only required fields.

Knowledge evidence

Under common access, region, and time constraints, retrieve the applicable current policy clause, attachment table, overseas exception, and approved operating guidance, preserving version, page/section, headers, and effective interval.

Assembly

Keep controlled task instructions separate; label the question, trusted state, and every evidence item. Deduplicate the same clause, add the table header to matched rows, and retain an old policy only as a historical conflict rather than current authority.

Budget

First retain the question, live state, and minimum sufficient clauses, then necessary conversational continuity. If the full attachment table does not fit, choose relevant rows with a source locator rather than truncating units or conditions.

Stop

Do not give a definitive submission answer or invoke the submission tool when identity or delegation is unclear, the request-state API is unavailable, current policy conflicts with a notice, an overseas exception attachment is missing, access fails, or decisive content is truncated.

Output

Explain live state, applicable rule, missing attachments, and permitted next step separately, linking each to its source. Before submission, ask the user to confirm structured parameters and run access, rule, and idempotency checks.

Evidence and regression

Retain item IDs, selection/exclusion, tokens, model, citations, tool invocation, and final business state. Regress current, historical, exceptional, insufficient, conflicting, unauthorised, injected, and overlong-attachment cases.

Applications govern context in both RAG and agents; the model does not inherit that responsibility

Fixed RAG assembles evidence once, while an agent may search and use tools over several turns. In both cases access, budget, provenance, and stopping remain application responsibilities; the model may suggest a next step but cannot authorise enterprise data exposure.

Standard RAG

A fixed orchestrator receives a query, searches, selects and assembles context, then calls a model. Retrieval Top-K and final context are separate artifacts with separate retention and evaluation.

Agentic RAG

An agent can decide whether to search again, decompose a need, or choose a tool, but application policy limits each observation's access, provenance, budget, and stopping, with full tracing.

Grounding

Requiring claims to be supported by supplied sources is a usage and evaluation relationship. It does not prove that the source is true, complete, current, or authorised, and cannot prevent every extrapolation.

Context engineering

The label can broadly cover selection, structure, compression, memory, and tool information, but it is not one fixed standard or component. This entry owns the runtime information object and its testable governance, not a universal definition of a fashionable practice.

The model does not know state the application did not provide

A current amount in a database, the caller's real permissions, present time, screen contents, and an external service state become usable only after the application retrieves and places them in this turn. The inverse also matters: convenience is not a reason to send an entire customer table or conversation history when a few fields are sufficient.

Internal reasoning is not the handover record

Preserve inputs, provenance, externally visible decisions, tool calls, validation, and business records without relying on hidden chain-of-thought. Auditable traces and explicit reason fields carry accountability.

Continuous combination regression

Any source, retrieval, selector, prompt, model, memory, tool, or policy update reruns quality, safety, latency, cost, and real-task tests.

Context compared with adjacent concepts

Context is often confused with prompts, conversation history, memory, knowledge bases, and window size. The key distinction is that context is the information actually visible in this turn; the adjacent terms describe sources, organisation, or capacity.

ConceptBoundary from context
Context windowThe model or interface capacity for tokens or modalities in one operation. Context is actual selected content and should normally leave output headroom below the advertised limit.
PromptThe input structure that guides task and output. Context is often its data component but can also arrive as structured messages, tool results, or cached content.
System promptA higher-trust application's role and behaviour instructions. It is one context component and cannot replace access or business controls.
Conversation historyPrior user, assistant, and tool messages. Only the part selected, validated, and sent for this turn is current context.
MemoryMechanisms and stored information across turns or sessions. A memory becomes current context only after subject, purpose, validity, and relevance selection.
Retrieval resultA candidate returned by search. Assembly then validates, deduplicates, expands, selects, orders, and budgets; unselected candidates remain invisible to the model.
Context cacheA mechanism for reusing computation or storage for repeated input tokens, aimed at latency and cost. It does not establish correctness, freshness, access, or durable memory.
GroundingThe objective and check that output is supported by supplied evidence. Context can be its evidence, but grounded is not the same as factually correct or authorised.
Model knowledgeCapabilities and information learned into weights, normally not itemised, authorised, or cited at runtime. It is not an application-governed context item.
Document chunkingCreates retrievable units during ingestion. Assembly can expand a matched child into a parent, table header, or neighbour.
RAGThe full pattern of question, retrieval, context assembly, and generation. Context is a governed artifact before one model invocation.
MCPA protocol name for connecting AI applications to tools, resources, or prompts. It can expose context sources but is neither the context itself nor its governance policy.

Sources and scope

This entry explains the context visible to one model inference in an enterprise AI, RAG, or agent system: the information an application assembles from instructions, the current user input, authorised session state, retrieved evidence, tool results, and necessary business state, with explicit identity, provenance, trust, access, time, order, and token-budget controls, and then makes available to a model or orchestrator. Here, context is not synonymous with ordinary background, a business scenario, model-training data, parametric memory, a knowledge base, retrieval results, a prompt, system prompt, conversation history, memory, context window, context cache, grounding, or a complete RAG/agent system. Those are possible sources, containers, stages, or adjacent capabilities. A model's ability to accept a length does not prove robust use of every item; inclusion does not prove truth, authority, authorisation, relevance, completeness, or actual use. No token count, ordering, truncation, or summarisation method is universally best across models, tasks, languages, and risks. This entry does not fully define prompt engineering, tokenisers, model architecture, retrieval, long-term memory, MCP, agent orchestration, privacy and security programmes, or vendor APIs. Authorised project roles must approve a context strategy against the actual information scope, model capability, task evidence, and risk.