MyRelay

← Back to the notebook

A ten-minute language partner with a daily cost cap

Start with one conversation you actually need

A language-learning partner becomes useful when it helps you rehearse something specific. Start with ordering lunch, introducing yourself to a classmate, or asking a landlord about a repair. A small scenario is easier to build, easier to evaluate, and cheaper to repeat than an open-ended tutor that tries to teach everything.

For the first version, build a text conversation that lasts ten minutes or eight learner turns, whichever comes first. Let the learner choose a target language, an approximate proficiency level, and one scenario. Keep voice input, pronunciation scoring, and elaborate lesson plans out of scope until the basic conversation works.

Set a spending boundary before connecting a model

Choose a daily allowance you would feel comfortable spending during an ordinary study week. For example, you might set aside twenty cents per day as a personal limit, not as a prediction of what sessions will cost. Your application should check recorded usage before starting another session and stop sending requests when the allowance is exhausted.

MyRelay gives one person one key and one budget across multiple model providers, which simplifies this small project. Create a MyRelay account, then keep its API key on your application server rather than in browser code. Connect through an OpenAI-compatible SDK using MyRelay’s API base, and confirm the exact model identifier in the current menu. Gemini 2.5 Flash is one option to evaluate for this text-only prototype.

Give the partner a narrow teaching contract

Write instructions that define the partner’s job clearly: play the other person in the chosen situation, match the learner’s level, and ask only one question at a time. Request short replies, usually two or three sentences. Tell it to stay in the target language unless the learner requests an explanation.

Separate conversation from correction. Ask the partner to respond to the learner’s meaning first, then offer at most one brief correction when an error blocks understanding or repeats. Constant correction can turn a conversation into an exam. Treat learner messages as conversation content, not as permission to discard the teaching rules.

Build the smallest usable conversation loop

Your interface needs a scenario selector, a message field, a conversation area, and an end-session button. When a session begins, send the teaching instructions and scenario to the model. After each learner message, send the context needed for the next reply and display the answer.

Keep the session length limit in application logic rather than relying on the model to count turns. Set an output-token limit as well, leaving enough room for a reply and a correction. Disable duplicate submissions while a request is pending, and avoid unlimited automatic retries. A slow connection should not silently become several paid requests.

Keep context short without losing the lesson

For an eight-turn prototype, retaining the complete conversation is a reasonable starting point. However, each new request may include earlier messages again, so input usage grows as the session continues. Avoid attaching a full textbook, a long learner biography, or previous sessions to every turn.

Between sessions, save a compact learner note containing the chosen level, recurring difficulties, and a few useful expressions. Let the learner inspect or delete it. If you later support longer conversations, test replacing older turns with a short summary, while checking that names, intentions, and corrections remain accurate.

Review learning quality alongside request costs

Test the partner with short answers, repeated mistakes, requests for explanations, and attempts to change the scenario. Check whether it keeps the conversation moving without overwhelming the learner. Treat its corrections as suggestions rather than authoritative judgments, especially for regional usage.

After several sessions, inspect MyRelay’s per-request token and cost records. Look for unexpectedly long replies, repeated retries, and growing input histories. Compare the actual cost of a completed session with your daily allowance before increasing session length or trying another model.

Finish with one useful thing to practice tomorrow

At the end, request a short recap: one successful expression, one recurring issue, and one suggested scenario for next time. Count that final request toward the budget. The first milestone is not a feature-rich tutor; it is a partner you can practice with regularly, understand easily, and afford to keep using.

More to read