← All projects

Applied AI

Pangea Chat

Multilingual language feedback API

Returns minimal sentence corrections, structured explanations in the learner’s native language, and a CEFR difficulty label.

  • Python
  • FastAPI
  • Pydantic
  • Structured outputs
  • Caching

Architecture & evidence

Architecture

Pangea Chat architecture showing its documented processing paths.
Selected architecture paths redrawn from the public project README.

API reference

Pangea Language Feedback API documentation showing the feedback endpoint and request and response schemas.
FastAPI-generated API reference showing the request and response schemas.

The problem

A language learner needs corrections they can understand without having every valid sentence rewritten into a different style.

System architecture

FastAPI validates the request and checks a bounded application cache before calling a schema-constrained language model. Deterministic post-processing reconciles the corrected sentence, error list, and correctness flag.

Reliability decisions

The implementation normalizes error labels, uses bounded HTTP timeouts, retries transient provider failures with exponential backoff, and preserves valid sentences. CEFR describes attempted sentence complexity separately from correctness.

Validation

The repository includes API, unit, edge-case, schema, and multilingual integration tests. Its README distinguishes structural contract checks from linguistic checks grounded in task examples and grammar references.

From a sentence to useful feedback

This request and response example comes from the project README. The learner receives a minimal correction, an explanation in English, and a separate difficulty label.

POST /feedback · example request

{
  "sentence": "Yo soy fue al mercado ayer.",
  "target_language": "Spanish",
  "native_language": "English"
}

Structured example response

{
  "corrected_sentence": "Yo fui al mercado ayer.",
  "is_correct": false,
  "errors": [{
    "original": "soy fue",
    "correction": "fui",
    "error_type": "conjugation",
    "explanation": "You mixed two verb forms. You only need 'fui' here."
  }],
  "difficulty": "A2"
}
Read the API contract

Explore the implementation

Source code, setup instructions, and project documentation are available in the repository.

CHINMAY / NAVIGATOR

No destinations match “”.

Try a project name, “research”, or a technology like “PyTorch”.

0 destinations found.

navigate · Home / End open · Esc close