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

[RW-1022] Reduce jailbreaking #61

Merged
merged 9 commits into from
Jul 18, 2024
Merged

[RW-1022] Reduce jailbreaking #61

merged 9 commits into from
Jul 18, 2024

Conversation

orakili
Copy link
Contributor

@orakili orakili commented Jul 16, 2024

Refs: RW-1022

  • Add a new completion plugin of the AWS bedrock titan premier model
  • Add a new vector store plugin with flattened content to improve accuracy
  • Index automatic document description with its embedding to speed up answer generation when no relevant passage found
  • Add answer validation by comparing it with relevant passages
  • Add settings to set the various default answers + min similarity for answer validation and text splitting setting overrides for accuracy

Note: this is based off #60 which should be reviewed and merged first.

@orakili orakili requested a review from attiks July 16, 2024 07:34
Copy link

Monitor coverage for Drupal 10.2.x - PHP 8.3

Totals Coverage
Statements: 87.88% ( 116 / 132 )
Methods: 25% ( 2 / 8 )
Lines: 91.94% ( 114 / 124 )

Copy link

Monitor coverage for Drupal 10.3.x - PHP 8.3

Totals Coverage
Statements: 87.88% ( 116 / 132 )
Methods: 25% ( 2 / 8 )
Lines: 91.94% ( 114 / 124 )

Copy link

Monitor coverage for Drupal 10.3.x - PHP 8.2

Totals Coverage
Statements: 87.88% ( 116 / 132 )
Methods: 25% ( 2 / 8 )
Lines: 91.94% ( 114 / 124 )

Copy link

Monitor coverage for Drupal 10.2.x - PHP 8.2

Totals Coverage
Statements: 87.88% ( 116 / 132 )
Methods: 25% ( 2 / 8 )
Lines: 91.94% ( 114 / 124 )

Copy link
Collaborator

@attiks attiks left a comment

Choose a reason for hiding this comment

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

Nice!

public function validateAnswer(string $answer, array $passages, float $min_similarity = 1.35): bool {
// Skip directly if the model considered it was a prompt attack.
// @todo instead of that here, have the ::answer() method of the model
// throw an exception for example so we are not tied to the what the prompt
Copy link
Collaborator

Choose a reason for hiding this comment

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

Strange wording

@attiks attiks merged commit b62e034 into develop Jul 18, 2024
10 checks passed
@lazysoundsystem lazysoundsystem deleted the RW-1022 branch July 18, 2024 09:00
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.

2 participants