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
Update Embeddings.ipynb to show output_dimenstionality
parameter.
#82
base: main
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
…onality to 10 for simpler print statement
@@ -35,18 +35,34 @@ | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line #12. output_dimensionality=10)
It sounds like this change is to add this parameter but it's hidden in this code snippet comparing task types without explanation.
Maybe add a section after this block with a short note? e.g.:
## Truncating embeddings The text-embedding-004 model also supports lower embedding dimensions. Specify output_dimensionality to truncate the output. ` result1 = genai.embed_content( model="models/text-embedding-004", content="Hello world) result2 = genai.embed_content( model="models/text-embedding-004", content="Hello world", output_dimensionality=10) (len(result1), len(result2)) `
Can we talk about the relationship between the index and specificity? It'd be great to add a statement like "When using text-embedding-004
, each dimension adds diminishing value so truncating may be effective in constrained environments ." - but I haven't verified if this is true.
Reply via ReviewNB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markmcd I haven't verified it either but I think it would be a great add! @MarkDaoust what do you think?
@@ -35,18 +35,34 @@ | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(That way you wouldn't need the '... trimmed')
Thanks for the updates! I made a couple quick changes and committed an updated version of this notebook for an event today. (Sorry if that makes this PR out of sync, working quickly from a coffee shop), we can iterate and refine from there. |
No description provided.