annikwag commited on
Commit
7708ce6
·
verified ·
1 Parent(s): c1dd9e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,12 +26,12 @@ WRITE_ACCESS_TOKEN = st.secrets["Llama_3_1"]
26
 
27
  def get_rag_answer(query, top_results):
28
  context = "\n\n".join([res.payload["page_content"] for res in top_results])
29
- max_context_chars = 13500
30
  if len(context) > max_context_chars:
31
  context = context[:max_context_chars]
32
  prompt = (
33
  "You are a project portfolio adviser at the development cooperation GIZ. "
34
- "Using the following context, answer the question precisely. "
35
  "Only output the final answer below, without repeating the context or question.\n\n"
36
  f"Context:\n{context}\n\n"
37
  f"Question: {query}\n\n"
 
26
 
27
  def get_rag_answer(query, top_results):
28
  context = "\n\n".join([res.payload["page_content"] for res in top_results])
29
+ max_context_chars = 23500
30
  if len(context) > max_context_chars:
31
  context = context[:max_context_chars]
32
  prompt = (
33
  "You are a project portfolio adviser at the development cooperation GIZ. "
34
+ "Using the following context, answer the question in english precisely. "
35
  "Only output the final answer below, without repeating the context or question.\n\n"
36
  f"Context:\n{context}\n\n"
37
  f"Question: {query}\n\n"