Skip to main content

Knowledge Translation Transmutation Core - Transforming translations into gold-standard quality

Project description

KTTC - Knowledge Translation Transmutation Core

Transforming translations into gold-standard quality

Autonomous multi-agent platform with 90% cost reduction and 1000x speed improvement

CI codecov Python Version License Code style: black Ruff Type checked: mypy Status


๐ŸŽฏ Overview

KTTC (Knowledge Translation Transmutation Core) is an autonomous translation quality assurance platform powered by AI. It uses specialized multi-agent systems to automatically detect, analyze, and validate translation quality issues according to industry-standard MQM (Multidimensional Quality Metrics) framework.

Key Features:

  • ๐Ÿค– Multi-agent QA - 3 specialized agents (Accuracy, Fluency, Terminology) + Orchestrator
  • ๐Ÿ“Š MQM Scoring - Industry-standard quality metrics from WMT benchmarks
  • โšก 90% cost reduction vs manual review
  • ๐Ÿš€ 100-1000x faster than human evaluation
  • ๐Ÿ”„ CI/CD native - GitHub Actions ready
  • ๐ŸŽฏ 95+ MQM target - Production-grade quality threshold
  • ๐ŸŒ Multi-LLM support - OpenAI, Anthropic, YandexGPT, GigaChat

๐Ÿš€ Quick Start

Installation

# Install from PyPI (coming soon)
pip install kttc

# Or install from source
git clone https://github.com/kttc-ai/kttc.git
cd kttc
pip install -e ".[dev]"

Basic Usage

# Set your API key
export KTTC_OPENAI_API_KEY="sk-..."

# Check translation quality
kttc check \
  --source source.txt \
  --translation translation.txt \
  --source-lang en \
  --target-lang es \
  --threshold 95

# Output:
# โœ… MQM Score: 96.5 (PASS)
# โš ๏ธ  2 minor issues found

Python API

import asyncio
from kttc.agents.orchestrator import AgentOrchestrator
from kttc.llm.openai_provider import OpenAIProvider
from kttc.core.models import TranslationTask

async def check_quality():
    # Setup LLM provider
    llm = OpenAIProvider(api_key="your-api-key")

    # Create orchestrator
    orchestrator = AgentOrchestrator(llm)

    # Create translation task
    task = TranslationTask(
        source_text="Hello, world!",
        translation="ยกHola, mundo!",
        source_lang="en",
        target_lang="es",
    )

    # Evaluate quality
    report = await orchestrator.evaluate(task)

    print(f"MQM Score: {report.mqm_score}")
    print(f"Status: {report.status}")
    print(f"Errors found: {len(report.errors)}")

# Run
asyncio.run(check_quality())

Available Commands

  • kttc check - Check translation quality for a single file
  • kttc translate - Translate text with automatic quality checking (coming soon)
  • kttc batch - Batch process multiple translation files
  • kttc report - Generate formatted reports (Markdown/HTML)

Run kttc <command> --help for detailed options.


๐Ÿ—๏ธ Architecture

System Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         CLI Layer                            โ”‚
โ”‚                    (Typer + Rich UI)                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                   Agent Orchestrator                         โ”‚
โ”‚            (Coordinates QA Workflow)                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
      โ”‚          โ”‚            โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚Accuracyโ”‚  โ”‚Fluency โ”‚  โ”‚Terminologyโ”‚
โ”‚ Agent  โ”‚  โ”‚ Agent  โ”‚  โ”‚  Agent   โ”‚
โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜
     โ”‚           โ”‚           โ”‚
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                 โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚   Error Parser   โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                 โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚   MQM Scorer     โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                 โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚   QA Report      โ”‚
        โ”‚ (JSON/Markdown)  โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Agent System

Each specialized agent evaluates different quality aspects:

  • Accuracy Agent: Semantic correctness, meaning preservation
  • Fluency Agent: Grammar, naturalness, readability
  • Terminology Agent: Domain-specific term consistency

