Skip to main content

Knowledge base segments

A segment is a topic or category assigned to a source document in the knowledge base. Use segments to divide the knowledge base into logical sections and restrict access to information.

A source can belong to one or more segments, or none at all.

Examples of segments:

  • By target audience: “Individuals”, “Legal entities”, “Partners”, “Technical specialists”.
  • By products and services: “Lending”, “Investments”.
  • By processes: “Procurement”, “Quality control”.

Create segments

Specify segment names when uploading files or configuring integrations. You don’t need to register segments in advance — you can use any custom name.

To change segments after uploading sources:

  1. Go to the Sources section in your knowledge base project.
  2. Select the sources and click Segments.
  3. Enter the new set of segments. This will overwrite the previous set.

When segments are changed in the integration settings, the new set is applied to all sources from that integration — both existing and future.

Search within segments

You can define the search scope when querying the knowledge base, either via the API or in the test dialogue. The scope can include specific segments as well as unsegmented sources.

Two search modes are available in the project settings:

  • Strict: searches only the specified scope. If no relevant information is found, the system will report there is no data.

  • Expandable (selected by default): if no chunks are found in the scope, the search runs across the whole knowledge base.

    Expandable search details

    The system may find chunks within the scope that have low relevance. Since at least one chunk was found, the search won’t expand to the entire knowledge base, which can result in an incomplete or inaccurate answer.

    To improve search quality in such cases, enable re-ranking. This feature assesses the relevance of the retrieved chunks. If the reranker filters them all out as irrelevant, the system will then trigger a search across the entire knowledge base.

Evaluate response quality

To assess response quality by individual knowledge base segments, add the Segments column to the test set. If answering a question requires searching within specific segments, list them separated by commas. To search sources that are not in any segment, specify include_without_segments. To search the entire knowledge base, leave the field blank.

Example value: Quality control,include_without_segments.