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

Update extract_score_and_reasons to work across providers #732

Merged
merged 9 commits into from
Jan 2, 2024

Conversation

joshreini1
Copy link
Contributor

@joshreini1 joshreini1 commented Dec 27, 2023

Update structured extraction and COT prompting for better results across providers e.g. Bedrock, Ollama

Fixes: #716 and open email with amazon team, possibly: #609

@piotrm0
Copy link
Contributor

piotrm0 commented Dec 28, 2023

I think the more structured messages should be preferable if available so I'm not sure about just using prompts always.

@joshreini1 joshreini1 changed the title always use prompt instead of messages Update extract_score_and_reasons to work across providers Jan 2, 2024
@joshreini1
Copy link
Contributor Author

I think the more structured messages should be preferable if available so I'm not sure about just using prompts always.

Good point - updated to use prompt only for bedrock.

import json

body = json.dumps({"inputText": prompt})
body = json.dumps({"inputText": prompt, "textGenerationConfig": {
"maxTokenCount": 4096,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a task to make these parameters configurable in a future PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshreini1 approved but see this note.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a TODO for this

@joshreini1 joshreini1 merged commit b8d9303 into main Jan 2, 2024
5 checks passed
sfc-gh-dhuang pushed a commit that referenced this pull request Jun 28, 2024
* always use prompt instead of messages

* use messages in base

* use prompt in bedrock

* move score to top of cot template, request entire template be used

* remove dev

* add TODO
sfc-gh-chu pushed a commit that referenced this pull request Sep 25, 2024
* always use prompt instead of messages

* use messages in base

* use prompt in bedrock

* move score to top of cot template, request entire template be used

* remove dev

* add TODO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting While Running provider.summary_with_cot_reasons feedback with Bedrock as Provider
2 participants