Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompt Variables issue #5908

Open
zabih1 opened this issue Jan 24, 2025 · 1 comment
Open

Prompt Variables issue #5908

zabih1 opened this issue Jan 24, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@zabih1
Copy link

zabih1 commented Jan 24, 2025

I have multiple variables in my prompt, including:

skill
skill_track
objective
difficulty

When I pass the values of these variables through the chat input component, and later attach the chat output component, the structure of the prompt gets distorted. The result is a poorly formatted and unstructured prompt.

This is the architecture

Image

This is the prompt:

Image

I pass the input text through the chat component in this way:

Image

Is there any issue in my workflow or something else?

@zabih1 zabih1 changed the title Prompt Variable issue Prompt Variables issue Jan 24, 2025
Copy link

dosubot bot commented Jan 24, 2025

The distortion in your prompt structure when passing variables through the chat input component could be due to several common issues related to variable handling in Langflow:

  1. Invalid Characters: Ensure that your variable names do not contain invalid characters such as spaces, commas, periods, colons, semicolons, exclamation marks, question marks, slashes, backslashes, parentheses, and brackets. These characters are removed during processing, which can alter the structure of your prompt [1].

  2. Variables Starting with Numbers: Make sure none of your variable names start with a number, as this can lead to issues with variable recognition and formatting [1].

  3. Empty Variables: Check that none of your variables are empty strings, as this can cause problems in the prompt structure [1].

  4. JSON-like Variables: If your variables resemble JSON (e.g., enclosed in {{ and }}), ensure they are properly formatted to be recognized correctly [1].

Review your variable names and values to ensure they adhere to these constraints. If the issue persists, consider using Langflow's debugging and logging functionality to trace the flow of data and identify where the distortion occurs [2][3].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the bug Something isn't working label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant