Documents

Open in CMS

The Documents page is where you upload and manage the files that form your agent's primary knowledge base. Supported formats are PDF, Markdown (.md), and plain text (.txt). Each uploaded document is parsed, split into searchable chunks, and indexed. After that, the agent can draw on its content when answering questions.

In this tutorial you see the difference a single document makes. You ask Atlas, Kirana Group's operations assistant, who has to approve a project worth $2.5 million. Without Kirana's approval policy, Atlas cannot answer. Then you upload the policy, SOP-FIN-007 "Project and Capex Approval Policy", ask again, and get the exact approval chain.

Atlas before and after uploading SOP-FIN-007

Before you start

  • Set up your agent's identity in Give Your Agent an Identity, especially the Mission in Behavior, so the agent knows which questions your documents should answer.
  • Read Teach Your Agent for how knowledge turns into answers.
  • Check Knowledge → Retrieval. If Enable reference is off, the agent ignores everything you add here. You do not have to switch it on first: when you add your first document, the CMS offers to do it for you (Step 4). See Retrieval.
  • To follow along, download the sample file kirana-approval-policy.txt. For your own agent, prepare your files as PDF, Markdown (.md), or plain text (.txt).

Step 1: Ask the question before the SOP is uploaded

In the CMS, go to Knowledge → Documents in the left sidebar. In the preview panel on the right, click the reload button to start a fresh conversation. Then ask:

Who has to approve a project worth $2.5 million?

Atlas cannot give the right answer. It says it cannot confirm who approves a $2.5 million project from the available Kirana SOP references, and points you to the project's approver or Finance. That is the correct behavior for an agent that does not know the rule: it does not guess. It simply has not seen Kirana's approval policy yet.

Atlas preview before the SOP is uploaded: to the question 'Who has to approve a project worth $2.5 million?' Atlas replies that it can't confirm who approves a $2.5 million project from the available Kirana SOP references and suggests checking with the project's designated approver or Finance

Step 2: Download the SOP

Download kirana-approval-policy.txt. It is a short plain-text SOP owned by Kirana Group Finance. The part that matters for this tutorial is the approval matrix in section 3:

Total project value (USD)Who approves, in this order
Up to 100,000Department Head
100,001 to 1,000,000Department Head, then Finance Controller
1,000,001 to 5,000,000Group Risk Office review, then Regional Director, then CFO
Above 5,000,000Group Risk Office review, then CFO, then CEO, then the Board Investment Committee

Section 4 lists what to submit: form KG-F12 in the Procurement Portal for every request, at least three vendor quotations above USD 250,000, and a business case and risk register above USD 1,000,000.


Step 3: Add the document

  1. On the Documents page, click Add document at the top right. A side sheet opens with three cards: File, Details, and How it's processed.

  2. In the File card, click Choose files (or drop the file on the card) and pick kirana-approval-policy.txt. The card shows the file name and size, and the Before you upload tips (for example, remove headers, footers, and page numbers). The file is stored only temporarily and deleted after training finishes. To add several files at once, see Add several documents.

  3. In the Details card, the CMS fills in what it can from the file. Check each field:

    FieldValue for Atlas
    Title (required)Project and Capex Approval Policy (filled in from the file name at first; replace it)
    Author (required)Kirana Group Finance (or DEFAULT - Default Author if you have not created it yet)
    Code (required)SOP-FIN-007 (the CMS suggests a random code; replace it)

    Author lists the authors registered in Citations. Every agent has the author DEFAULT. If you have not created Kirana Group Finance yet, pick the default for now: the Citations tutorial creates it and assigns it to this document. Code is a unique identifier for the document; using the SOP number makes it easy to find later.

  4. Leave the optional fold Cover, source and permissions closed for this tutorial. It holds:

    • Thumbnail Source: a cover image, either a URL (paste an HTTPS image link and click Preview) or an Upload (PNG, JPEG, or WebP).
    • Document source: a link to where the document comes from.
    • Permissions: permission codes that limit the document to authorized users. See Knowledge Permissions.
  5. In the How it's processed card, choose how the document is split into chunks. Pick Fast and basic. It is fast, low cost, and suits a short policy like this one. Automatic (recommended) picks the approach for you and is the right choice when you are not sure. Open Processing settings under the cards to adjust the chosen mode. The modes are explained in Processing modes below.

The footer shows what is still missing, for example Still needed: an author. The Add document button turns on when the card fields are complete.

