Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.clarifeye.ai/llms.txt

Use this file to discover all available pages before exploring further.

Ground truths are validated question-answer pairs used for evaluation and training.

Create Ground Truth

# Manually create a ground truth
ground_truth = warehouse.create_ground_truth(
    query="What is the company's revenue in 2023?",
    answer="The company's revenue in 2023 was $50 million.",
    additional_notes="Extracted from annual report page 5",
    source_feedback_id=None  # Optional: link to a feedback
)

List Ground Truths

# List all ground truths
ground_truths = warehouse.list_ground_truths()
for gt in ground_truths:
    print(f"Query: {gt['query']}")
    print(f"Answer: {gt['answer']}")

Update Ground Truth

# Update an existing ground truth
updated_gt = warehouse.update_ground_truth(
    ground_truth_id="gt-id",
    query="Updated question?",
    answer="Updated answer.",
    additional_notes="Updated notes"
)

Delete Ground Truth

# Delete a ground truth
warehouse.delete_ground_truth(ground_truth_id="gt-id")