Pi Scorer is a deterministic, fast foundation model that scores text against a rubric of natural-language questions.In this guide, you will evaluate a simple text generation with one question.
Pass questions to the Score API to
see how it responds
Copy
import osfrom withpi import PiClientpi = PiClient(api_key=os.environ['WITHPI_API_KEY'])scores = pi.scoring_system.score( llm_input="Pi Labs", llm_output="Score anything with Pi Labs today!", scoring_spec=[{"question": "Is there a strong call to action?"}])print(scores.total_score)