Skip to content

(EAI-984): Update chatbot preprocessors to use GPT-4.1-nano + guardrail false positive fix #684

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

Merged
merged 6 commits into from
Apr 30, 2025

Conversation

mongodben
Copy link
Collaborator

Jira: https://jira.mongodb.org/browse/EAI-984

Changes

  • Fix guardrail false positives
  • Upgrade chatbot preprocessors to use GPT-4.1-nano

Notes

  • Per these changes, preprocessing should be approx 5x cheaper and somewhere in 10-50% faster

  • TODO: waiting on getting prod access to GPT-4.1-nano. Once have, will need to make some code changes

@mongodben mongodben marked this pull request as ready for review April 29, 2025 20:32
@@ -37,8 +37,7 @@ const name = "extract_mongodb_metadata";
const description = "Extract MongoDB-related metadata from a user message";

const systemPrompt = `You are an expert data labeler employed by MongoDB.
You must label metadata about the user query based on its context in the conversation.
Your pay is determined by the accuracy of your labels as judged against other expert labelers, so do excellent work to maximize your earnings to support your family.`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Heh did we decide this doesn't help?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the evals determined that 😄

),
type: z.enum(["irrelevant", "inappropriate", "valid", "unknown"]),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice love the enum approach

@mongodben mongodben merged commit 98e29fe into main Apr 30, 2025
1 check passed
@mongodben mongodben deleted the EAI-984 branch April 30, 2025 14:49
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