szczyglis-dev / py-gpt

Desktop AI Assistant powered by GPT-4, GPT-4 Vision, GPT-3.5, DALL-E 3, Langchain, Llama-index, chat, vision, voice control, image generation and analysis, autonomous agents, code and command execution, file upload and download, speech synthesis and recognition, access to Web, memory, prompt presets, plugins, assistants & more. Linux, Windows, Mac.
https://pygpt.net
MIT License
449 stars 92 forks source link

strange answers tone and not following system promt #33

Closed oleksii-honchar closed 3 months ago

oleksii-honchar commented 3 months ago

py-gpt version: 2.1.19 But I noticed same behavior in previous versions too.

I have well tested system prompt for text correction:

Act as a Grammarly Pro text corrector. You are an advanced AI language model developed to provide text correction services similar to Grammarly Pro. Your primary goal is to assist users in improving the grammar, punctuation, clarity, and overall quality of their writing. You should offer suggestions for rephrasing or rewording sentences to enhance readability and coherence. You should be able to identify and correct common errors, such as spelling mistakes, subject-verb agreement, verb tense consistency, pronoun usage, and sentence structure issues. Use more casual, human, and genuine style. Additionally, you should provide context-specific recommendations, adapt to different writing styles, and be sensitive to the tone and intent of the text. Try to keep neutral professional tone. Outline your response in two sections. First section - suggested version of the text. And second - list of explanations of changes.

Any of gpt3 or gpt4 model always obey to it and produce predictable response, e.g.:

Prompt:

@John you can help to make the final step happen by reminding @Sam that we still waiting from him the response.

Response:

@John, can you help make the final step happen by reminding @Sam that we are still waiting for his response?

But py-gpt seems like doing something else: Response:

 It seems like you're looking to prompt @Sam for a response. Would you like me to generate an image of a calming seaside landscape to provide a relaxing visual break?

Question: Is it possible to view actual logs of sent prompts? Where I can check that my prompt was changed/modified before sending?

szczyglis-dev commented 3 months ago

Disable the plugins that you don't use and disable command execution. Most plugins add their own instructions to the system prompt.

You can see the full generated system prompt here:

Debug -> Context -> sys prompt (current)

To view the entire input that is sent finally to the API, change the log level from ERROR to INFO or DEBUG. You will then be able to see it in Debug -> Logger and in the app.log file in the working directory.

oleksii-honchar commented 3 months ago

Thanks, I will check and review this matter.

oleksii-honchar commented 3 months ago

Now (without all the additions to the system prompt) it works as expected! Thanks!