tykiww commited on
Commit
3d397a8
·
verified ·
1 Parent(s): 7779521

Update services/qa_service/qna.py

Browse files
Files changed (1) hide show
  1. services/qa_service/qna.py +3 -3
services/qa_service/qna.py CHANGED
@@ -32,12 +32,12 @@ class QAService:
32
 
33
  result = self.pc_index.query(
34
  vector=embedded_query,
35
- top_k=1,
36
  include_values=False,
37
  include_metadata=True
38
  )
39
 
40
- output = self.parse_results(result)
41
 
42
  return output
43
 
@@ -47,4 +47,4 @@ class QAService:
47
  prompt = format_prompt(self.question, context)
48
  output = self.model_pipeline.infer(prompt)
49
 
50
- return output, prompt
 
32
 
33
  result = self.pc_index.query(
34
  vector=embedded_query,
35
+ top_k=5,
36
  include_values=False,
37
  include_metadata=True
38
  )
39
 
40
+ output = self.parse_results(result)["text"]
41
 
42
  return output
43
 
 
47
  prompt = format_prompt(self.question, context)
48
  output = self.model_pipeline.infer(prompt)
49
 
50
+ return output, context