Phoenix21 commited on
Commit
d13742d
·
verified ·
1 Parent(s): 8788b70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -12
app.py CHANGED
@@ -81,23 +81,33 @@ def analyze_world_model(model_name, dataset_key, num_samples=25):
81
  # **State S{cluster_id} [Label]**: [One sentence explanation of the shared logic/context].
82
  # """
83
  prompt = f"""
84
- Act as a Mechanistic Interpretability Researcher. You are analyzing latent cluster S{cluster_id} from the '{dataset_key}' dataset.
 
85
 
86
- The model has clustered these specific snippets because they represent a 'Coherent World State'—an internal map it uses to navigate the data.
 
87
 
88
- ### DATASET SNIPPETS:
89
  {context_payload}
90
 
91
- ### YOUR TASK:
92
- 1. **Newtonian Logic**: Identify the underlying 'Law' or 'Invariant' here. Why does the model treat these as functionally identical? (e.g., 'The model has a dedicated state for tracking chronological advancement').
93
- 2. **Dataset Attributes**: Pinpoint the specific text features (keywords, syntax, or formatting) that act as 'Sensors' to trigger this state.
94
- 3. **Functional Role**: Explain how this state helps the model predict the next token. (e.g., 'Being in this state restricts the search space to numerical dates or phase-related verbs').
95
 
96
- ### RESPONSE FORMAT (Markdown):
97
- **State S{cluster_id} [Structural Label]**
98
- - **Internal World Model**: [Explanation of the logic]
99
- - **Dataset Sensor**: [Key attributes found in the text]
100
- - **Predictive Function**: [How it aids next-token prediction]
 
 
 
 
 
 
 
 
 
101
  """
102
 
103
  try:
 
81
  # **State S{cluster_id} [Label]**: [One sentence explanation of the shared logic/context].
82
  # """
83
  prompt = f"""
84
+ Act as a Mechanistic Interpretability Researcher. You are decoding the latent 'Newtonian' world model
85
+ within a Transformer for the '{dataset_key}' dataset.
86
 
87
+ You are analyzing Cluster S{cluster_id}. This cluster represents a specific 'Equivalence Class' where
88
+ the model treats different sequences as functionally identical.
89
 
90
+ ### RAW DATASET SNIPPETS FOR CLUSTER S{cluster_id}:
91
  {context_payload}
92
 
93
+ ### YOUR MANDATORY TASK:
94
+ Provide a comprehensive, high-fidelity analysis for THIS CLUSTER ALONE. You must deliver the same
95
+ level of depth as seen in previous successful state interpretations.
 
96
 
97
+ ### REQUIRED OUTPUT FORMAT:
98
+ **State S{cluster_id} [Structural State Label]**
99
+
100
+ - **Internal World Model**: Explain the CORE 'Law' or 'Invariant' here. What logical map has the model activated?
101
+ Describe how this state interconnects lore, timelines, or mechanics into a single 'Coherent World State'.
102
+
103
+ - **Dataset Sensor**: List the specific 'Triggers' that push the model into this state.
104
+ Identify: (1) Proper Nouns/Identifiers, (2) Domain-Specific Terminology, (3) Syntax Patterns (e.g., lists, headers).
105
+
106
+ - **Predictive Function**: Explain how being in this state constrains the model's future.
107
+ What next-tokens are now 'Biased' or 'Anticipated'? How does this state filter out irrelevant topics?
108
+
109
+ ---
110
+ (Ensure your response is dense, professional, and strictly follows the bolded sections above.)
111
  """
112
 
113
  try: