Skip to content

Commit

Permalink
MMR with top k:5
Browse files Browse the repository at this point in the history
  • Loading branch information
heiko-braun committed Dec 12, 2023
1 parent 7b0d596 commit f2a34d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def configure_retriever(collection_name):
embeddings=OpenAIEmbeddings())

# top k and threshold settings see https://python.langchain.com/docs/modules/data_connection/retrievers/vectorstore
return qdrant.as_retriever(
search_type="similarity_score_threshold",
search_kwargs={"score_threshold": .5}
return qdrant.as_retriever(
search_type="mmr",
search_kwargs={"k": 5}
)

comp_ref_tool = create_retriever_tool(
Expand Down

0 comments on commit f2a34d6

Please sign in to comment.