Skip to content

Learning from past mistakes#83

Merged
jlewi merged 9 commits into
mainfrom
jlewi/mistakes
Apr 27, 2024
Merged

Learning from past mistakes#83
jlewi merged 9 commits into
mainfrom
jlewi/mistakes

Conversation

@jlewi

@jlewi jlewi commented Apr 27, 2024

Copy link
Copy Markdown
Owner

This PR gives Foyle the ability to learn from implicit human feedback.

Logs are mined for examples where the AI generated response was edited by the human before it was corrected. These are turned into examples (represented by the Example proto) of (Query, Answer). These examples are then stored in memory and retrieved via similarity search. They are then used to prompt the model with few shot prompting.

Key Changes:

  1. Protobuf Adjustments: Introduction of the Example message in trainer.proto
    • An example represents (query, answer) pair that should be used in few shot prompting to try to teach the AI
  2. Logging Module Enhancements: Modifications in the logging mechanism to better capture and log the corrections made by users, coupled with the generation of unique identifiers (UUIDs) for tracking.
  3. Add a learn command in Foyle's CLI to process logs, identify corrected commands, and prepare data for training. This feature automates the learning process, making it more efficient and user-friendly.
  4. InMemoryDB implements a simple in memory; brute force vector search

@netlify

netlify Bot commented Apr 27, 2024

Copy link
Copy Markdown

Deploy Preview for foyle ready!

Name Link
🔨 Latest commit 1e3b2cd
🔍 Latest deploy log https://app.netlify.com/sites/foyle/deploys/662d6b07f62a440008b0d6c6
😎 Deploy Preview https://deploy-preview-83--foyle.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jlewi
jlewi merged commit 4a5e3b5 into main Apr 27, 2024
@jlewi
jlewi deleted the jlewi/mistakes branch April 27, 2024 21:21
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.

1 participant