-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add ‘dimensions’ parameter for OpenAIEmbedding #1041
base: main
Are you sure you want to change the base?
Conversation
Moreover, what bothers me is that after setting the |
Hi! Is this a revision of #1020 ? |
Hi @AlonsoGuevara , I'm following the progress of this PR, and the dimensions parameter for embeddings is a useful enhancement. I would like to have this feature in GraphRAG . Please let me know if there's anything I can do to assist in moving this forward. |
Description
This pull request introduces an dimensions option into the GraphRAG's embedding, allowing it to take a user-defined size of dimensions which won't affect current usage of default embedding dimensions.
Related Issues
None.
Proposed Changes
Modified the GraphRAG embedding code to accept a dimensions parameter, enabling users to customize its size.
Added relevant error checks to ensure the input dimensions value is within reasonable limits.
Checklist
Additional Notes
According to https://openai.com/index/new-embedding-models-and-api-updates/, the text-embedding-3-large has a default dimensions size of 3072, which is not suitable for everyone.
Noticing excessive embedding dimensions can lead to significant computational and storage overhead without yielding proportional performance improvements.
How to use
add
dimensions: <your dimensions>
in setting.yaml after initialize the project.add
dimensions: <your dimensions>
in OpenAIEmbedding(in graphrag_local_search.ipynb or global search )