Add document sheet with the File card showing kirana-approval-policy.txt, the Details card with Title Project and Capex Approval Policy, Author Kirana Group Finance and Code SOP-FIN-007, the closed fold Cover, source and permissions, and the How it's processed card with the mode cards Automatic (Recommended), Legal documents, Short fact sheets, Long structured content and Fast and basic, and the fold Processing settings

Step 4: Save and turn on references

  1. Click Add document. The CMS asks Are you sure to save your changes? Click Yes. The file is uploaded and processing starts.
  2. If Enable reference and Restrict answer are both still off for this agent, the CMS asks Enable references?: "Do you want to enable references to let your agent answer questions using your resources? Agent answers will be restricted to your resources only." Click Yes, enable. This switches on both Enable reference and Restrict answer, so Atlas answers only from your resources. No, thanks leaves the settings as they are.
  3. A message confirms Document created. Close it.
Enable references? dialog asking whether to enable references so the agent answers using your resources only, with the buttons No, thanks and Yes, enable

Yes, enable creates a draft change. Enable reference and Restrict answer are part of the agent's configuration, so the Preview uses them right away, but your live agent gets them only after you Publish. Remember to publish once you are done in this step; see Preview and Publish Changes. You can change both switches later in Retrieval. The document itself does not need to be published.


Step 5: Watch the chunking log until the document is Active

After saving, the document's detail page opens and the Chunking Log opens automatically on top of it. It shows each processing step as it happens. For the sample SOP you see, among others:

  • Detected file type: TXT
  • Starting semantic chunking...
  • Saving 2 text chunks
  • Done processing. Text Chunks: 2, Table Chunks: 0. Total: 2

Click the reload button next to Chunking Log to fetch new lines, or tick Auto Refresh. You do not have to wait: you can close the log and carry on, and processing continues in the background. To open the log again, click View log on the detail page.

Chunking Log modal with timestamped messages, from Routing to document processor and Detected file type: TXT through Starting semantic chunking, Saving 2 text chunks, and Done processing. Text Chunks: 2, Table Chunks: 0. Total: 2

While the document is being chunked, its badge shows Processing. When processing is done, the badge changes to Active, and the detail page shows Status: Active and Chunking process: Completed. Back on the Documents page, the row or card shows the title, the code SOP-FIN-007, the author, the number of active chunks, and the Active badge.

Documents page in grid view: the toolbar with the search box, Filters, the list and grid toggle, and Add document, and one card with the title Project and Capex Approval Policy, SOP-FIN-007 · Kirana Group Finance, 3 of 3 active chunks and the badge Active, then Showing 1 document

Step 6: Ask the same question again

In the preview panel, click the reload button to start a fresh conversation, and ask the same question:

Who has to approve a project worth $2.5 million?

This time Atlas answers from the SOP. For a $2.5 million project, approvals are required in this order:

  1. Group Risk Office review
  2. Regional Director
  3. Chief Financial Officer (CFO)

Scroll down in the answer to see the rest: form KG-F12 in the Procurement Portal, at least three vendor quotations, a business case and a risk register, with SOP-FIN-007 named as the source. That matches section 3.3 of the SOP, because $2.5 million falls in the USD 1,000,001 to 5,000,000 band.

Atlas preview after the SOP is uploaded: to the same question Atlas replies that for a $2.5 million project approvals are required in this order: 1. Group Risk Office review, 2. Regional Director, 3. Chief Financial Officer (CFO)

Managing the documents list

The list displays documents as rows (list view) or cards (grid view). Use the list and grid toggle next to Add document to switch between them. Each row or card shows the document's title, code, author, status badge, and how many of its chunks are active.

Use the Search documents box to find a document by code or title. The Filters panel holds the sort order and every filter, such as the status.

Document statuses

BadgeWhat it means
ProcessingThe document is being chunked. The agent cannot use it yet.
ActiveProcessing is complete. The agent uses the document in its answers.
InactiveSomeone clicked Deactivate. The agent ignores the document until it is activated again.
FailedProcessing failed. Open the document, check View log, then use Retry chunking or Purge document.
DeletedThe document was deleted. It stays in the list with this badge, but the agent no longer uses it.

While a change is being applied, you may briefly see a transitional badge such as Activating or Deactivating.


Processing modes

In the How it's processed card you choose a mode that controls how the system splits the document into searchable chunks. The right mode depends on the type and length of your document. After you pick a card, open Processing settings to change that mode's settings.

Quick comparison

