Skip to main content
Updated in 4.63 The Cognigy Text format (CTXT) is a file format developed by Cognigy for extracting knowledge with Knowledge AI. You can segment the text in a CTXT file into Knowledge Chunks before uploading the file as a Knowledge Source. You can edit CTXT files in text editors, such as Visual Studio Code and Notepad++. Text editors improve the visual representation of Markdown syntax and make it easier to read a CTXT file. To make CTXT easier to read, you need to configure the text editor to highlight Markdown syntax:

Limitations

  • Header limitations:
    • You can add up to 20 Source metadata pairs per Knowledge Source.
    • Source metadata can have up to 1000 characters.
  • Body limitations:
    • You can add up to 1000 Knowledge Chunks per CTXT file.
    • You can add up to 20 Chunk metadata pairs per CTXT file.
    • Knowledge Chunk text can have up to 2000 characters.
    • Chunk metadata can have up to 1000 characters.

Restrictions

  • Formatting restrictions:
    • The file extension must be .ctxt.
    • You must use the CTXT structure.
    • You must use Markdown syntax.
  • Naming restrictions:
    • The file name can have up to 200 characters.
    • The file name can’t start or end with a space.
    • The file name can’t contain /, \, :, *, ?, ", <, >, |, or ¥.
  • Knowledge Chunk text CTXT containing unclosed HTML tags for block-level elements in the CTXT body, such as <div>, <table>, and <p>, causes the Markdown parser to include the metadata of the following Knowledge Chunk in the previous Knowledge Chunk. To avoid unintended inclusion, of metadata in the Knowledge Chunk text, ensure you close HTML tags for block-level elements or remove them from the Knowledge Chunk text.

Content Segmentation Basic Rules

To segment the content of a CTXT file into Knowledge Chunks, you need to meet the following rules:
  • The first Knowledge Chunk starts immediately after the first double line break in the CTXT file.
  • Double line breaks separate text into Knowledge Chunks.
  • CTXT files must comply with Knowledge Chunks limitations.

CTXT Structure

A CTXT file must include a header and a body.
You can download the previous CTXT file sample for testing Knowledge AI.
The header of a CTXT file contains the Source metadata at the top of the CTXT file. In CTXT files, you must format Source metadata as key-value pairs wrapped by backticks. The keys refer to the information the Source metadata holds, and the value is the information. For example, in title: Cognigy xApps FAQs, title is the key and Cognigy xApps FAQs is the value.

Example

Body

The body of a CTXT file contains Knowledge Chunk text and Chunk metadata. Knowledge Chunks must be separated by double line breaks.

Examples

Example 1:
Example 2:

More Information

Last modified on April 21, 2026