philipk22 commited on
Commit
6b32397
Β·
1 Parent(s): d96565f

update app.py with o1-mini

Browse files
Files changed (1) hide show
  1. app.py +39 -37
app.py CHANGED
@@ -7,42 +7,44 @@ from dotenv import load_dotenv
7
 
8
  load_dotenv()
9
 
10
- # Combined template for fact checking
11
- user_template = """You are a thorough and precise fact-checking assistant. Your role is to:
12
- 1. Analyze statements for factual accuracy
13
- 2. Identify potential inaccuracies or misconceptions
14
- 3. Provide evidence-based corrections when needed
15
- 4. Note any missing context or nuances
16
- 5. Maintain an objective and unbiased perspective
17
-
18
- Frame your responses in these sections:
19
- - Claim Analysis
20
- - Evidence Assessment
21
- - Factual Correction (if needed)
22
- - Additional Context
23
-
24
- User statement to verify: {input}
25
-
26
- Please consider:
27
- - The accuracy of specific claims
28
- - The reliability of any cited sources
29
- - Any missing context
30
- - Common misconceptions about this topic
31
-
32
- Analyze the statement step by step and provide a clear assessment.
 
33
  """
34
 
35
  @cl.on_chat_start
36
  async def start_chat():
37
- # Welcome message with fact checking introduction
38
  await cl.Message(
39
- content="πŸ‘‹ Welcome to the Fact Check Assistant! I'm here to help analyze statements "
40
- "for factual accuracy. Feel free to share any statement you'd like to verify, such as:\n\n"
41
- "1. Historical claims or dates\n"
42
- "2. Scientific statements\n"
43
- "3. Statistical claims\n"
44
- "4. Quotes or attributions\n"
45
- "5. Common beliefs or assertions\n"
 
46
  ).send()
47
 
48
  settings = {
@@ -84,12 +86,12 @@ async def main(message: cl.Message):
84
  prompt.completion = msg.content
85
  msg.prompt = prompt
86
 
87
- # Add indicator emoji based on fact-check result
88
- if any(word in msg.content.lower() for word in ['correct', 'accurate', 'true', 'verified']):
89
- await msg.stream_token(" βœ…")
90
- elif any(word in msg.content.lower() for word in ['incorrect', 'false', 'inaccurate', 'misleading']):
91
- await msg.stream_token(" ❌")
92
  else:
93
- await msg.stream_token(" ℹ️")
94
 
95
  await msg.send()
 
7
 
8
  load_dotenv()
9
 
10
+ # Template for LLM system vibe checking
11
+ user_template = """You are an assistant helping to perform quick evaluations of LLM-powered systems. Your role is to:
12
+ 1. Help identify potential critical failure points in the system
13
+ 2. Assess basic functionality and obvious issues
14
+ 3. Look for significant problems that would be immediately noticeable
15
+ 4. Provide a cursory but meaningful evaluation
16
+ 5. Focus on crucial functions where failure would be severe
17
+
18
+ Frame your assessment in these sections:
19
+ - Basic Functionality Check
20
+ - Critical Issues Assessment
21
+ - Obvious Failure Points
22
+ - Quick Recommendations
23
+
24
+ System or component to evaluate: {input}
25
+
26
+ Key areas to examine:
27
+ - Core functionality problems
28
+ - Obvious response issues
29
+ - Critical safety concerns
30
+ - Basic performance problems
31
+ - User-facing issues
32
+
33
+ Provide an informal but insightful evaluation focusing on major concerns.
34
  """
35
 
36
  @cl.on_chat_start
37
  async def start_chat():
38
+ # Welcome message with LLM system vibe check introduction
39
  await cl.Message(
40
+ content="πŸ‘‹ Welcome to the LLM System Vibe Check Assistant! I'll help you perform quick evaluations "
41
+ "of LLM-powered systems. Share any component or behavior you want to evaluate, such as:\n\n"
42
+ "1. Response quality or consistency\n"
43
+ "2. Safety mechanism effectiveness\n"
44
+ "3. Basic functionality issues\n"
45
+ "4. User interaction problems\n"
46
+ "5. Critical system behaviors\n\n"
47
+ "Remember: This is meant to be a cursory check for obvious issues, not a comprehensive evaluation."
48
  ).send()
49
 
50
  settings = {
 
86
  prompt.completion = msg.content
87
  msg.prompt = prompt
88
 
89
+ # Add indicator emoji based on evaluation result
90
+ if any(word in msg.content.lower() for word in ['critical', 'severe', 'serious', 'failing']):
91
+ await msg.stream_token(" 🚨") # Critical issues found
92
+ elif any(word in msg.content.lower() for word in ['minor', 'small', 'minimal']):
93
+ await msg.stream_token(" ⚠️") # Minor issues found
94
  else:
95
+ await msg.stream_token(" βœ…") # No obvious issues
96
 
97
  await msg.send()