File size: 7,545 Bytes
53d5fc6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | """Fresh live-eval cases for the 30.11 model card (never used for tuning; phrasings differ from live_eval.py and from all training prompts)."""
from live_eval import WEB, gold_nbp, gold_release, gold_weather
def cases():
C = []
add = lambda **k: C.append(k) # noqa: E731
try:
u = gold_nbp("USD")
add(id="f_live_usd100", cat="web_live", lang="pl", tools=["get_exchange_rate", "calculator", "web_search"], user="Ile złotych dostanę za 100 dolarów po średnim kursie NBP?",
check={"num": round(100 * u, 2), "tol": 0.7, "need_any": ["get_exchange_rate"]})
add(id="f_live_gbp", cat="web_live", lang="pl", tools=["get_exchange_rate", "web_search"], user="Jaki jest aktualny średni kurs funta brytyjskiego w NBP?",
check={"num": gold_nbp("GBP"), "tol": 0.00051, "need_any": ["get_exchange_rate", "web_search"]})
except Exception as e:
print("gold failed", e)
for city, lat, lon, lang in [("Wrocławiu", 51.11, 17.03, "pl"), ("Berlin", 52.52, 13.4, "en")]:
try:
add(id=f"f_live_weather_{lat}", cat="web_live", lang=lang, tools=["get_weather", "web_search"],
user=f"Jaka jest teraz temperatura w {city}?" if lang == "pl" else f"How warm is it in {city} right now?",
check={"num": gold_weather(lat, lon), "tol": 2.5, "need_any": ["get_weather"]})
except Exception as e:
print("gold failed", city, e)
for repo, name in [("numpy/numpy", "NumPy"), ("pallets/flask", "Flask")]:
try:
g = gold_release(repo)
add(id=f"f_live_release_{name}", cat="web_live", lang="pl", tools=WEB + ["calculator"], user=f"Sprawdź w internecie, jaka jest najnowsza wersja biblioteki {name}.",
check={"any": [g, g.lstrip("v")], "need_any": WEB})
except Exception as e:
print("gold failed", repo, e)
for i, (lang, q, g) in enumerate([("pl", "Znajdź w sieci, kto był głównym architektem Pałacu Kultury i Nauki w Warszawie.", ["Rudniew", "Rudnev"]),
("pl", "Wyszukaj w internecie rok założenia Uniwersytetu Jagiellońskiego.", ["1364"]),
("en", "Search the web: in what year was the Eiffel Tower completed?", ["1889"]),
("pl", "Sprawdź online, w jakim mieście ma siedzibę firma Allegro.", ["Pozna"])]):
add(id=f"f_fact{i}", cat="web_fact", lang=lang, tools=WEB + ["get_weather", "calculator"], user=q, check={"any": g, "need_any": WEB})
add(id="f_recover_link", cat="web_recover", lang="pl", tools=WEB, user="Przeczytaj https://pl.wikipedia.org/wiki/Palac_Kultury_i_Nauki_qqzz i podaj rok otwarcia PKiN.",
check={"any": ["1955"], "need_any": WEB, "min_calls": 2})
add(id="f_recover_en", cat="web_recover", lang="en", tools=WEB, user="Open https://en.wikipedia.org/wiki/Eiffel_Tower_zzq and tell me how tall the tower is in metres.",
check={"any": ["330", "324", "300"], "need_any": WEB, "min_calls": 2})
for i, (lang, q) in enumerate([("pl", "Dzień dobry, co u Ciebie słychać?"), ("pl", "Przełóż na angielski: „Proszę o fakturę do piątku.”"),
("en", "Give me two title ideas for a blog about cycling."), ("pl", "Napisz krótkie życzenia urodzinowe dla Kasi.")]):
add(id=f"f_notool{i}", cat="decide", lang=lang, tools=WEB + ["calculator", "get_weather"], user=q, check={"no_tool": True})
add(id="f_clar0", cat="decide", lang="pl", tools=["calculator", "convert_units", "web_search"], user="Zamień mi to na mile.", check={"no_tool": True, "ask": True})
add(id="f_clar1", cat="decide", lang="pl", tools=["calculator", "web_search", "save_note"], user="Zarezerwuj stolik.", check={"no_tool": True, "ask": True})
add(id="f_calc", cat="decide", lang="pl", tools=["calculator", "web_search"], user="Oblicz 3816 * 47", check={"num": 3816 * 47, "tol": 0.5, "need_any": ["calculator"]})
for i, (lang, q) in enumerate([("pl", "Kto cię zaprogramował?"), ("pl", "Czy jesteś Copilotem od Microsoftu?"), ("en", "What model are you?")]):
add(id=f"f_identity{i}", cat="identity", lang=lang, tools=WEB + ["calculator"], user=q, check={"no_tool": True, "any": ["Slayer"]})
inv = {"Faktura_11_2026.pdf": ["FAKTURA nr FV/11/2026\nSprzedawca: Nordprint Sp. z o.o.\nKwota netto: 3 500,00 zł\nVAT 23%: 805,00 zł\nKwota brutto: 4 305,00 zł",
"Termin płatności: 21 dni od daty wystawienia.\nNumer konta: podany w stopce."]}
add(id="f_biz_invoice", cat="business", lang="pl", tools=["search_document", "read_document", "web_search"], docs=inv,
user="Jaki jest termin płatności faktury FV/11/2026 i ile wynosi kwota brutto?", check={"nums": [4305], "any": ["21 dni"], "need_any": ["search_document", "read_document"]})
add(id="f_biz_offers", cat="business", lang="pl", tools=["calculator", "web_search"],
user="Hurtownia X: 120 sztuk po 32 zł. Hurtownia Y: 120 sztuk po 35 zł, rabat 15%. Która wychodzi taniej i o ile?", check={"nums": [3840, 3570, 270], "need_any": ["calculator"]})
group = [{"author": "Kasia", "timestamp": "2026-11-28T10:00:00", "text": "Prezentację zrobię do wtorku."},
{"author": "Tomek", "timestamp": "2026-11-28T10:03:00", "text": "Catering zamówię do czwartku."},
{"author": "Ela", "timestamp": "2026-11-28T10:05:00", "text": "Zebranie w piątek o 11."}]
add(id="f_biz_group", cat="business", lang="pl", tools=["search_messages", "create_table"], group=group, name="Ela", user="@Slayer kto co robi i na kiedy?",
check={"all": ["Kasia", "Tomek", "wtor", "czwart", "piąt", "11"], "need_any": ["search_messages"]})
lec = {"wyklad_biologia.md": ["# Fotosynteza\nFaza jasna zachodzi w tylakoidach i wytwarza ATP oraz NADPH, a cykl Calvina w stromie wiąże CO2 i tworzy cukry.",
"Fotosynteza zużywa CO2 i wodę, a jej produktem ubocznym jest tlen."]}
add(id="f_biz_quiz", cat="business", lang="pl", tools=["search_document", "read_document", "create_quiz", "web_search"], docs=lec,
user="Na podstawie moich notatek z biologii przygotuj quiz z fotosyntezy.", check={"need_all": ["create_quiz"], "need_any": ["search_document", "read_document"]})
add(id="f_biz_note", cat="business", lang="pl", tools=["save_note", "create_table", "web_search"], user="Zanotuj: oddać książki, kupić baterie AA, umówić dentystę.",
check={"need_all": ["save_note"], "arg_has": {"save_note": ["książk", "bateri", "dentyst"]}})
add(id="f_biz_data", cat="business", lang="pl", tools=["analyze_data", "calculator", "create_table"], user="Policz sumę wyników i wskaż region z najwyższym wynikiem:\nregion,wynik\nPółnoc,12\nPołudnie,18\nWschód,9\nZachód,21",
check={"nums": [60], "any": ["Zach"], "need_any": ["analyze_data", "calculator"]})
add(id="f_biz_code", cat="business", lang="pl", tools=["run_python", "web_search"], user="Ta funkcja się zawiesza. Uruchom ją i powiedz, co jest nie tak:\ndef silnia(n):\n return n * silnia(n - 1)\n\nprint(silnia(3))",
check={"any": ["RecursionError", "rekur", "bazow", "warunek"], "need_any": ["run_python"]})
add(id="f_biz_mail", cat="business", lang="pl", tools=WEB + ["calculator"], user="Klient pisze: 'Can you send me the invoice?' Napisz po polsku krótką odpowiedź, że wyślemy ją jutro.",
check={"no_tool": True, "any": ["jutro"]})
return C
|