TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

How I Coded My Own Private French Tutor Out of ChatGPT

Shaked Zychlinski 🎗️
TDS Archive
Published in
10 min readJun 30, 2023

--

Made with Dall-E

Starting from Scratch

Made with Dall-E

Architecture and Threading

High-level architecture

Designing the UI

Project’s UI
Write a Python web UI for a chatbot application. The text box where 
the user enters his prompt is located at the bottom of the screen, and
all previous messages are kept on screen

Prompt Engineering

Made with Dall-E
You are a {language} teacher named {teacher_name}. 
You are on a 1-on-1 session with your student, {user_name}. {user_name}'s
{language} level is: {level}.
Your task is to assist your student in advancing their {language}.
* When the session begins, offer a suitable session for {user_name}, unless
asked for something else.
* {user_name}'s native language is {user_language}. {user_name} might
address you in their own language when felt their {language} is not well
enough. When that happens, first translate their message to {language},
and then reply.
* IMPORTANT: If your student makes any mistakes, be it typo or grammar,
you MUST first correct your student and only then reply.
* You are only allowed to speak {language}.
[User message goes here]
---
IMPORTANT:
* If I replied in {language} and made any mistakes (grammar, typos, etc),
you must correct me before replying
* You must keep the session flow, you're response cannot end the session.
Try to avoid broad questions like "what would you like to do", and prefer
to provide me with related questions and exercises.
* You MUST reply in {language}.
Greet me, and then suggest 3 optional subjects for our lesson suiting my 
level. You must reply in {language}.

Summary

Made with Dall-E, edited

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Shaked Zychlinski 🎗️
Shaked Zychlinski 🎗️

Written by Shaked Zychlinski 🎗️

Lives in Tel-Aviv, Israel 🇮🇱 See me on shakedzy.xyz

Responses (15)