@@ -175,23 +175,23 @@ def generate_ticket(neo4j_graph, llm_chain, input_question):
175175 # Ask LLM to generate new question in the same style
176176 questions_prompt = ""
177177 for i , question in enumerate (questions , start = 1 ):
178- questions_prompt += f"{ i } . { question [0 ]} \n "
179- questions_prompt += f"{ question [1 ]} \n \n "
178+ questions_prompt += f"{ i } . \n { question [0 ]} \n ---- \n \n "
179+ questions_prompt += f"{ question [1 ][: 150 ] } \n \n "
180180 questions_prompt += "----\n \n "
181181
182182 gen_system_template = f"""
183183 You're an expert in formulating high quality questions.
184- Can you formulate a question in the same style, detail and tone as the following example questions?
184+ Formulate a question in the same style and tone as the following example questions.
185185 { questions_prompt }
186186 ---
187187
188188 Don't make anything up, only use information in the following question.
189189 Return a title for the question, and the question post itself.
190190
191- Return example :
191+ Return format template :
192192 ---
193- Title: How do I use the Neo4j Python driver?
194- Question: I'm trying to connect to Neo4j using the Python driver, but I'm getting an error.
193+ Title: This is a new title
194+ Question: This is a new question
195195 ---
196196 """
197197 # we need jinja2 since the questions themselves contain curly braces
@@ -203,7 +203,7 @@ def generate_ticket(neo4j_graph, llm_chain, input_question):
203203 system_prompt ,
204204 SystemMessagePromptTemplate .from_template (
205205 """
206- Respond in the following format or you will be unplugged.
206+ Respond in the following template format or you will be unplugged.
207207 ---
208208 Title: New title
209209 Question: New question
0 commit comments