INNER CODE UNIT · Python

passed

valqore/valqore · blog/01-fine-tuning/eval_example.py:42

    passed = sum(1 for _, substr in checks if substr.lower() in response.lower())
    return passed, len(checks)


# Usage:
# response = ollama.generate(model="valqore", prompt=test.prompt)
# passed, total = evaluate_response(response, test.checks)
# print(f"{test.id}: {passed}/{total} checks passed ({passed/total:.0%})")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…