How to set dimension of tongyi embedding model ? #564

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

Originally created by @chenly15 on GitHub (Aug 15, 2025).

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 Dify issues & Dify Official Plugins, 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

1.7.0

Plugin version

0.0.38

Cloud or Self Hosted

Self Hosted (Source)

Questions

Image https://bailian.console.aliyun.com/?apiKey=1&tab=api#/api/?type=model&url=2712515

The dimension is a adjustable parameters for embedding models of tongyi series. How to set dimension adaptively in dify while using RAG?

✔️ Error log

No response

Originally created by @chenly15 on GitHub (Aug 15, 2025). ### 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 [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/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 1.7.0 ### Plugin version 0.0.38 ### Cloud or Self Hosted Self Hosted (Source) ### Questions <img width="1239" height="509" alt="Image" src="https://github.com/user-attachments/assets/e71d00c2-6f68-4985-9940-19a9ee158ca0" /> https://bailian.console.aliyun.com/?apiKey=1&tab=api#/api/?type=model&url=2712515 The dimension is a adjustable parameters for embedding models of tongyi series. How to set dimension adaptively in dify while using RAG? ### ✔️ Error log _No response_
yindo added the bugquestion labels 2026-02-16 10:19:45 -05:00
yindo closed this issue 2026-02-16 10:19:45 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 15, 2025):

Dify does not currently support fully adaptive embedding dimension settings for Tongyi models in RAG workflows. Instead, you need to manually select the embedding dimension that matches both your chosen Tongyi embedding model and your vector database configuration.

Recent updates in the dify-official-plugins repository added dynamic parameter loading and model-specific options for text embedding models, including Tongyi. This means you should now see relevant parameters (like dimension) exposed in the plugin configuration UI or YAML files, allowing you to set the dimension explicitly when configuring your embedding model. These changes also include validation to ensure the dimension matches the model and vector DB requirements. See the details in this PR.

To set the dimension:

  • When adding or configuring a Tongyi embedding model in Dify, look for a dropdown or input field labeled "dimension" in the plugin configuration UI or in the relevant YAML config (such as bedrock.yaml). Select the dimension that matches your model and vector DB.
  • There is no automatic adaptation; you must manually ensure the dimension is compatible.

If you need to change the dimension later, update the configuration and re-index your data to match the new embedding size.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 15, 2025): <!-- Answer --> Dify does not currently support fully adaptive embedding dimension settings for Tongyi models in RAG workflows. Instead, you need to manually select the embedding dimension that matches both your chosen Tongyi embedding model and your vector database configuration. Recent updates in the dify-official-plugins repository added dynamic parameter loading and model-specific options for text embedding models, including Tongyi. This means you should now see relevant parameters (like dimension) exposed in the plugin configuration UI or YAML files, allowing you to set the dimension explicitly when configuring your embedding model. These changes also include validation to ensure the dimension matches the model and vector DB requirements. See the details in [this PR](https://github.com/langgenius/dify-official-plugins/pull/1422). To set the dimension: - When adding or configuring a Tongyi embedding model in Dify, look for a dropdown or input field labeled "dimension" in the plugin configuration UI or in the relevant YAML config (such as `bedrock.yaml`). Select the dimension that matches your model and vector DB. - There is no automatic adaptation; you must manually ensure the dimension is compatible. If you need to change the dimension later, update the configuration and re-index your data to match the new embedding size. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/0cc91227-ebbc-4b53-a809-13e7bc0322a1?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/0cc91227-ebbc-4b53-a809-13e7bc0322a1?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/0cc91227-ebbc-4b53-a809-13e7bc0322a1?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/0cc91227-ebbc-4b53-a809-13e7bc0322a1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/0cc91227-ebbc-4b53-a809-13e7bc0322a1?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/0cc91227-ebbc-4b53-a809-13e7bc0322a1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/0cc91227-ebbc-4b53-a809-13e7bc0322a1?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/1519)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#564