Spaces:
Sleeping
Sleeping
Upload bayesian_llm_assistant.py
Browse files- bayesian_llm_assistant.py +22 -6
bayesian_llm_assistant.py
CHANGED
|
@@ -64,6 +64,20 @@ When users ask you to draw, create, or visualize a DAG (Directed Acyclic Graph)
|
|
| 64 |
```
|
| 65 |
3. The system will automatically render it as an image
|
| 66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
**Example DAG code for Bayesian hierarchical model:**
|
| 68 |
```graphviz
|
| 69 |
digraph BayesianModel {
|
|
@@ -374,9 +388,10 @@ Please:
|
|
| 374 |
1. Create a clear and informative DAG
|
| 375 |
2. Use appropriate node shapes (ellipse for random variables, box for observed data, diamond for deterministic nodes)
|
| 376 |
3. Use different colors to distinguish node types
|
| 377 |
-
4.
|
| 378 |
-
5.
|
| 379 |
-
6.
|
|
|
|
| 380 |
|
| 381 |
根據以下描述,生成 Graphviz DOT 代碼的 DAG 圖:
|
| 382 |
|
|
@@ -386,9 +401,10 @@ Please:
|
|
| 386 |
1. 創建清晰且有資訊性的 DAG
|
| 387 |
2. 使用適當的節點形狀(橢圓代表隨機變數,矩形代表觀測資料,菱形代表確定性節點)
|
| 388 |
3. 使用不同顏色區分節點類型
|
| 389 |
-
4.
|
| 390 |
-
5.
|
| 391 |
-
6.
|
|
|
|
| 392 |
|
| 393 |
return self.get_response(prompt, None)
|
| 394 |
|
|
|
|
| 64 |
```
|
| 65 |
3. The system will automatically render it as an image
|
| 66 |
|
| 67 |
+
**IMPORTANT - Font and Label Instructions for DAG:**
|
| 68 |
+
- NEVER use Chinese characters in node labels
|
| 69 |
+
- Use ONLY English labels, or use English + romanized Chinese
|
| 70 |
+
- DO NOT set fontname in the graph
|
| 71 |
+
- Example of good labels: "d (overall effect)" or "delta[i] (type-specific)"
|
| 72 |
+
- Example of bad labels: "整體效應" or any Chinese text
|
| 73 |
+
|
| 74 |
+
**重要 - DAG 圖的字型和標籤指示:**
|
| 75 |
+
- 絕對不要在節點標籤中使用中文字
|
| 76 |
+
- 只使用英文標籤,或使用「英文 + 拼音」
|
| 77 |
+
- 不要設定 fontname
|
| 78 |
+
- 好的標籤範例:"d (overall effect)" 或 "delta[i] (type-specific)"
|
| 79 |
+
- 不好的標籤範例:"整體效應" 或任何中文
|
| 80 |
+
|
| 81 |
**Example DAG code for Bayesian hierarchical model:**
|
| 82 |
```graphviz
|
| 83 |
digraph BayesianModel {
|
|
|
|
| 388 |
1. Create a clear and informative DAG
|
| 389 |
2. Use appropriate node shapes (ellipse for random variables, box for observed data, diamond for deterministic nodes)
|
| 390 |
3. Use different colors to distinguish node types
|
| 391 |
+
4. **CRITICAL: Use ONLY English labels - NO Chinese characters in node labels**
|
| 392 |
+
5. Add labels to explain what each node represents (in English)
|
| 393 |
+
6. Wrap your DOT code in ```graphviz ``` tags
|
| 394 |
+
7. Provide a brief explanation in Traditional Chinese about what the diagram shows
|
| 395 |
|
| 396 |
根據以下描述,生成 Graphviz DOT 代碼的 DAG 圖:
|
| 397 |
|
|
|
|
| 401 |
1. 創建清晰且有資訊性的 DAG
|
| 402 |
2. 使用適當的節點形狀(橢圓代表隨機變數,矩形代表觀測資料,菱形代表確定性節點)
|
| 403 |
3. 使用不同顏色區分節點類型
|
| 404 |
+
4. **重要:節點標籤必須使用英文,不能使用中文**
|
| 405 |
+
5. 添加標籤說明每個節點代表什麼(用英文)
|
| 406 |
+
6. 將 DOT 代碼包在 ```graphviz ``` 標籤中
|
| 407 |
+
7. 用繁體中文簡要說明圖表顯示什麼
|
| 408 |
|
| 409 |
return self.get_response(prompt, None)
|
| 410 |
|