Interface Usage

result = evaluator.evaluate(
    eval_templates="is_concise", 
    inputs={
        "input": "Honey doesn't spoil because its low moisture and high acidity prevent the growth of bacteria and other microbes."
    },
    model_name="turing_flash"
)

print(result.eval_results[0].metrics[0].value)
print(result.eval_results[0].reason)

Python SDK Usage

from futureagi import Evaluator

# Initialize the evaluator
evaluator = Evaluator(api_key="your_api_key")

# Evaluate whether text is concise
result = evaluator.evaluate(
    eval_templates="is_concise", 
    inputs={
        "input": "Honey doesn't spoil because its low moisture and high acidity prevent the growth of bacteria and other microbes."
    },
    model_name="turing_flash"
)

# Access the result
is_concise = result.eval_results[0].metrics[0].value
reason = result.eval_results[0].reason

print(f"Is concise: {is_concise}")
print(f"Reason: {reason}")

Example Output

True
The statement efficiently explains why honey doesn't spoil in a single, clear sentence. It presents the key factors (low moisture and high acidity) and their effect (preventing microbial growth) without unnecessary words, repetition, or tangential information. The explanation is direct and to the point while still being complete.

Troubleshooting

If you encounter issues with this evaluation:

  • Remember that conciseness depends on context - what’s concise for a complex topic might still be relatively lengthy
  • This evaluation works best on complete responses rather than fragments
  • Very short responses may be marked as concise but might fail other evaluations like completeness
  • Consider the balance between conciseness and adequate information - extremely brief responses might miss important details
  • completeness: Ensures that despite being concise, the response addresses all aspects of a query
  • is-helpful: Evaluates if the response is actually useful despite its brevity
  • instruction-adherence: Checks if the response follows instructions, which might include requirements for detail
  • length-evals: Provides quantitative metrics about text length