The orchestrator coordinates agents, aggregates results, and calculates final MQM scores.

MQM Scoring

Quality scoring follows the Multidimensional Quality Metrics framework:

  • Score Range: 0-100 (higher is better)
  • Pass Threshold: 95+ (configurable)
  • Error Weights:
    • Neutral: 0 points
    • Minor: 1 point
    • Major: 5 points
    • Critical: 10 points

Formula: MQM Score = 100 - (total_penalty / word_count * 1000)


๐Ÿ› ๏ธ Development

Setup

# Clone repository
git clone git@github.com:kttc-ai/kttc.git
cd kttc

# Create virtual environment (Python 3.11+ required)
python3.11 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -e ".[dev]"

# Setup pre-commit hooks
pre-commit install

# Run tests
pytest

# Run quality checks
black src/ tests/
ruff check src/ tests/
mypy src/kttc --strict

Project Structure

kttc/
โ”œโ”€โ”€ .github/
โ”‚   โ”œโ”€โ”€ workflows/          # CI/CD workflows
โ”‚   โ”œโ”€โ”€ ISSUE_TEMPLATE/     # Issue templates
โ”‚   โ””โ”€โ”€ PULL_REQUEST_TEMPLATE.md
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ kttc/               # Main package
โ”‚       โ”œโ”€โ”€ cli/            # CLI interface (Typer)
โ”‚       โ”œโ”€โ”€ agents/         # QA agents
โ”‚       โ”‚   โ”œโ”€โ”€ accuracy.py
โ”‚       โ”‚   โ”œโ”€โ”€ fluency.py
โ”‚       โ”‚   โ”œโ”€โ”€ terminology.py
โ”‚       โ”‚   โ”œโ”€โ”€ orchestrator.py
โ”‚       โ”‚   โ””โ”€โ”€ parser.py
โ”‚       โ”œโ”€โ”€ core/           # Core logic
โ”‚       โ”‚   โ”œโ”€โ”€ models.py   # Pydantic models
โ”‚       โ”‚   โ””โ”€โ”€ mqm.py      # MQM scoring
โ”‚       โ”œโ”€โ”€ llm/            # LLM providers
โ”‚       โ”‚   โ”œโ”€โ”€ openai_provider.py
โ”‚       โ”‚   โ”œโ”€โ”€ anthropic_provider.py
โ”‚       โ”‚   โ”œโ”€โ”€ yandex_provider.py
โ”‚       โ”‚   โ””โ”€โ”€ gigachat_provider.py
โ”‚       โ””โ”€โ”€ utils/          # Utilities
โ”‚           โ””โ”€โ”€ config.py   # Configuration
โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ unit/              # Unit tests
โ”‚   โ”œโ”€โ”€ integration/       # Integration tests
โ”‚   โ””โ”€โ”€ e2e/              # End-to-end tests
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ api/              # API documentation
โ”‚   โ”œโ”€โ”€ guides/           # User guides
โ”‚   โ””โ”€โ”€ development/      # Developer guides
โ”œโ”€โ”€ examples/             # Example scripts
โ”‚   โ”œโ”€โ”€ basic_usage.py
โ”‚   โ””โ”€โ”€ batch_processing.py
โ”œโ”€โ”€ CODE_OF_CONDUCT.md
โ”œโ”€โ”€ CONTRIBUTING.md
โ”œโ”€โ”€ SECURITY.md
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ pyproject.toml

Testing

# Run all tests
pytest

# Run with coverage
pytest --cov=kttc --cov-report=html

# Run specific test categories
pytest tests/unit/
pytest tests/integration/
pytest tests/e2e/

# Run with markers
pytest -m "not slow"

Code Quality

The project maintains strict code quality standards:

  • Type Checking: mypy with --strict mode
  • Formatting: black (line length: 100)
  • Linting: ruff (Python 3.11+)
  • Testing: pytest with 100% coverage
  • Pre-commit: Automated checks on commit

