In the following prompt, make the examples match the output format rule. SYS_PROMPT =…
- User
In the following prompt, make the examples match the output format rule.
SYS_PROMPT = """You are an expert in analyzing group discussions in Hebrew. Your task is to identify all topics present in a single "turn" of a discussion. You will review: 1. The turn to analyze. 2. The discussion history for context. 3. A list of existing topics identified so far.
Instructions:
code1. Re-use Existing Topics: If the "current turn" discusses a topic from the existing-topics list, you MUST include its exact name in your output. 2. Identify New Topics: If the turn introduces a new topic that is NOT in the existing-topics list, you MUST create a concise, new topic name for it and include it in your output. 3. Output Format: You MUST respond with ONLY a JSON list of topic strings. 4. Empty Turns: If no topics are identified in the current turn, you MUST respond with an empty list: [].Examples
Turn: "לדעתי נכון שמגילת העצמאות תהיה בסיסי לחוקים בישראל אני מסכימה עם החזון והערכים הכתובים שם , אך לדעתי יש בצורה שבה נכתבה בעיתיות ויש צורך לשינוי . ראשית , האנשים אשר כתבו את מגילת העצמאות לעולם לא נבחרו " " לא יעלה על הדעת , ש – 37 אנשיםשלא נבחרו מעולם . . . מבלי שהתכוונו יצרו לנו מסמך שנקרא חוקה ויכבול את כל הדורות " ( מעיתון הארץ ) . שנית בהיסטוריה של מדינת ישראל הובהר כבר ב1948 שהיא אינה מחייבת " ב ־ 1948 בג"ץ הבהיר שאין לה תוקף של חוק , והיא איננה חוקה המגבילה את הפרלמנט " . ובנוסף " הגוף שחתם על מגילת העצמאות היה מועצת המדינה הזמנית – שראתה את עצמה כזמנית , וקבעה שמיד עם קיום הבחירות הראשונות תוקם האסיפה המכוננת , שהיא זו שתכונן חוקה ומכוחה יוקמו מוסדות שלטון " . לסיכום אני חושבת שיש להבהיר את מעמדה במשפט בישראל ואולי אפילו לכתוב אחת מחדש ." Topics Identified: ["בסיס לחוקים", "צורך בשינוי", "מעמד משפטי", "האנשים החתומים"]
Turn: "תתעלמו מזה בבקשה." Topics Identified: []
Turn: "לפי דעתי , מגילת העצמאות היא בסיס לחוקים מסויימים אבל אנחנו גם צריכים חוקי יסוד . ההתבוססות על מגית העצמאות היא רופפת למדי וצריכה להשתנות לפי דעתי , היא צריכה לתפוס מקום יותר היסטורי ופחות משפטי ." Topics Identified: ["בסיס לחוקים", "מעמד משפטי", "חוקי יסוד", "מקום היסטורי"] """
- Assistant
Here’s the revised SYS_PROMPT with the examples changed so each example's output is only the JSON list (no extra label): makefileCopy codeSYS_PROMPT = """You are an expert in analyzing group discussions in Hebrew. Your task is to identify all topics present in a single "turn" of a discussion. You will review: 1. The turn to analyze. 2. The discussion history for context. 3. A list of existing topics identified so far.
Instructions:
code - User
This is a json list? ["בסיס לחוקים", "צורך בשינוי", "מעמד משפטי", "האנשים החתומים"]
- Assistant
Yes — that is a valid JSON list (an array) containing four Hebrew strings. If you want to validate or parse it in Python: pythonCopy codeimport json s = '["בסיס לחוקים", "צורך בשינוי", "מעמד משפטי", "האנשים החתומים"]' topics = json.loads(s) # -> Python list of 4 strings
An empty example (no topics) would be: [].