-
Notifications
You must be signed in to change notification settings - Fork 45
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
Added VectorRetriever class and remove GenAIClient #6
Conversation
3bab0dd
to
32b967d
Compare
20fb738
to
77817b1
Compare
37e5800
to
f42e040
Compare
f42e040
to
6e4b3fe
Compare
Another design consideration In the design we had context = vector_search.search(text=question) where context is text. Do we want this or do we want |
I would expect the nodes (or relationships) that has the matched embeddings on them to be returned. Or maybe I'm misunderstanding you here. |
Sorry I think didn't phrase carefully. Yes we now Perhaps I misunderstand what is meant by the context |
Returning the matches and their scores would be expected. So the word "context" in that sense is confusing, I agree. |
8e1e641
to
6d7d6ec
Compare
@@ -46,7 +46,7 @@ def create_vector_index( | |||
raise ValueError(f"Error for inputs to create_vector_index {str(e)}") | |||
|
|||
query = ( | |||
f"CREATE VECTOR INDEX $name IF NOT EXISTS FOR (n:{label}) ON n.{property} OPTIONS " | |||
f"CREATE VECTOR INDEX $name FOR (n:{label}) ON n.{property} OPTIONS " |
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.
I think this should fail explicitly if an index on n.property already exists
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.
On one side I agree because creating a new index also sets the dimension, and if this doesn't fail you might end up in a strange place where you're not really sure why things doesn't work.
On another side I disagree, because it's pretty annoying to have to try/catch for this in the code.
But overall, I agree, I think this should fail.
6d7d6ec
to
6c36546
Compare
6c36546
to
2670242
Compare
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.
This looks good now ⛵
Description
Added VectorRetriever class
Implementation
retrievers.py
test_retriever.py