When customizing segmentation strategies for a knowledge base. Parameter settings: (maximum splitting length of 1000, overlap of 250). The beg large zh model deployed with xinference cannot split blocks according to the parameter settings (maximum bloc… #5286

Closed
opened 2026-02-21 18:10:16 -05:00 by yindo · 1 comment
Owner

Originally created by @dgy20122016 on GitHub (Aug 28, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.7

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When customizing segmentation strategies for a knowledge base. Parameter settings: (maximum splitting length of 1000, overlap of 250). The beg large zh model deployed with xinference cannot split blocks according to the parameter settings (maximum block of 544 characters), while Baichuan's vectorized model can (maximum block of 1000 characters). What is the reason for this?
1724898319518
33bd065eea3877e410b8e7d3a5a7445
9940a7f8f7b7fd7b2328a639f412978
Same document, same platform, same parameter settings, the one above defaults to using baichuan embedding text (API interface call); The following defaults to using the nomic embedded text deployed by oneself (locally deployed with ollama; beg-m3 deployed with xinference), beg-large-zh-1.5、nlp_gte_sentence-embedding_chinese-large)

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @dgy20122016 on GitHub (Aug 28, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.7 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When customizing segmentation strategies for a knowledge base. Parameter settings: (maximum splitting length of 1000, overlap of 250). The beg large zh model deployed with xinference cannot split blocks according to the parameter settings (maximum block of 544 characters), while Baichuan's vectorized model can (maximum block of 1000 characters). What is the reason for this? ![1724898319518](https://github.com/user-attachments/assets/19fd3f4f-5526-4b2a-8bb6-3a7dbd4fe11d) ![33bd065eea3877e410b8e7d3a5a7445](https://github.com/user-attachments/assets/34392713-9103-43d2-81ff-3e4d3d988bc0) ![9940a7f8f7b7fd7b2328a639f412978](https://github.com/user-attachments/assets/413355cc-15ab-46bb-90b6-55ee6b96197d) Same document, same platform, same parameter settings, the one above defaults to using baichuan embedding text (API interface call); The following defaults to using the nomic embedded text deployed by oneself (locally deployed with ollama; beg-m3 deployed with xinference), beg-large-zh-1.5、nlp_gte_sentence-embedding_chinese-large) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 18:10:16 -05:00
yindo closed this issue 2026-02-21 18:10:16 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 28, 2024):

@dgy20122016 Hello there! I'm here to help you squash bugs, answer questions, and even guide you on becoming a contributor. Let's tackle this issue together! 🤖

The reason the beg large zh model deployed with xinference cannot split blocks according to the parameter settings (maximum block of 544 characters) is due to its context_size being set to 512 characters, as specified in the configuration:

model: bge-large-zh
model_type: text-embedding
model_properties:
  context_size: 512
  max_chunks: 16

This configuration limits the model to a maximum context size of 512 characters. Although max_chunks is set to 16, the context size constraint of 512 characters prevents it from handling blocks of 544 characters in a single chunk [1][2].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Aug 28, 2024): <!-- Greeting --> @dgy20122016 Hello there! I'm here to help you squash bugs, answer questions, and even guide you on becoming a contributor. Let's tackle this issue together! 🤖 <!-- Answer --> The reason the beg large zh model deployed with xinference cannot split blocks according to the parameter settings (maximum block of 544 characters) is due to its `context_size` being set to 512 characters, as specified in the configuration: ```yaml model: bge-large-zh model_type: text-embedding model_properties: context_size: 512 max_chunks: 16 ``` This configuration limits the model to a maximum context size of 512 characters. Although `max_chunks` is set to 16, the context size constraint of 512 characters prevents it from handling blocks of 544 characters in a single chunk <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/siliconflow/text_embedding/bge-large-zh-v1.5.yaml)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/wenxin/text_embedding/bge-large-zh.yaml)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5286