Context

Overview

TM AI Context allows you to define reusable context blocks that can be injected into AI prompts. Contexts enrich the AI’s understanding of a task or dataset by including relevant information such as background details, document metadata, or specific document content. These contexts can then be linked to TM AI Agent or TM AI Chain stages to ensure consistent and accurate AI behavior across use cases.

Core Fields

Each context record includes the following fields to define how context is constructed and used:

Field

Description

Context Name

Unique name or identifier for the context snippet.

Application

Links the context to a specific application, ensuring it's scoped appropriately.

Context Type

Specifies how the context will be generated. Options include: Text, DocType Metadata, or Document Data.

Text

If the context type is Text, this field contains the plain text to be injected into prompts.

DocType

If context type is DocType Metadata or Document Data, this field defines which DocType is referenced for metadata or data context extraction.

Document

Optional: Used when Document Data type is selected. Points to a specific record whose data will be included in the prompt context.

Multiple Documents

Only relevant for Document Data type. If enabled, the context will include data from multiple filtered documents instead of just one.

Active

Toggle to enable or disable the context from being injected during AI execution.

Procedure

Follow these steps to create and configure a context record:

  1. Click Add TM AI Context button from the list view.
  2. Set the Context Name to identify the context snippet.
  3. Link an Application to scope the context under a specific use-case or product environment.
  4. Select a Context Type:
    • Text: Manually input static context in the Text field.
    • DocType Metadata: Select a DocType to extract its field definitions (label, type, etc.) as context.
    • Document Data: Select a DocType and optionally a specific Document (record).
  5. If using Document Data, decide:
    • Leave Multiple Document unchecked to only fetch one record.
    • Enable Multiple Documents to include a list of records, useful for summarizing or comparing data.
  6. Enable or disable the Active checkbox to control whether this context is available for injection.
  7. Save the record. It is now usable by any AI Agent or AI Chain stage that supports context injection.
Discard
Save

On this page

Review Changes ← Back to Content
Message Status Space Raised By Last update on