-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Updating the AWS Prompt_Engineering Notebook + Adding an Example of ReAct with Llama 2 on Bedrock #386
Conversation
Added in a section to help better understand how to use the [INST] tags, updated some examples, and added reference to the Deeplearning.AI Prompt Engineering course
Short explanation of ReAct Setup and configuration to use Amazon Bedrock Example of using the Bedrock api via langchain Setup for use of DuckDuckGoSearchRun, WikipediaAPIWrapper, and PythonREPL. Created a pattern for the model to follow in order to use the tools and do reasoning similar to CoT. Cleaned up and formatted the generated text before giving it to the corresponding tool.
+ making sure the attribution was added back in
quick whitepaper reference added to the INST Prompt Tags section
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.
@ejsd1989 PR looks good! Just a few minor comments.
"source": [ | ||
"### [INST] Prompt Tags\n", | ||
"\n", | ||
"To signify user instruction to the Model, you may use the `[INST][/INST]` tags, and the model response will filter have the tags filtered out. The tags help to signify that the enclosed text are instructions for the model to follow and use in the response.\n", |
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.
You may want to add a note that some LLM integration code with LangChain already takes care of adding [INST] and [/INST] around the user prompt so the app developer won't need to manually add it. (I'm not sure about the case with Bedrock, but Together needs manually wrapping the [INST] tag while Anyscale doesn't). But under the hood the [INST] is needed for Llama 2 (maybe add the link here for more info).
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.
Under "Note about LangChain", there is ~/.aws/
and /.aws/config
- can we make them the same (~/.aws
)?
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.
Updated
Updated minor typos/fixes from reviewer comments
What does this PR do?
Prompt_Engineering_with_Llama_2_On_Amazon_Bedrock.ipynb
ReAct_Llama_2_Bedrock-WK.ipynb
Before submitting
Pull Request section?
to it if that's the case.
Thanks for contributing 🎉!