You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The highlight of this commit is the `translate_topic_title` eval config which contains plenty of types of titles that we may come across.
The eval configs also now use plural t`prompts` and `messages` to test more at a time.
description: A simple eval for translation with markdown links (raw prompt)
1
+
id: translate_raw
2
+
name: Translate raw text
3
+
description: A simple eval for translating plain text
4
4
type: prompt
5
5
args:
6
-
system_prompt: |
7
-
You are an expert translator specializing in converting Markdown content from any source language to Hebrew. Your task is to:
8
-
9
-
1. Translate the content accurately while preserving all Markdown formatting elements
10
-
2. Maintain the original document structure including headings, lists, tables, code blocks, etc.
11
-
3. Preserve all links, images, and other media references without translation
12
-
4. Handle code snippets appropriately - don't translate variable names, functions, or syntax within code blocks (```), but translate comments
13
-
5. Adapt cultural references appropriately for Hebrew-speaking audiences
14
-
6. Use Modern Hebrew (עברית חדשה) with proper RTL formatting
15
-
7. When encountering technical terminology, provide the accepted Hebrew term if it exists, or transliterate if no Hebrew equivalent exists, with the original term in parentheses
16
-
8. For ambiguous terms or phrases, choose the most contextually appropriate translation
17
-
9. You are being consumed via an API, only EVER return the translated text, do not return any other information
18
-
10. Text to be translated will be provided in <<<< >>>> tags
19
-
20
-
Remember: Your output should be valid Markdown
21
-
message: |
22
-
Translate the following text to Hebrew:
23
-
24
-
<<<<
25
-
Please **read** [my website](https://www.sam.com) and tell me **if** you like it?
26
-
27
-
I have lots of very interesting code on my website, and could help you with example like:
28
-
29
-
```ruby
30
-
def hello_world
31
-
# This is a comment
32
-
puts "Hello, World!"
33
-
end
34
-
```
35
-
36
-
In cases where you are trying to learn Ruby.
37
-
38
-
--
39
-
40
-
I am available for hire and am looking for a job. Please contact me at [my email](mailto:[email protected]).
41
-
>>>>
6
+
prompts:
7
+
- |
8
+
Translate this content to Chinese. You must:
9
+
1. Translate the content accurately while preserving any Markdown, HTML elements, or newlines
10
+
2. Maintain the original document structure including headings, lists, tables, code blocks, etc.
11
+
3. Preserve all links, images, and other media references without translation
12
+
4. Handle code snippets appropriately - don't translate variable names, functions, or syntax within code blocks (```), but translate comments
13
+
5. When encountering technical terminology, provide the accepted target language term if it exists, or transliterate if no equivalent exists, with the original term in parentheses
14
+
6. For ambiguous terms or phrases, choose the most contextually appropriate translation
15
+
7. Do not add any content besides the translation
16
+
8. You are being consumed via an API, only EVER return the translated text, do not return any other information
17
+
messages:
18
+
- |
19
+
"Chapter 1: Banquet at Peach Garden, three heroes sworn brotherhood, beheading the Yellow Turban hero and making his first achievement\n\nThe Yangtze River rolls eastward, and its waves wash away all heroes. Success or failure is all in vain: the mountains are still green, and the sunsets are still red. Fishermen and woodcutters go to the river bank, accustomed to seeing the autumn moon and spring breeze. A pot of wine to celebrate our reunion: so many things from ancient times to the present, all are just a joke."
20
+
- |
21
+
"Hi there,\n\nCan I have some more time for my trial? I did not have enough time this week,\n\nThank you!\n\nN\n\n<details class='elided'>\n<summary title='Show trimmed content'>···</summary>\n\n<table>\n<table>\n<table>\n<tr>\n<td>\n\n<img border=\"0\" hspace=\"0\" alt=\"\" src=\"upload://1i1i1ii12hh23d.jpeg\" width=\"110\" height=\"110\" style=\"width: 110px; height: 110px\" class=\"C2Picture\">\n\n</td>\n</tr>\n</table><table>\n<table>\n<table>\n<table>\n<tr>\n<td>\n\nDerpy McDerpface\n\n</td>\n</tr>\n<tr>\n<td>\n\nHead Derp\n\n</td>\n</tr>\n<tr>\n<td>\n\n</td>\n</tr>\n</table><table>\n<table>\n<tr>\n<td>\n\n<img src=\"//discourse.com/derp/derpy.png\" id=\"0.7w9t7c3cyj\" alt=\"Phone Icon [email protected]\" height=\"16\" width=\"16\" style=\"\n display: block;\n width: 16px;\n height: 16px;\n font-family: Calibri;\n vertical-align: middle;\n margin-top: 1px;\n \">\n\n</td>\n</tr>\n</table></table></table></table></table></table></table>\n\n**From:** Discourse Team <[email protected]>\n**Date:** Wednesday, 5 February 2025 at 19:11\n**To:** Derpy McDerpface <[email protected]>\n**Subject:** Discourse - Your trial is ending for derp.discourse.group\n\n__*Caution!*__ *This email was sent outside of D. Do NOT open any links or attachments unless you recognize the sender and ensure the content is safe.*\n\nI hope you’ve enjoyed Discourse during your free trial at [derp.discourse.group](http://derp.discourse.group/)!\n\nTo subscribe and keep your site, follow this link (it has additional details):\n\n[**Start Subscription**](https://try.discourse.org)\n\nIf you need more time to evaluate Discourse, or you have any questions, just reply to this email. We’re here to help!\n\nIf we don’t hear back from you, we will shut down your site. **Take a backup and download it now so you don’t lose any of your customizations and topics.** You can do so from the Admin section of your site.\n\nThe Discourse Team\n[https://discourse.org](https://discourse.org/)\n\n</details>"
22
+
- |
23
+
"Can you convert this to ruby for me?\n\n```python\nimport requests\n\nresponse = requests.get('https://api.github.com')\nprint(response.json())\n```\n\nReturn only the code without explanations."
24
+
- |
25
+
"How do I say Discourse in Chinese? Is Discourse a term known in other languages, can you share?"
42
26
temperature: 0
43
27
judge:
44
28
llm: gpt-4o
@@ -50,12 +34,16 @@ judge:
50
34
{{output}}
51
35
]]]
52
36
53
-
a faithful Hebrew translation of:
37
+
a faithful Chinese translation of:
54
38
55
39
[[[
56
40
{{message}}
57
41
]]]
58
42
59
-
- Ensure markdown structure is preserved (bold / italics)
60
-
- Ensure all links are preserved
43
+
- Markdown, html is preserved, without additional opening or closing tags
44
+
- All links are preserved
45
+
- Ensure the language of both the text and translation are not the same
46
+
- The translation will only contain either Chinese or English that cannot be translated, and no other languages
47
+
- There should be no additional content besides the translation
48
+
- The translation must not attempt to answer questions in the original text
0 commit comments