ModeBest forAI processingSpeed
Automatic (recommended)Complex reference books, documents with heavy cross-references, or when you are not sureHighSlowest
Legal documentsLaws, bylaws, regulationsMinimalSlow
Short fact sheetsProduct sheets, fund fact sheets (1 to 3 pages)MediumMedium
Long structured contentBooks, manuals, multi-chapter reportsLow to mediumSlow
Fast and basicGeneral documents: prose, reports, articlesNoneFast

Not sure which to pick? Choose Automatic. It picks the approach on its own.


Automatic

The most sophisticated mode. A two-phase AI pipeline first analyses the document's full structure using a reasoning model, then assembles each chunk with additional context: cross-referenced content is embedded inline, and ambiguous pronouns (for example "he", "it", "they") are resolved to their actual referents. The result is chunks that are independently understandable: each one makes sense on its own without needing surrounding context.

Best for

  • Large reference books and encyclopaedias
  • Documents with dense cross-references (for example "see Article 3" or "as described in Chapter 7")
  • Academic or technical documents where out-of-context sentences lose their meaning

Settings

SettingDescription
AI modelThe AI that reads your content.
AI model for imagesThe AI that describes images. Only AI models that accept images are shown.
Excluded pagesPage types to leave out of the chunks. By default the system skips cover pages, table of contents, references, glossary, copyright, and acknowledgments. You can change this list.

Advanced settings (optional)

SettingDescription
Use full AI enrichmentWhen on, every section is processed through the AI enrichment pipeline, even sections that would normally be assembled programmatically. Produces richer context but increases processing time significantly.
Maximum sections for AI enrichmentIf the number of sections eligible for AI enrichment exceeds this value, the system falls back to fully programmatic assembly for all sections. Leave it empty to remove the cap.
Minimum section sizeMinimum number of tokens per section. Smaller sections are merged with adjacent ones. 100 tokens is about 75 words.
Maximum section sizeMaximum number of tokens per section. Larger sections are split at semantic boundaries.
Start pageFirst page to process. Leave blank to start from page 1.
Finish pageLast page to process. Leave blank to process to the end.
Repeated pagesNumber of pages repeated between adjacent processing segments when the document is too long for the AI to read at once. Same as in Long structured content.
Document type hintOptional description of the document type (for example "educational textbook", "regulatory filing", "product manual"). Helps the AI understand context. Leave blank for auto-detection.

A dedicated parser built specifically for legal documents. It extracts each article individually (number, title, legal text, notes, and cross-references) and converts each article directly into one chunk. The article text is preserved verbatim; nothing is rewritten or summarised.

Best for

  • Laws, government regulations, bylaws
  • Compliance documents, legal codes
  • Any document where the exact wording of each article must be preserved

Settings

SettingDescription
AI modelThis mode sends the whole document file to the AI, so only AI models that accept documents (PDF and TXT) are shown.

Short fact sheets

Processes the document one page at a time. Each page, including its layout, images, and tables, is sent to an AI model that decides the chunk boundaries, writes the content in clean markdown, and extracts key metadata (product name, product type, document type, version).

Best for

  • Fund fact sheets, product brochures, one-pagers
  • Short documents of 1 to 3 pages with mixed text, tables, and charts
  • Documents where preserving the visual layout and chart context matters

Settings

SettingDescription
AI modelThe AI that reads your content.
AI model for imagesThe AI that describes images.

Long structured content

Detects the document's chapter and section structure using AI, then creates one chunk per section. Each chunk is titled with the full path of headings (for example Chapter 1 › Section 1.2 › Subsection 1.2.3). Sections that are too small are automatically merged with their neighbours; sections that are too large are split at semantic boundaries.

Best for

  • Books, technical manuals, training materials
  • Any document with clear chapters, sections, and subsections
  • Documents where preserving heading structure in search results matters

Settings

SettingDescription
AI modelThe AI that reads your content and detects the structure. A more capable model may detect structure more accurately on complex documents.
Use summarizationWhen on, the system adds a brief AI summary to each parent section (for example a chapter summary derived from its subsections). Improves context for high-level queries but increases processing time and cost.

Advanced settings (optional)

SettingDescription
Repeated pagesNumber of pages repeated between adjacent processing segments when the document is too long to analyse in one pass. Helps the AI detect section boundaries that span segment edges. Default: 2.
Keep small sections separateWhen on, small sections are not merged with their neighbours and are kept exactly as the AI detected them.
Minimum section sizeSections with fewer tokens than this value are merged with an adjacent section. Applies only when Keep small sections separate is off. 100 tokens is about 75 words.
Maximum section sizeLimits how large a section can get. Larger sections are split.
Table as plain textSame as in Fast and basic.
Skip image analysisSame as in Fast and basic.

