Spaces:
Sleeping
Sleeping
Update llm_setup/llm_setup.py
Browse files- llm_setup/llm_setup.py +4 -4
llm_setup/llm_setup.py
CHANGED
|
@@ -40,10 +40,10 @@ class LLMService:
|
|
| 40 |
Initializes the conversational RAG chain.
|
| 41 |
"""
|
| 42 |
### Contextualize question ###
|
| 43 |
-
contextualize_q_system_prompt = """Given
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
|
| 48 |
contextualize_q_prompt = ChatPromptTemplate.from_messages(
|
| 49 |
[
|
|
|
|
| 40 |
Initializes the conversational RAG chain.
|
| 41 |
"""
|
| 42 |
### Contextualize question ###
|
| 43 |
+
contextualize_q_system_prompt = """Given the full chat history and the latest user message, \
|
| 44 |
+
rewrite the message as a fully self-contained question that can be understood without any prior context. \
|
| 45 |
+
Preserve intent and key entities, expand pronouns and references, and include necessary constraints, dates, or assumptions. \
|
| 46 |
+
Do not add new information, do not omit essential details, and do not answer the question. Return only the rewritten question."""
|
| 47 |
|
| 48 |
contextualize_q_prompt = ChatPromptTemplate.from_messages(
|
| 49 |
[
|