> ## Documentation Index
> Fetch the complete documentation index at: https://futureagi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Summary Quality

> Evaluates whether a summary effectively captures the main points, maintains factual accuracy, and achieves an appropriate length while preserving the original meaning. It checks for both the inclusion of key information and the exclusion of unnecessary details.

<CodeGroup>
  ```python Python theme={null}
  result = evaluator.evaluate(
      eval_templates="summary_quality",
      inputs={
          "output": "Example output summary text",
          "input": "Example input text"
      },
      model_name="turing_flash"
  )

  print(result.eval_results[0].output)
  print(result.eval_results[0].reason)
  ```

  ```typescript JS/TS theme={null}
  import { Evaluator, Templates } from "@future-agi/ai-evaluation";

  const evaluator = new Evaluator();

  const result = await evaluator.evaluate(
    "summary_quality",
    {
      output: "Example output summary text",
      input: "Example input text"
    },
    {
      modelName: "turing_flash",
    }
  );

  console.log(result);
  ```
</CodeGroup>

| **Input** |                    |          |                                          |
| --------- | ------------------ | -------- | ---------------------------------------- |
|           | **Required Input** | **Type** | **Description**                          |
|           | `output`           | `string` | The generated summary.                   |
|           | `input`            | `string` | The original document or source content. |

| **Output** |            |                                                                                                        |
| ---------- | ---------- | ------------------------------------------------------------------------------------------------------ |
|            | **Field**  | **Description**                                                                                        |
|            | **Result** | Returns a score representing the summary quality, where higher values indicate better summary quality. |

***

### What to Do When Summary Quality Evaluation Gives a Low Score

When a summary quality evaluation yields a low score, the first step is to review the evaluation criteria to ensure they are clearly defined and aligned with the assessment goals. If necessary, adjustments should be made to enhance their comprehensiveness and relevance.

Next, the summary itself should be analysed for completeness, accuracy, and relevance, identifying any gaps or inaccuracies. Refinements should be considered to better capture the main points and improve the overall quality of the summary.

***