๐Ÿ“š Documentation


๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

Quick Start for Contributors:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes and add tests
  4. Run quality checks: pre-commit run --all-files && pytest
  5. Commit using Conventional Commits
  6. Push and open a Pull Request

Please read our Code of Conduct before contributing.

Development Workflow

# Create feature branch
git checkout -b feature/my-feature

# Make changes and test
pytest

# Format and lint
black src/ tests/
ruff check src/ tests/ --fix
mypy src/kttc --strict

# Commit with conventional commit message
git commit -m "feat: add new feature"

# Push and create PR
git push origin feature/my-feature

Reporting Issues

Found a bug or have a feature request?

  • Check our issue tracker
  • Use issue templates for bugs and features
  • Provide detailed reproduction steps

Security

For security vulnerabilities, please see our Security Policy. Do not open public issues for security concerns.


๐ŸŒŸ Roadmap

Current Status (Alpha v0.1.0)

  • โœ… Core multi-agent QA system
  • โœ… MQM scoring engine
  • โœ… CLI interface
  • โœ… OpenAI & Anthropic support
  • โœ… Batch processing
  • โœ… CI/CD integration

Coming Soon (v0.2.0)

  • ๐Ÿ”„ Neural metrics (COMET, BLEURT)
  • ๐Ÿ”„ GitHub Actions workflow
  • ๐Ÿ”„ Translation memory integration
  • ๐Ÿ”„ Custom agent creation API
  • ๐Ÿ”„ WebUI dashboard
  • ๐Ÿ”„ PyPI package

Future (v1.0.0)

  • ๐Ÿ“‹ Automatic translation fixing
  • ๐Ÿ“‹ Multi-language support expansion
  • ๐Ÿ“‹ Enterprise features
  • ๐Ÿ“‹ Cloud-hosted service

๐Ÿ“Š Benchmarks

Performance comparison with manual review:

Metric Manual Review KTTC Improvement
Speed 1x baseline 100-1000x ๐Ÿ“ˆ
Cost per word $0.10-0.50 $0.01-0.05 90% reduction
Consistency Subjective Objective โœ“
Scalability Limited Unlimited โœ“

Benchmarks based on 10,000 word corpus evaluation


๐Ÿ“„ License

MIT License - see LICENSE file for details.


๐Ÿ”— Links


๐Ÿ’ก Citation

If you use KTTC in your research, please cite:

@software{kttc2025,
  title = {KTTC: Knowledge Translation Transmutation Core},
  author = {KTTC Development Team},
  year = {2025},
  url = {https://github.com/kttc-ai/kttc},
  version = {0.1.0}
}

Last Updated: November 10, 2025

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kttc-0.1.0.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kttc-0.1.0-py3-none-any.whl (41.2 kB view details)

Uploaded Python 3

File details

Details for the file kttc-0.1.0.tar.gz.

File metadata

  • Download URL: kttc-0.1.0.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kttc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 92a6bfc774d88709e7d1c736155364a3a47216ecb22ac9ea8a3c2f6747c4606b
MD5 72812bf204b916525231200c8e12324c
BLAKE2b-256 ef9709189f1e69255cda6bd142cec32343ae74505d18b398d77e2b83d1fe36fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for kttc-0.1.0.tar.gz:

Publisher: publish.yml on kttc-ai/kttc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kttc-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kttc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 41.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kttc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5548041159733ae7510ec264feb1d90dd9514e576cfab59021e712743c5adbe1
MD5 30d8843a579043dee4eb49b94b1962e2
BLAKE2b-256 eadb12ec20b49ac1886b8ae5301751dcc801f6666a7e1cb0896f71cafdacf657

See more details on using hashes here.

Provenance

The following attestation bundles were made for kttc-0.1.0-py3-none-any.whl:

Publisher: publish.yml on kttc-ai/kttc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page