Segments and Semantics

Whether a knowledge base can answer accurately ultimately depends on two specific things: whether unstructured content has been divided into suitable retrieval units, and whether the business definitions for structured data have been clearly described. The former is intelligent segmentation, corresponding to the unstructured path in Data Content Management; the latter is semantic configuration, corresponding to the structured path. Both serve the same goal: enabling the system to truly understand your data rather than merely storing it. This is also why answers may remain inaccurate after the processing status shows “Completed”: segmentation and semantic configuration themselves require maintenance and are not one-time tasks completed upon ingestion.

This page has two parts:

  1. Intelligent segmentation: Retrieval units produced by parsing unstructured files (text, images, tables, transcripts, and so on).

  2. Semantic configuration: Ten types of semantic entries for structured tables, used to improve NL2SQL and data analysis comprehension.

Corresponding UI: the segment area in document details; Advanced Configuration · Semantic Configuration tab.


Intelligent Segmentation

A segment is the basic unit of retrieval and citation. After the system parses a file into segments, chats and agents retrieve relevant segments to construct answers.

Segment Quality and Answer Accuracy

When an answer is inaccurate, the problem may lie in segmentation rather than only in agent configuration. For example:

  • A complete rule is split too finely, causing conditions to be omitted

  • Unrelated paragraphs are merged, mixing retrieval results

  • Titles are separated from body text, removing context

  • Image OCR / descriptions are inaccurate

  • Table structures are recognized incorrectly

Segment Types

Common types in the UI:

Type

Description

Text

Body text excerpt

Image

Searchable fields including OCR and image descriptions

Table

Table structure / cell-related excerpt

Image and text

Mixed image and text content

Transcript

Transcribed audio or video content

Common Operations

Operation

Description

Search / filter / sort

Search by keyword; sort by original order or retrieval priority

Create segment

Add content that parsing missed but that needs to be retrievable

Edit segment

Modify body text, OCR, image descriptions, and so on

Delete segment

Remove content that should not be cited (this creates a new segment version; the historical version still shows the content from before deletion)

Enable / disable segment

Temporarily exclude a segment from retrieval

Generate initial segments

Generate initial segments when none exist

Re-embed

Rebuild the vector index after segment changes (subject to the UI)

Segment cards generally show the word count and retrieval count, helping identify frequently retrieved segments and segments that have never been retrieved over a long period.

Note Segments can be edited only in the currently active version. Segment changes are recorded in the version history described in Data Content Management. After making changes, validate them with real questions in Chat and Retrieval.

Key Points for Maintaining Image and Table Segments

Images: Whether OCR is accurate; whether the image description clearly explains the subject and context; whether irrelevant decorative images should be deleted. Tables: Whether headers are complete; whether row, column, and cell numbers / dates / statuses are correct; whether context is preserved together with the table.


Semantic Configuration

Semantic configuration captures field meanings, metric definitions, table relationships, and query experience known by business users as maintainable entries, helping the system perform data Q&A and NL2SQL more accurately.

Note Semantic configuration is only for structured data tables and is not used to retrieve content from ordinary documents, images, audio, or video. Configure data tables (or files) in the data sources first, and then add semantic entries.

Ten Types of Semantic Entries

Data tables contain only table names, field names, and data records; by themselves, they cannot express business concepts such as “sales revenue,” “valid orders,” or “this month.” These meanings, definitions, and query practices usually exist only in the minds of business users. Semantic configuration turns that experience into maintainable entries that help the system understand the data more accurately. The ten types below match the “Semantic Configuration” types in the product UI:

Type

Purpose

Dimension column

A field that can be used for categorization and filtering

Fact column

A numeric field that can be used for statistics and calculations

Business metric

A reusable statistical definition (including aggregate expressions and so on)

Table relationship

A JOIN relationship between multiple tables

Column preference

The preferred column for a business concept, or a column that should be deprecated

Named filter

A frequently used filter condition captured as a reusable rule

Standard Q&A

A frequently asked question + verified SQL

Term explanation

A definition and interpretation of a business term

Rule injection

A business rule injected during planning, SQL generation, execution, rendering, or another stage

SQL result set

Governed read-only SQL encapsulated as a reusable query capability

The list supports searching by Key and creating / editing / deleting entries. It can display associated tables, summaries, update times, and other information.

Configuration Recommendations

Scenario

Use first

Unclear metric definition

Business metric, term explanation

Multi-table analysis

Table relationship

Frequently used filter conditions

Named filter

The same type of question repeatedly fails

Standard Q&A

Ambiguous field / deprecated column

Column preference, dimension column / fact column descriptions

Need to reuse a stable query

SQL result set, rule injection

Use business language wherever possible rather than writing only technical field names. If the same concept has multiple names, document them together. Metric expressions should be executable (such as SUM(amount)) rather than only natural language such as “total sales revenue.”

Import, Export, and Validation

The semantic configuration toolbar supports:

Operation

Description

Import

Upload or paste JSON; this replaces all existing semantic entries in the knowledge base and cannot be undone

Export

Export the current semantic configuration

Validate

Check semantic configuration completeness and return whether it passes and the number of issues