Skip to content

Commit

Permalink
"Update MultiVectorRetriever to retrieve 2 similar documents instead …
Browse files Browse the repository at this point in the history
…of 1."
  • Loading branch information
buhe committed Feb 18, 2024
1 parent 8cc143b commit c8da24f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/LangChain/retriever/MultiVectorRetriever.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class MultiVectorRetriever: BaseRetriever {
}

public override func _get_relevant_documents(query: String) async throws -> [Document] {
let sub_docs = await self.vectorstore.similaritySearch(query: query, k: 1)
let sub_docs = await self.vectorstore.similaritySearch(query: query, k: 2)
var ids: [String] = []
for d in sub_docs {
ids.append(d.metadata[self.id_key]!)
Expand Down

0 comments on commit c8da24f

Please sign in to comment.