-
Notifications
You must be signed in to change notification settings - Fork 298
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
add rules to promptmixing #421
Closed
Closed
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3de97b9
add rules to promptmixing
abeatrix c392971
add create
abeatrix 12aef4f
fix array structure
abeatrix 28d9fb8
update prompt
abeatrix fc23b33
fix test
abeatrix 7aae30a
woops
abeatrix 1aedb1d
add rules to languagePromptMixin prompt
abeatrix 504900a
second thought, add rules to output text instead
abeatrix 457a3a2
update prompt
abeatrix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am unsure about this. I have seen the agent take prompts like "Provide full workable code as code snippets" and other input which doesn't require code generation, and have it "force it" by generating weird code, or complaining about not being able to generate code.
Re: don't make assumptions or fabricate information, my anecdotal experience is that it's usually more reliable to tell it what to do. For example, for improved explain-code, I have been asking it to write down facts and then reference those facts when it summarizes.
Re: "Think step-by-step" Anthropic recommends that has the agent ask to think step-by-step, and then the human says "OK."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reference for the Anthropic step-by-step recommendation: https://docs.anthropic.com/claude/docs/ask-claude-to-think-step-by-step
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dominiccooney The transcript before the
naming as Cody
shows the differences after adding theProvide full workable code when applicable
rule (which i later changed toProvide full workable code as code snippets
). Will make an update to be more specific.Something I'm trying to understand: if we are already adding the same rules at the start of the conversation, why reiterating the same rules would be a problem when those are (almost) the same rules we want Cody to follow initially?
IMO adding the basic rules (e.g. asking it not to make stuff up) that apply to most questions would help the chat experience overall, as it sets the standard/fallback for each response. Plus they can be easily overwritten by user input.
For Example, right now we have the
Reply as Cody
rule (which is already included in the stable release), and you can ask Cody to:Reply as Rick from Rick and Morty and tell me how to create a button in react
.Now Cody will now reply as
Rick
:(An uneducated guess) it seems to me if we ever want Cody to ignore the "rules", we just need to be more specific in the prompts we build for each use case? Am I misunderstanding how this works? :think:
What are your thoughts on this?
I was trying to shorten the example provided by Anthropic
Answer the following question only if you know the answer or can make a well-informed guess; otherwise tell me you don't know it.
😆 I guess theAnswer only if certain or tell me you don't know.
should be enough lol ?