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

Lesson 04-monitoring offline-rag-evaluation #93

Open
buriihenry opened this issue Oct 17, 2024 · 0 comments
Open

Lesson 04-monitoring offline-rag-evaluation #93

buriihenry opened this issue Oct 17, 2024 · 0 comments

Comments

@buriihenry
Copy link

The code on the indexing where we are creating vector embeddings can be optimized beacused I realized when you run the notebook more than once it creates a duplicate "indexing" which creates an error:
We can introduce a code line to delete the index if it exits
Like this :

Delete the index if it exists

es_client.indices.delete(index=index_name, ignore_unavailable=True)
# Create the new index
es_client.indices.create(index=index_name, body=index_settings)
print(f"Index '{index_name}' created successfully.")
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

No branches or pull requests

1 participant