Files changed (1) hide show
  1. retrieve.py +2 -2
retrieve.py CHANGED
@@ -22,13 +22,13 @@ def retrieve_documents_from_collection(query, api_key, qdrant_url, qdrant_api_ke
22
  embeddings_model = setup_openai_embeddings(api_key)
23
  qdrant_client = setup_qdrant_client(qdrant_url, qdrant_api_key)
24
  qdrant = Qdrant(client=qdrant_client, collection_name=collection_name, embeddings=embeddings_model)
25
- retriever = qdrant.as_retriever(search_kwargs={"k": 5})
26
  prompt = PromptTemplate(
27
  template="""
28
  # Your role
29
  You are a brilliant expert at understanding the intent of the questioner and the crux of the question, and providing the most optimal answer from the docs to the questioner's needs from the documents you are given.
30
  # Instruction
31
- Your task is to answer the question using the following pieces of retrieved context delimited by XML tags.
32
  <retrieved context>
33
  Retrieved Context:
34
  {context}
 
22
  embeddings_model = setup_openai_embeddings(api_key)
23
  qdrant_client = setup_qdrant_client(qdrant_url, qdrant_api_key)
24
  qdrant = Qdrant(client=qdrant_client, collection_name=collection_name, embeddings=embeddings_model)
25
+ retriever = qdrant.as_retriever(search_kwargs={"k": 10})
26
  prompt = PromptTemplate(
27
  template="""
28
  # Your role
29
  You are a brilliant expert at understanding the intent of the questioner and the crux of the question, and providing the most optimal answer from the docs to the questioner's needs from the documents you are given.
30
  # Instruction
31
+ Your task is to answer the question using the following pieces of retrieved context delimited by XML tags, and to answer in the same language as the question.
32
  <retrieved context>
33
  Retrieved Context:
34
  {context}