Cookbooks
Welcome to the Scorecard Cookbooks. Here you’ll find code and guides for accomplishing common tasks with the Scorecard API and SDKs.
To run these examples, you’ll need a Scorecard account and associated API key (create an account here).
Most code examples are written in Python, though the concepts can be applied in any language.
Scorecard Recipes
E2E Text Extraction and Vector Search Python Demo
End-to-end example of text extraction and vector search using Python.
Anthropic Retrieval Augmented Generation (RAG) Example
Implementation of RAG with Anthropic models.
Create a Testset with Custom Schema
Guide on setting up a Testset using Scorecard’s SDK.
Multi-Message Prompt using Scorecard SDK
Learn how to structure multi-message prompts with Scorecard.
Prompt with Custom Variables using Scorecard SDK
Customize prompts dynamically using Scorecard SDK.
Heuristic Scoring Example - Exact String Match
Example of using heuristic scoring for evaluations.
Tracing with Scorecard - Python Demo
Learn how to implement tracing in Python with Scorecard.
Tracing with Scorecard - Node Demo
Implement tracing in Node.js with Scorecard.
Prompt Management Example
Efficiently manage and version prompts with Scorecard.
Using Second-Party Metrics from MLflow
Integrate MLflow metrics with Scorecard.
Using Second-Party Metrics from RAGAS
Leverage RAGAS metrics within Scorecard.
Was this page helpful?