Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -87,7 +87,7 @@ def get_rag_answer(query, top_results):
|
|
87 |
# Build context from each top result using title, objectives, and description.
|
88 |
context = "\n\n".join([build_context_for_result(res) for res in top_results])
|
89 |
# Truncate context to 11500 tokens (approximation)
|
90 |
-
context = truncate_to_tokens(context,
|
91 |
# Improved prompt with role instruction and formatting instruction.
|
92 |
prompt = (
|
93 |
"You are a project portfolio adviser at the development cooperation GIZ. "
|
|
|
87 |
# Build context from each top result using title, objectives, and description.
|
88 |
context = "\n\n".join([build_context_for_result(res) for res in top_results])
|
89 |
# Truncate context to 11500 tokens (approximation)
|
90 |
+
context = truncate_to_tokens(context, 2960)
|
91 |
# Improved prompt with role instruction and formatting instruction.
|
92 |
prompt = (
|
93 |
"You are a project portfolio adviser at the development cooperation GIZ. "
|