Skip to content

Instantly share code, notes, and snippets.

@hweller1
Created May 22, 2025 23:48
Show Gist options
  • Select an option

  • Save hweller1/e89a329ef2016635ef7a0c3da75b57fc to your computer and use it in GitHub Desktop.

Select an option

Save hweller1/e89a329ef2016635ef7a0c3da75b57fc to your computer and use it in GitHub Desktop.
Example view definition for truncating MRL vectors
db.createView(
"512_embeddings",
"wikipedia-22-12-en 2",
[
{
$addFields: {
"512_embedding": { $slice: ["$embedding", 512] }
}
}
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment