Skip to content

Commit

Permalink
Updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Ng committed Jun 9, 2024
1 parent 35cdb66 commit 321c195
Showing 1 changed file with 25 additions and 16 deletions.
41 changes: 25 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
# Translation Agent: Agentic translation using reflection workflow

Translation Agent is a Python-based project that leverages an agentic workflow for machine translation tasks. The repository contains code that utilizes the power of Reflection to enhance the translation process and improve the quality of the generated translations.
This is Python-based demonstration of a reflection agentic workflow for machine translation. The main steps are:
1. Prompt an LLM to translate a text from {source_language} to {target_language}
2. Reflect on the translation to come up with constructive suggestions for improving it
3. Use the suggestions to improve the translation

## Features

- Agentic Workflow: Translation Agent employs an agentic workflow, which allows for a more intelligent and context-aware approach to machine translation. By incorporating Reflection, the system can analyze and understand the source text more effectively, resulting in more accurate and fluent translations.
- Reflection-based Translation: The core of Translation Agent lies in its use of Reflection, a technique that enables the system to introspect and reason about its own translation process. By reflecting on the intermediate steps and considering the context and meaning of the source text, the system can make informed decisions and generate translations that better capture the intended meaning.
- Language Support: Translation Agent supports a wide range of languages, making it a versatile tool for translating text across different linguistic boundaries. Whether you need to translate between commonly spoken languages or handle less-resourced language pairs, Translation Agent has you covered.
- Customizable Models: The repository provides a flexible framework that allows you to customize and fine-tune the translation models according to your specific requirements. You can experiment with different architectures, training data, and hyperparameters to optimize the translation quality for your use case.
- Easy Integration: Translation Agent is designed to be easily integrated into existing projects and workflows. With a simple and intuitive API, you can seamlessly incorporate machine translation capabilities into your applications, websites, or data pipelines.
## Customizability

By using an LLM as the heart of the translation engine, this system is highly steerable. For example, by changing the prompts,
you can modify its output's style (formal/informal; how to handle special terms like names and acronyms; have it use specific regional
dialects; etc.) more easily than traditional machine translation systems.

This is not mature software. But we think agentic translation is a promising direction for machine translation, and hope that
this open source implementation will spur further work. Comments and suggestions for how to improve this are also very welcome!

## Performance

[[To be added,]]

## Getting Started

To get started with Translation Agent, follow these steps:

### Installation:

```bash
git clone https://github.com/andrewyng/translation-agent.git
```

- Poetry package manager is required (and recommended)
- The Poetry package manager is required (and recommended)
- A .env file with a OPENAI_API_KEY is required to run the workflow. See the .env.sample file as an example.

Once you are in the repository directory:

```python
```bash
git clone https://github.com/andrewyng/translation-agent.git
pip install poetry
cd translation-agent
poetry install
```

Expand All @@ -43,4 +49,7 @@ See examples/example_script.py for an example script to try out.

## License

Translation Agent is released under the **MIT License**. You are free to use, modify, and distribute the code for both commercial and non-commercial purposes.
Translation Agent is released under the **MIT License**. You are free to use, modify, and distribute the code
for both commercial and non-commercial purposes.


0 comments on commit 321c195

Please sign in to comment.