aws-amplify / amplify-backend

Home to all tools related to Amplify's code-first DX (Gen 2) for building fullstack apps on AWS
Apache License 2.0
185 stars 62 forks source link

Use different questions when retrying AI use cases. #2237

Closed sobolk closed 6 days ago

sobolk commented 6 days ago

Problem

It seems that retrying same question in the narrow time window makes model return pretty much same hallucination.

Changes

In attempt to solve this problem, and array of similar yet different questions is created and each retry attempt will use slightly different question. This should make LLM evaluate it differently, hoping that one of attempts yields satisfactory response.

Validation

PR checks

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

changeset-bot[bot] commented 6 days ago

🦋 Changeset detected

Latest commit: 10949be6ab82246870170039530421cb9722be97

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR