Ritesh-hf commited on
Commit
d7e4f0a
·
verified ·
1 Parent(s): 291a319

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -86,12 +86,12 @@ retriever = PineconeHybridSearchRetriever(
86
  llm = ChatPerplexity(temperature=0, pplx_api_key=GROQ_API_KEY, model="llama-3.1-sonar-large-128k-chat", max_tokens=512, max_retries=2)
87
 
88
  # Initialize Reranker
89
- model = HuggingFaceCrossEncoder(model_name="BAAI/bge-reranker-base")
90
- compressor = CrossEncoderReranker(model=model, top_n=10)
91
 
92
- compression_retriever = ContextualCompressionRetriever(
93
- base_compressor=compressor, base_retriever=retriever
94
- )
95
  # from langchain.retrievers.document_compressors import LLMChainExtractor
96
 
97
  # compressor = LLMChainExtractor.from_llm(llm)
@@ -141,7 +141,7 @@ When responding to queries, follow these guidelines:
141
  3. Proper References:
142
  - Always use inline references with embedded source URLs.
143
  - The inline references should be in the format [1], [2], etc.
144
- - INCLUDE THE 'References' SECTION AT THE END OF RESPONSE.
145
 
146
  FOLLOW ALL THE GIVEN INSTRUCTIONS, FAILURE TO DO SO WILL RESULT IN THE TERMINATION OF THE CHAT.
147
 
 
86
  llm = ChatPerplexity(temperature=0, pplx_api_key=GROQ_API_KEY, model="llama-3.1-sonar-large-128k-chat", max_tokens=512, max_retries=2)
87
 
88
  # Initialize Reranker
89
+ # model = HuggingFaceCrossEncoder(model_name="BAAI/bge-reranker-base")
90
+ # compressor = CrossEncoderReranker(model=model, top_n=10)
91
 
92
+ # compression_retriever = ContextualCompressionRetriever(
93
+ # base_compressor=compressor, base_retriever=retriever
94
+ # )
95
  # from langchain.retrievers.document_compressors import LLMChainExtractor
96
 
97
  # compressor = LLMChainExtractor.from_llm(llm)
 
141
  3. Proper References:
142
  - Always use inline references with embedded source URLs.
143
  - The inline references should be in the format [1], [2], etc.
144
+ - INCLUDE THE 'References' SECTION WITH REFERENCES URLs AT THE END OF RESPONSE.
145
 
146
  FOLLOW ALL THE GIVEN INSTRUCTIONS, FAILURE TO DO SO WILL RESULT IN THE TERMINATION OF THE CHAT.
147