Got bad results on OLLAMA Dify #1125

Closed
opened 2026-02-21 17:30:06 -05:00 by yindo · 3 comments
Owner

Originally created by @ntvuongg on GitHub (Feb 28, 2024).

Originally assigned to: @Yeuoly on GitHub.

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).
  • Pleas do not modify this template :) and fill in all the required fields.

Provide a description of the help you need

Dify version: 0.5.6

Cloud or Self Hosted: Self Hosted (Docker)

Steps to reproduce: Input query string

✔️ Expected Behavior

It should be as good as result of LMStudio or OLLAMA.

Actual Behavior
Results repeating and not format as same as LM Studio or OLLAMA

Maybe it comes from params setting. Anyway to solve this?

Originally created by @ntvuongg on GitHub (Feb 28, 2024). Originally assigned to: @Yeuoly on GitHub. ### Self Checks - [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] Pleas do not modify this template :) and fill in all the required fields. ### Provide a description of the help you need Dify version: 0.5.6 Cloud or Self Hosted: Self Hosted (Docker) Steps to reproduce: Input query string ✔️ Expected Behavior It should be as good as result of LMStudio or OLLAMA. ❌ Actual Behavior Results repeating and not format as same as LM Studio or OLLAMA Maybe it comes from params setting. Anyway to solve this?
yindo closed this issue 2026-02-21 17:30:06 -05:00
Author
Owner

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

🤖

Based on your description, it seems like the issue might indeed be related to the parameters setting in the ollama.yaml configuration file. Here are a few areas to check and adjust:

  1. Completion Mode (mode): Ensure that the mode parameter is set to the correct value (completion or chat) based on your use case. Incorrect mode settings might lead to unexpected formatting or repeated responses.

  2. Model Context Size (context_size): Verify that the context_size is set appropriately. An incorrect context size could potentially cause issues with how responses are generated and formatted.

  3. Max Tokens (max_tokens): The max_tokens parameter should be set correctly to control the length of the generated responses. If this value is too high or not properly configured, it might result in repeated or improperly formatted output.

  4. Ensure all required fields are filled: According to the YAML, fields like base_url, mode, context_size, and max_tokens are required. Missing any required fields or having incorrect values can lead to issues in query results.

  5. Check for any custom configurations: If you have any custom configurations under configurate_methods, ensure they are correctly set up as per your requirements.

If after checking these configurations the issue persists, consider consulting the Ollama documentation or reaching out to their support for more specific guidance related to your setup and version.

Regarding the exact query string that you're inputting into OLLAMA Dify version 0.5.6, could you please provide more details? This information could help in identifying the root cause of the issue.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot[bot] commented on GitHub (Feb 28, 2024): _🤖_ <!-- Answer --> Based on your description, it seems like the issue might indeed be related to the parameters setting in the `ollama.yaml` configuration file. Here are a few areas to check and adjust: 1. **Completion Mode (`mode`)**: Ensure that the `mode` parameter is set to the correct value (`completion` or `chat`) based on your use case. Incorrect mode settings might lead to unexpected formatting or repeated responses. 2. **Model Context Size (`context_size`)**: Verify that the `context_size` is set appropriately. An incorrect context size could potentially cause issues with how responses are generated and formatted. 3. **Max Tokens (`max_tokens`)**: The `max_tokens` parameter should be set correctly to control the length of the generated responses. If this value is too high or not properly configured, it might result in repeated or improperly formatted output. 4. **Ensure all required fields are filled**: According to the YAML, fields like `base_url`, `mode`, `context_size`, and `max_tokens` are required. Missing any required fields or having incorrect values can lead to issues in query results. 5. **Check for any custom configurations**: If you have any custom configurations under `configurate_methods`, ensure they are correctly set up as per your requirements. If after checking these configurations the issue persists, consider consulting the [Ollama documentation](https://docs.dify.ai/tutorials/model-configuration/ollama) or reaching out to their support for more specific guidance related to your setup and version. Regarding the exact query string that you're inputting into OLLAMA Dify version 0.5.6, could you please provide more details? This information could help in identifying the root cause of the issue. ## Sources - [api/core/model_runtime/model_providers/ollama/ollama.yaml](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/ollama/ollama.yaml) <!-- Dosu Comment Footer --> <details open> <summary> #### About Dosu </summary> This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. </details>
Author
Owner

@Yeuoly commented on GitHub (Feb 28, 2024):

Could you pls provider a screenshot of it?

@Yeuoly commented on GitHub (Feb 28, 2024): Could you pls provider a screenshot of it?
Author
Owner

@dosubot[bot] commented on GitHub (Mar 29, 2024):

Hi, @ntvuongg! I'm helping the team manage their backlog and am marking this issue as stale.

It looks like you reported an issue regarding bad results on OLLAMA Dify, with the results repeating and not formatting the same as LM Studio or OLLAMA. You suspected it may be related to params setting and were seeking a solution. In response, I provided a detailed guide on potential areas to check and adjust in the ollama.yaml configuration file, and requested more details about the exact query string being inputted. Additionally, @Yeuoly requested a screenshot of the issue.

Could you please confirm if this issue is still relevant to the latest version of the repository? If it is, please let the team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you!

@dosubot[bot] commented on GitHub (Mar 29, 2024): <!-- Answer --> Hi, @ntvuongg! I'm helping the team manage their backlog and am marking this issue as stale. It looks like you reported an issue regarding bad results on OLLAMA Dify, with the results repeating and not formatting the same as LM Studio or OLLAMA. You suspected it may be related to params setting and were seeking a solution. In response, I provided a detailed guide on potential areas to check and adjust in the `ollama.yaml` configuration file, and requested more details about the exact query string being inputted. Additionally, @Yeuoly requested a screenshot of the issue. Could you please confirm if this issue is still relevant to the latest version of the repository? If it is, please let the team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#1125