Skip to content

[Bug]: the tips is wrong and misunderstanding for embedding model's max tokens #12792

@iamhehebaba

Description

@iamhehebaba

Self Checks

  • 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).
  • Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

RAGFlow workspace code commit ID

6be197c

RAGFlow image version

v0.22.1

Other environment information

Actual behavior

while adding an embedding model (for example, with Ollama as the model provider) to the system, the tips for "max tokens" is wrong and misunderstanding.

Current tips is: "This sets the maximum length of the model's output, measured in the number of tokens (words or pieces of words). Defaults to 512. If disabled, you lift the maximum token limit, allowing the model to determine the number of tokens in its responses."

But for an embedding model, the maxTokens in fact is to set the max tokens the model can accept and handle for INPUT(trunk to embed), not for OUTPUT. The purpose is to protect the embedding model: if the tokens of input trunks exceeds the maxTokens, then ragflow will truncate the input according to the maxTokens and discard the truncated part.

it's very confusing and misunderstanding!

Image

Expected behavior

see above description.

Steps to reproduce

homepage->profile->model provider->add new model->select ollama

Additional information

No response

Metadata

Metadata

Assignees

Labels

🐞 bugSomething isn't working, pull request that fix bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions