-
Notifications
You must be signed in to change notification settings - Fork 8
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
Adds hyde prompts for Ask ChatGPT command #23
Conversation
const nearestVectors = this.vectorStore.getNearestVectors(embeddingResponse, 8, this.settings.relevanceThreshold) | ||
conversation.push(hydeMessage) | ||
const hydeResponse = await this.openAIHandler.createChatCompletion(conversation) | ||
if (!hydeResponse || hydeResponse.choices.length === 0 || !hydeResponse.choices[0].message) { |
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.
Improvement idea: instead of failing here, let's degrade and just search based on your search without the hyde. Does that make sense? Shouldn't be this PR.
I could imagine completions being unavailable but embeddings being fine, would be nice if we could recover and still serve limited functionality.
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.
Good idea! I agree. We should make this degrade to simple embeddings search. (Though in your example if completions was completely down the user wouldn't be successfully asking GPT any questions either.)
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.
true this would only apply to semantic search
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.
LGTM, some nits but overall like it this should be a good improvement
https://arxiv.org/pdf/2212.10496.pdf
When you ask chatgpt a question, now we: