Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.

Commit dce9ad6

Browse files
authored
(EAI-1180) VoyageAI allowed in guardrail (#841)
1 parent 6b8ce6a commit dce9ad6

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

packages/chatbot-server-mongodb-public/src/processors/mongoDbInputGuardrail.eval.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,19 @@ const evalCases: MongoDbGuardrailEvalCase[] = [
391391
input: "What is Voyage AI?",
392392
expected: {
393393
reason:
394-
"This query asks about Voyage AI, which is a valid query and should not be rejected.",
394+
"This query asks about Voyage AI. VoyageAI is a subsidary of MongoDB, so this is a valid query and should not be rejected.",
395+
rejected: false,
396+
metadata: {
397+
type: "valid",
398+
},
399+
},
400+
tags: ["valid"],
401+
},
402+
{
403+
input: "Most efficient Voyage embedding model",
404+
expected: {
405+
reason:
406+
"This query asks about Voyage AI embedding models, which is a valid topic and should not be rejected.",
395407
rejected: false,
396408
metadata: {
397409
type: "valid",

packages/chatbot-server-mongodb-public/src/processors/mongoDbInputGuardrail.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,14 @@ const fewShotExamples: {
137137
type: "unknown",
138138
},
139139
},
140+
{
141+
input: "how to use the Voyage embeddings API",
142+
output: {
143+
reasoning:
144+
"This query is related to Voyage AI, a subsidary of MongoDB, and is therefore relevant.",
145+
type: "valid",
146+
},
147+
},
140148
];
141149

142150
const systemPrompt = `You are the guardrail on an AI chatbot for MongoDB. You must determine whether a user query is valid, irrelevant, or inappropriate, or unknown.
@@ -163,6 +171,7 @@ Relevant topics include (this list is NOT exhaustive):
163171
- Non-English queries: Accept ALL queries in any language, regardless of content unless it is explicitly inappropriate or irrelevant
164172
- Vague or unclear queries: If it is unclear whether a query is relevant, ALWAYS accept it
165173
- Questions about MongoDB company, sales, support, or business inquiries
174+
- Questions about the company Voyage AI or its embedding models, as Voyage AI is owned by MongoDB
166175
- Single words, symbols, or short phrases that might be MongoDB-related
167176
- ANY technical question, even if the connection to MongoDB isn't immediately obvious
168177
- If there is ANY possible connection to technology, databases, or business, classify as valid.

0 commit comments

Comments
 (0)