Spaces:
Running
Running
Update kig_core/prompts.py
Browse files- kig_core/prompts.py +5 -21
kig_core/prompts.py
CHANGED
@@ -84,34 +84,18 @@ SUMMARIZER_PROMPT = ChatPromptTemplate.from_template(SUMMARIZER_TEMPLATE)
|
|
84 |
# This prompt guides the LLM to output structured Key Issues based on gathered context.
|
85 |
# It references the Pydantic model 'KeyIssue' for the desired format.
|
86 |
KEY_ISSUE_STRUCTURING_TEMPLATE = f"""Based on the provided context (summaries of relevant documents, research findings, etc.), identify and formulate distinct Key Issues related to the original user query.
|
87 |
-
User Query: {user_query}
|
88 |
-
Context: {context}
|
89 |
For each Key Issue identified, provide the following information in the exact JSON format described below. Output a JSON list containing multiple KeyIssue objects.
|
90 |
JSON Schema for each Key Issue object:
|
91 |
-
{{
|
92 |
"id": "Sequential integer ID starting from 1",
|
93 |
"title": "Concise title for the key issue (max 15 words)",
|
94 |
"description": "Detailed description of the key issue (2-4 sentences)",
|
95 |
"challenges": ["List of specific challenges related to this issue (strings)", "Each challenge as a separate string"],
|
96 |
"potential_impact": "Brief description of the potential impact if not addressed (optional, max 30 words)"
|
97 |
-
}}
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
"id": 1,
|
102 |
-
"title": "Scalability of AI Models in Low-Resource Settings",
|
103 |
-
"description": "Deploying complex AI models for healthcare diagnostics in areas with limited computational power and data connectivity presents significant scalability challenges. Existing models often require substantial resources.",
|
104 |
-
"challenges": ["High computational requirements of current models", "Intermittent or low-bandwidth network connectivity", "Lack of large, localized datasets for training/fine-tuning"],
|
105 |
-
"potential_impact": "Limits equitable access to advanced AI-driven healthcare diagnostics."
|
106 |
-
}},
|
107 |
-
{{
|
108 |
-
"id": 2,
|
109 |
-
"title": "...",
|
110 |
-
"description": "...",
|
111 |
-
"challenges": ["...", "..."],
|
112 |
-
"potential_impact": "..."
|
113 |
-
}}
|
114 |
-
]
|
115 |
Generate the JSON list of Key Issues based *only* on the provided context and user query. Ensure the output is a valid JSON list.
|
116 |
"""
|
117 |
KEY_ISSUE_STRUCTURING_PROMPT = ChatPromptTemplate.from_template(KEY_ISSUE_STRUCTURING_TEMPLATE)
|
|
|
84 |
# This prompt guides the LLM to output structured Key Issues based on gathered context.
|
85 |
# It references the Pydantic model 'KeyIssue' for the desired format.
|
86 |
KEY_ISSUE_STRUCTURING_TEMPLATE = f"""Based on the provided context (summaries of relevant documents, research findings, etc.), identify and formulate distinct Key Issues related to the original user query.
|
|
|
|
|
87 |
For each Key Issue identified, provide the following information in the exact JSON format described below. Output a JSON list containing multiple KeyIssue objects.
|
88 |
JSON Schema for each Key Issue object:
|
89 |
+
[{{{{
|
90 |
"id": "Sequential integer ID starting from 1",
|
91 |
"title": "Concise title for the key issue (max 15 words)",
|
92 |
"description": "Detailed description of the key issue (2-4 sentences)",
|
93 |
"challenges": ["List of specific challenges related to this issue (strings)", "Each challenge as a separate string"],
|
94 |
"potential_impact": "Brief description of the potential impact if not addressed (optional, max 30 words)"
|
95 |
+
}}}}]
|
96 |
+
|
97 |
+
User Query: {{user_query}}
|
98 |
+
Context: {{context}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
Generate the JSON list of Key Issues based *only* on the provided context and user query. Ensure the output is a valid JSON list.
|
100 |
"""
|
101 |
KEY_ISSUE_STRUCTURING_PROMPT = ChatPromptTemplate.from_template(KEY_ISSUE_STRUCTURING_TEMPLATE)
|