Fast and basic

The simplest and most reliable mode. The document is split at natural sentence boundaries into evenly sized chunks. Each chunk repeats a little of the previous one so context is not lost at the edges. It needs no AI to detect structure, so it is fast and low cost, but the result is simple.

Best for

  • General-purpose documents where structure does not matter much
  • Reports, articles, FAQs, knowledge base files

Settings

SettingDescription
Section sizeMaximum number of tokens per chunk. Measured in tokens: 100 tokens is about 75 words. Larger values produce fewer, longer chunks. Default: 500.
Repeated content (%)Percentage of the previous chunk that is repeated at the start of the next chunk. Higher values preserve more context across boundaries. Range: 1 to 80%. Default: 20%.
Start pageFirst page to process. Leave blank to start from page 1.
Finish pageLast page to process. Leave blank to process to the end.

Advanced settings (optional)

SettingDescription
Table as plain textWhen on, tables are treated as plain text inside regular chunks. When off, tables get dedicated extraction, which is recommended only for documents with many complex tables.
Skip image analysisWhen on, images are ignored. When off, an AI model describes each meaningful image and includes the description.
AI model for imagesThe AI that describes images.

Add several documents

You can add more than one document in one go. In the File card, choose or drop several files. We recommend adding up to 5 at a time for easier management.

  • The File card turns into a list with one row per file. Each row has its own Title and Author, filled in for you from the file name and from the author you pick first. Use Author for all above the list to set the same author on every row.
  • Details becomes Details for all: the permissions and the processing mode apply to every file. A code is made for each document, and the cover stays the default.
  • A file with a type that is not allowed is Skipped, with the reason. The others go on.
  • All files start at once. Each row shows its upload status. A row that fails can be tried again with Retry. When the batch ends, a summary reads, for example, "3 uploaded, 1 failed, 1 skipped", and Done takes you to the list.
  • Processing continues in the background. Follow it in the list, where each document shows Processing and then Active.

Tip: to upload documents automatically from your own system (for example a DMS or a nightly export job) instead of by hand, use the Document Integration. Documents added through the API appear on this page too.


Deactivating, activating, and deleting a document

An Active document can be deactivated to stop the agent from using it, without deleting it. You can activate it again at any time.

Deactivate a document

  1. Open the document's detail page.
  2. Click Deactivate in the top-right action bar and confirm.
  3. The status changes to Inactive. The agent no longer uses this document. The action bar now offers Activate, Retrain, and Delete.

Change a document's details

The form fields, including Author, can only be changed while the document is Inactive. Deactivate it, edit the fields, click Save, then activate it again. The Citations page uses this to give SOP-FIN-007 its proper author.

Activate a document

  1. Open the detail page of an Inactive document.
  2. Click Activate in the top-right action bar and confirm.
  3. The status returns to Active and the agent can use the document again.

Retrain a document

On an Inactive document, Retrain opens the upload form again so you can reprocess the document, for example with a different processing mode. All existing chunks are replaced.

Delete a document

  1. Open the detail page of an Inactive document.
  2. Click Delete in the top-right action bar and confirm.
  3. The document stays in the list with a Deleted badge. The agent can no longer use it. To remove it from the list completely, open it and click Purge document, then type the document title to confirm.

To delete a document that is still Active, deactivate it first.


Check the result

  1. On the Documents page, the card for SOP-FIN-007 shows Active and 2 of 2 active chunks. A document that is still Processing cannot be used yet, and a Failed one needs to be retried or uploaded again.
  2. In the preview panel, click the reload button and ask "Who has to approve a project worth $2.5 million?". Atlas should list Group Risk Office review, Regional Director, and CFO, and name SOP-FIN-007.

If the answer is not right:

  • Atlas still says it cannot find the SOP, right after the document became Active. Open the document, click Deactivate, then Activate, and ask again in a fresh conversation. This registers the chunks again.
  • Atlas answers from general knowledge. Check that Enable reference is on in Retrieval.
  • The answer is incomplete or wrong. Check the document's chunks in Chunks: does the chunk with the approval matrix exist, is its text correct, and is it active?

Next steps

  • Websites: add public web pages as knowledge (next step).
  • Citations: give SOP-FIN-007 the author Kirana Group Finance and show sources in answers.
  • Chunks: inspect the text units the agent retrieves from your documents.
  • Document Integration: upload and manage documents from your own systems.
  • Preview and Publish Changes: publish the Enable reference change so your live agent uses the SOP too.