NOUKAI

Essay Feedback for Language Learners

Detect the essay's target language, grade it, and translate the feedback into the learner's native language.

A learner submits an essay in their target language. The pipeline detects the language, evaluates grammar and style, and returns feedback in the learner's native language so they can actually understand it.

Tree

Flow: "essay-feedback"
├── Block: "detect-target-language" (llm)
├── Block: "grade-essay" (llm)
└── Block: "translate-feedback" (llm)

Blocks

detect-target-language (llm)

Identify the language of the following essay. Return the ISO 639-1 code.

Essay: {{message}}

Output schema:

{
  "type": "object",
  "properties": {
    "language_code": { "type": "string" },
    "language_name": { "type": "string" }
  },
  "required": ["language_code", "language_name"]
}

grade-essay (llm)

You are a {{previous_output.language_name}} writing tutor. Evaluate the essay below for grammar, vocabulary range, and clarity. Return up to 5 specific issues with concrete rewrites.

Essay: {{message}}

Output schema:

{
  "type": "object",
  "properties": {
    "overall_score": { "type": "integer", "minimum": 0, "maximum": 100 },
    "issues": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "category": { "type": "string", "enum": ["grammar", "vocabulary", "clarity"] },
          "excerpt": { "type": "string" },
          "explanation": { "type": "string" },
          "suggested_rewrite": { "type": "string" }
        }
      }
    }
  }
}

translate-feedback (llm)

Translate the feedback below into {{parameters.native_language}}. Keep technical writing terms accurate. Preserve the JSON structure exactly — only translate string values.

Feedback: {{previous_output}}

API call

curl -X POST https://api.noukai.xyz/api/v1/seq/{org}/{project}/essay-feedback/execute \
  -H "Authorization: Bearer $NOUKAI_API_KEY" \
  -d '{
    "message": "Hier ist mein Essay über Klimawandel...",
    "parameters": { "native_language": "English" }
  }'

Why this shape?

  • Three blocks, not one. Grading and translating are different concerns — and the translator should never see the original essay (saves tokens and avoids re-grading bias).
  • Detection is its own block because the grader prompt depends on it ({{previous_output.language_name}}). Inlining detection into the grader would force a single prompt to do two unrelated jobs and would lose the structured language_code you might want for analytics.
  • No code block at the end because the structured output from the translator is the response shape. Don't add aggregation steps you don't need.

On this page