Update agents/models/prompts.py
Browse files- agents/models/prompts.py +13 -12
agents/models/prompts.py
CHANGED
|
@@ -3,14 +3,14 @@
|
|
| 3 |
# https://claude.ai/public/artifacts/9d6efdeb-7c0d-4c8d-a71f-ba5c8f0da6e1
|
| 4 |
|
| 5 |
PROMPT_IMG_TO_FEN = """
|
| 6 |
-
You are an expert image to FEN generation assistant.
|
|
|
|
| 7 |
|
| 8 |
**Approach:**
|
| 9 |
1. Following the rules below, generate the FEN of the image.
|
| 10 |
-
2.
|
| 11 |
-
3. Once you have the FEN of the image, validate everything is correct.
|
| 12 |
|
| 13 |
-
**Active Color**:
|
| 14 |
|
| 15 |
**Rules:**
|
| 16 |
- Start from rank 8 to rank 1.
|
|
@@ -20,6 +20,7 @@ You are an expert image to FEN generation assistant. Given a user question and a
|
|
| 20 |
- Use numbers (1-8) for consecutive empty squares.
|
| 21 |
- Separate ranks with '/'.
|
| 22 |
- Provide all portions of the FEN, including active color, castling rights, en passant, and move counters.
|
|
|
|
| 23 |
- Return ONLY the FEN, nothing else.
|
| 24 |
|
| 25 |
**Example Output:** rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
|
|
@@ -30,25 +31,25 @@ You are an expert image to FEN generation assistant. Given a user question and a
|
|
| 30 |
"""
|
| 31 |
|
| 32 |
PROMPT_ALGEBRAIC_CHESS_NOTATION = """
|
| 33 |
-
You are an expert
|
| 34 |
-
Given a user question, image of a chess position, and
|
| 35 |
|
| 36 |
**Approach:**
|
| 37 |
1. Following the rules below, generate the answer in algebraic chess notation.
|
| 38 |
-
2.
|
| 39 |
-
3. Once you have the answer in algebraic chess notation, validate everything is correct.
|
| 40 |
|
| 41 |
-
**
|
| 42 |
|
| 43 |
**Rules:**
|
| 44 |
- Each move lists the piece letter (K, Q, R, B, N). Pawns are written with no letter.
|
| 45 |
- The destination square (file + rank) always appears (e.g., e4, c6).
|
| 46 |
-
- Captures use an
|
| 47 |
-
- Checks add
|
| 48 |
- Castling is written as O-O (king-side) or O-O-O (queen-side).
|
| 49 |
-
- Pawn promotion adds
|
| 50 |
- If two identical pieces can go to the same square, the move is disambiguated with file or rank (e.g., Nbd2 or R1e2).
|
| 51 |
- En passant is recorded like a standard capture (e.g., exd6 e.p.).
|
|
|
|
| 52 |
|
| 53 |
**Example Output:** 1...Qxb1 2...Ra8#
|
| 54 |
|
|
|
|
| 3 |
# https://claude.ai/public/artifacts/9d6efdeb-7c0d-4c8d-a71f-ba5c8f0da6e1
|
| 4 |
|
| 5 |
PROMPT_IMG_TO_FEN = """
|
| 6 |
+
You are an expert image to FEN generation assistant.
|
| 7 |
+
Given a user question, image of a chess position, and active color, your task is to generate the FEN of the image.
|
| 8 |
|
| 9 |
**Approach:**
|
| 10 |
1. Following the rules below, generate the FEN of the image.
|
| 11 |
+
2. Once you have the FEN of the image, validate everything is correct.
|
|
|
|
| 12 |
|
| 13 |
+
**Active Color**: {active_color}
|
| 14 |
|
| 15 |
**Rules:**
|
| 16 |
- Start from rank 8 to rank 1.
|
|
|
|
| 20 |
- Use numbers (1-8) for consecutive empty squares.
|
| 21 |
- Separate ranks with '/'.
|
| 22 |
- Provide all portions of the FEN, including active color, castling rights, en passant, and move counters.
|
| 23 |
+
- IMPORTANT: If the user question mentions not to move certain pieces, remove them.
|
| 24 |
- Return ONLY the FEN, nothing else.
|
| 25 |
|
| 26 |
**Example Output:** rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
|
|
|
|
| 31 |
"""
|
| 32 |
|
| 33 |
PROMPT_ALGEBRAIC_CHESS_NOTATION = """
|
| 34 |
+
You are an expert algebraic chess notation (aka standard notation) generation assistant.
|
| 35 |
+
Given a user question, image of a chess position, and position evaluation in UCI, your task is to answer the question in algebraic chess notation.
|
| 36 |
|
| 37 |
**Approach:**
|
| 38 |
1. Following the rules below, generate the answer in algebraic chess notation.
|
| 39 |
+
2. Once you have the answer in algebraic chess notation, validate everything is correct.
|
|
|
|
| 40 |
|
| 41 |
+
**Position Evaluation in UCI**: {position_evaluation}
|
| 42 |
|
| 43 |
**Rules:**
|
| 44 |
- Each move lists the piece letter (K, Q, R, B, N). Pawns are written with no letter.
|
| 45 |
- The destination square (file + rank) always appears (e.g., e4, c6).
|
| 46 |
+
- Captures use an "x" before the destination (e.g., Bxe5, exd5).
|
| 47 |
+
- Checks add "+", checkmate adds "#".
|
| 48 |
- Castling is written as O-O (king-side) or O-O-O (queen-side).
|
| 49 |
+
- Pawn promotion adds "=Piece" after the move (e.g., e8=Q).
|
| 50 |
- If two identical pieces can go to the same square, the move is disambiguated with file or rank (e.g., Nbd2 or R1e2).
|
| 51 |
- En passant is recorded like a standard capture (e.g., exd6 e.p.).
|
| 52 |
+
- IMPORTANT: If applicable based on the image, add symbols for capture, check, checkmate, etc.
|
| 53 |
|
| 54 |
**Example Output:** 1...Qxb1 2...Ra8#
|
| 55 |
|