Closed francis closed 1 year ago
@jaigouk - one issue - if you do not force rebuild the search index, it does not work on followup calls. There must be something wrong with the save or reload functions.
I will try to simulate the situation within spec/boxcars/vector_search_spec.rb and try to add a new context
context 'multiple calls' do
it 'returns results with the same instace' do
# first call
first_result = vector_search.call(
query: query,
count: 1
)
# second call
second_query = 'What is the first step to do when there is a harassment?'
second_result = vector_search.call(
query: second_query,
count: 1
)
require 'debug'; debugger
end
end
end
update: I checked the result and I think there is a bug. I will create a fix PR for hnswlib search. I will start working into this https://github.com/jaigouk/boxcars/pull/2 and open a PR in this repo when it is ready.
Now that we have VectorSearch, we can use that output get have an LLM figure out the desired answer.