kiyer commited on
Commit
b95eb79
1 Parent(s): 04b8b57

added option for reranking without HyDE

Browse files
Files changed (1) hide show
  1. app_gradio.py +4 -1
app_gradio.py CHANGED
@@ -500,6 +500,9 @@ def run_pathfinder(query, top_k, extra_keywords, toggles, prompt_type, rag_type,
500
  elif rag_type == "Semantic + HyDE":
501
  ec.hyde = True
502
  ec.rerank = False
 
 
 
503
  elif rag_type == "Semantic + HyDE + CoHERE":
504
  ec.hyde = True
505
  ec.rerank = True
@@ -557,7 +560,7 @@ def create_interface():
557
  keywords = gr.Textbox(label="Optional Keywords (comma-separated)",value="")
558
  toggles = gr.CheckboxGroup(["Keywords", "Time", "Citations"], label="Weight by", info="weighting retrieved papers",value=['Keywords'])
559
  prompt_type = gr.Radio(choices=["Single-paper", "Multi-paper", "Bibliometric", "Broad but nuanced"], label="Prompt Specialization", value='Multi-paper')
560
- rag_type = gr.Radio(choices=["Semantic Search", "Semantic + HyDE", "Semantic + HyDE + CoHERE"], label="RAG Method",value='Semantic + HyDE + CoHERE')
561
  with gr.Column(scale=2, min_width=300):
562
  img1 = gr.Image("local_files/pathfinder_logo.png")
563
  btn = gr.Button("Run pfdr!")
 
500
  elif rag_type == "Semantic + HyDE":
501
  ec.hyde = True
502
  ec.rerank = False
503
+ elif rag_type == "Semantic + CoHERE":
504
+ ec.hyde = False
505
+ ec.rerank = True
506
  elif rag_type == "Semantic + HyDE + CoHERE":
507
  ec.hyde = True
508
  ec.rerank = True
 
560
  keywords = gr.Textbox(label="Optional Keywords (comma-separated)",value="")
561
  toggles = gr.CheckboxGroup(["Keywords", "Time", "Citations"], label="Weight by", info="weighting retrieved papers",value=['Keywords'])
562
  prompt_type = gr.Radio(choices=["Single-paper", "Multi-paper", "Bibliometric", "Broad but nuanced"], label="Prompt Specialization", value='Multi-paper')
563
+ rag_type = gr.Radio(choices=["Semantic Search", "Semantic + HyDE", "Semantic + CoHERE", "Semantic + HyDE + CoHERE"], label="RAG Method",value='Semantic + HyDE + CoHERE')
564
  with gr.Column(scale=2, min_width=300):
565
  img1 = gr.Image("local_files/pathfinder_logo.png")
566
  btn = gr.Button("Run pfdr!")