from athina.loaders import Loader
# Create batch dataset from list of dict objects
raw_data = [
{
"query": "What is the capital of Greece?",
"context": ["Greece is often called the cradle of Western civilization."],
"response": "Athens",
},
{
"query": "What is the price of a Tesla Model 3?",
"context": ["Tesla Model 3 is a fully electric car."],
"response": "I cannot answer this question as prices vary from country to country.",
},
{
"query": "What is a shooting star?",
"context": ["Black holes are stars that have collapsed under their own gravity. They are so dense that nothing can escape their gravitational pull, not even light."],
"response": "A shooting star is a meteor that burns up in the atmosphere.",
}
]
dataset = Loader().load_dict(raw_data)