Skip to content
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

Upgrade/Change Weaviate Schema to Use text-embedding-3-small #297

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

davidgxue
Copy link
Collaborator

@davidgxue davidgxue commented Feb 13, 2024

Description

Technical Changes

  • Just schema.json -- this changes the vectorizer used during ingestion AND during the retrieval
    • on ingestion a new index is created if it doesn't exist before. During retrieval this index's vectorizer is used for vectorizing user query

Tests & Evaluation

Related Issues

closes #286
partially completes #295

@davidgxue davidgxue self-assigned this Feb 13, 2024
@davidgxue davidgxue marked this pull request as ready for review February 16, 2024 06:10
@davidgxue davidgxue added this to the 0.3.0 milestone Feb 16, 2024
Copy link
Collaborator

@sunank200 sunank200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love to know more about the test and evaluation for this change.

@davidgxue
Copy link
Collaborator Author

Evaluation is on hold as the cloud cluster (not local) is on an older version of Weaviate that does not support the new model. I am trying to get access to the remote weaviate cluster from IT. Will be blocked until then

Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: e3727ab
Status: ✅  Deploy successful!
Preview URL: https://af944af7.ask-astro.pages.dev
Branch Preview URL: https://upgrade-text-embedding-model.ask-astro.pages.dev

View logs

@davidgxue
Copy link
Collaborator Author

new_embed_model_comparison.csv
I upgraded the weaviate cluster version and ran some tests using the new embedding model. Very few questions out of this quick test question set had different links/documents retrieved. The vast majority of the documents retrieved had either the same links or links that are highly similar. The ones where there are changes, it made very small differences and generally saw improvement in document relevancy when it comes to retrieval. This is likely due to the fact that we use a hybrid search approach and also use a reranker and prompting an LLM to filter at the end, so changing the embedding model which is only one part of the retrieval process did not make a significant impact.

Since this new model generally performs better according to OpenAI's own metrics as well other researchers AND has significantly lower cost compared to the older V2 ada embedding model, I will go ahead and upgrade this into the newer version.

@davidgxue davidgxue merged commit 6fbe2d4 into main Feb 28, 2024
8 checks passed
@davidgxue davidgxue deleted the upgrade-text-embedding-model-to-v3 branch February 28, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Text Emebedding Model to text-embedding-3-small
3 participants