You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"The array of documents to insert, matching the syntax of the document argument of db.collection.insertMany()"
19
+
"The array of documents to insert, matching the syntax of the document argument of db.collection.insertMany(). For fields that have vector search indexes, you can provide raw text strings that will be automatically converted to embeddings if embeddingParameters is provided."
"The embedding model and its parameters to use to generate embeddings for fields that have vector search indexes. When a field has a vector search index and contains a plain text string in the document, embeddings will be automatically generated from that string value. Note to LLM: If unsure which embedding model to use, ask the user before providing one."
16
25
),
17
26
};
18
27
publicoperationType: OperationType="create";
@@ -21,23 +30,34 @@ export class InsertManyTool extends MongoDBToolBase {
`Fields [${fieldPaths}] have vector search indexes and contain raw text strings. The embeddingParameters parameter is required to generate embeddings for these fields.`
* Accuracy tests for inserting documents with automatic vector embeddings generation.
15
+
* Tests scenarios where raw text strings are provided and automatically converted to embeddings.
16
+
*/
17
+
describeAccuracyTests(
18
+
[
19
+
{
20
+
prompt: "Insert a document into 'mflix.movies' collection with title 'The Matrix' and a plotSummary field with the text 'A computer hacker learns about the true nature of his reality'. Use the plot summary to generate the 'plotEmbeddings' field using the voyage-3 model.",
21
+
expectedToolCalls: [
22
+
{
23
+
toolName: "insert-many",
24
+
parameters: {
25
+
database: "mflix",
26
+
collection: "movies",
27
+
documents: [
28
+
{
29
+
title: "The Matrix",
30
+
plotSummary: "A computer hacker learns about the true nature of his reality",
31
+
plotEmbeddings: "A computer hacker learns about the true nature of his reality",
0 commit comments