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

# Evaluation

> Understand input and output fields for TypeScript SDK evaluators.

export const PiiWarning = () => {
  return <Warning>
      Inputs must be de-identified. Do not submit students' Personally
      Identifiable Information (PII) or any regulated or sensitive personal
      information.
    </Warning>;
};

Once you've configured your evaluator, you can start evaluating text inputs for grade level appropriateness:

```typescript example.ts theme={null}
const evaluator = new GradeLevelAppropriatenessEvaluator({
  googleApiKey: process.env.GOOGLE_API_KEY,
});

await evaluator.evaluate({ text: "The cat's out of the bag now." });
```

## Inputs

Each evaluator requires different input fields when invoking `evaluate()`.

### Student-Facing Text

[Grade Level Appropriateness](/evaluators/student-facing-text-evaluators/grade-level-appropriateness) takes `{ text }`:

| Field  | Type     | Description                                          |
| :----- | :------- | :--------------------------------------------------- |
| `text` | `string` | Informational text to evaluate. 10–10,000 characters |

All other Student-Facing Text evaluators take `{ text, grade_level }`:

| Field         | Type                                                                    | Description                                                                                                                                                       |
| :------------ | :---------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `text`        | `string`                                                                | Informational text to evaluate. Length limits vary by evaluator (typically 1–10,000 characters)                                                                   |
| `grade_level` | `"3" \| "4" \| "5" \| "6" \| "7" \| "8" \| "9" \| "10" \| "11" \| "12"` | Target student grade as a string literal. A number or a word like `"fifth"` does not compile; a string from a form or database needs narrowing before you pass it |

### Feedback

<PiiWarning />

[Feedback](/evaluators/feedback-evaluators/introduction) evaluators take `{ student_text, feedback_text }`:

| Field           | Type     | Description                                             |
| :-------------- | :------- | :------------------------------------------------------ |
| `student_text`  | `string` | Student's written response. 1–10,000 characters         |
| `feedback_text` | `string` | Teacher or AI feedback to evaluate. 1–10,000 characters |

```typescript theme={null}
await evaluator.evaluate({
  student_text:
    "Some people think AI-powered pets are a good alternative to real pets because they could help around the house etc.",
  feedback_text:
    "You're right, the AI pets could help around the house. Can you find some other details from the article that you could add to make your claim stronger?",
});
```

### Academic Standards

[Academic Standards](/evaluators/academic-standards-evaluators/introduction) evaluators take `{ question, statement_code, jurisdiction }`:

<PiiWarning />

| Field            | Type                                                                                                                          | Description                                                                                                                                                                                                      |
| :--------------- | :---------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `question`       | `string`                                                                                                                      | Math assessment question to evaluate. 1–10,000 characters                                                                                                                                                        |
| `statement_code` | `string`                                                                                                                      | Math standard code to evaluate against (e.g., `"3.MD.C.7.d"`, `"K.CC.A.1"`). 1–50 characters                                                                                                                     |
| `jurisdiction`   | [`Jurisdiction`](https://github.com/learning-commons-org/evaluators/blob/main/sdks/typescript/src/knowledge-graph/types.ts) ↗ | Standards jurisdiction ([`JurisdictionENUM`](/knowledge-graph/schema-reference/enums-and-formats#jurisdictionenum)). Use `Jurisdiction.MultiState` for <Tooltip tip="Common Core State Standards">CCSS</Tooltip> |

```typescript theme={null}
import { Jurisdiction } from "@learning-commons/evaluators";

await evaluator.evaluate({
  question: "A playground is shaped like an L. What is its area?",
  statement_code: "3.MD.C.7.d",
  jurisdiction: Jurisdiction.MultiState,
});
```

[Math Standards Alignment](/evaluators/academic-standards-evaluators/math-standards-alignment) also supports bulk methods:

* `evaluateItems` for question–standard pairs
* `evaluateByGradeLevel` for a question bank against every standard in a grade

## Output

All [Student-Facing Text](/evaluators/student-facing-text-evaluators/introduction), [Feedback](/evaluators/feedback-evaluators/introduction), and [Academic Standards](/evaluators/academic-standards-evaluators/introduction) evaluators have the following output fields:

| Field       | Type                                                                                                                                                                                         | Description                                                                                                                       |
| :---------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------- |
| `evaluator` | `string`                                                                                                                                                                                     | Registry ID for the evaluator used                                                                                                |
| `result`    | Unique to each evaluator<br /><br />See "Output" for each evaluator (e.g., for [Grade Level Appropriateness](/evaluators/student-facing-text-evaluators/grade-level-appropriateness#output)) | Detailed internal analysis data specific to each evaluator                                                                        |
| `metadata`  | [`EvaluationMetadata`](https://github.com/learning-commons-org/evaluators/blob/main/sdks/typescript/src/schemas/outputs.ts) ↗                                                                | Includes model used to generate the evaluation, total evaluation processing time in milliseconds, input tokens, and output tokens |

## Related topics

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/evaluators/getting-started/quickstart#sdk">
    Install the SDK and run your first evaluator.
  </Card>

  <Card title="Configuration" icon="gear" href="/evaluators/sdk-api-reference/typescript/configuration">
    Configure evaluators, including API keys and options.
  </Card>

  <Card title="Error handling" icon="triangle-exclamation" href="/evaluators/sdk-api-reference/typescript/error-handling">
    Handle configuration, validation, and API errors.
  </Card>

  <Card title="Batch evaluator" icon="layer-group" href="/evaluators/sdk-api-reference/typescript/batch-evaluator">
    Evaluate a batch of text from a CSV file using Student-Facing Text
    evaluators.
  </Card>
</CardGroup>
