<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Albert Szupszynski on Medium]]></title>
        <description><![CDATA[Stories by Albert Szupszynski on Medium]]></description>
        <link>https://medium.com/@albert-szupszynski?source=rss-4eeba1644aba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Yfu4KgeyUaywPBNF_EKGgw.jpeg</url>
            <title>Stories by Albert Szupszynski on Medium</title>
            <link>https://medium.com/@albert-szupszynski?source=rss-4eeba1644aba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 16:33:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@albert-szupszynski/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Chaté a me: my first AI application]]></title>
            <link>https://albert-szupszynski.medium.com/chat%C3%A9-a-me-my-first-ai-application-898b195ef6c1?source=rss-4eeba1644aba------2</link>
            <guid isPermaLink="false">https://medium.com/p/898b195ef6c1</guid>
            <dc:creator><![CDATA[Albert Szupszynski]]></dc:creator>
            <pubDate>Tue, 02 Sep 2025 14:40:50 GMT</pubDate>
            <atom:updated>2025-09-02T14:40:50.788Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*U_8JwNaqTQm-2X17E6Dd6g.png" /></figure><p>Being surrounded by news about artificial intelligence — from big announcements of new developments to seeing creative ways of applying large language models — made me curious to try it myself. I started with proper research: reading articles, watching videos, taking notes, and having long debates on different AI models with ChatGPT. The more I learned, the more ideas were filling my list of projects. And this is how <em>Chaté a me</em> was born.</p><p>The name <em>Chaté a me</em> is a mix of Spanish and English and can be translated as “Chat with me.” It combines two of my passions: building original, practical applications and learning Spanish. From experience, I’ve learned that even hobby projects work best when they solve a real problem. In this case, why not come up with a solution for myself? There is no doubt that building something that can be used regularly keeps you motivated, and it’s much easier to see the project through to the end.</p><p>The problem — conversational confidence. My Duolingo learning streak has now reached 900 days, I had developed a solid foundation in grammar and improved my vocabulary, but I still lacked confidence when trying to speak Spanish. I could manage basic conversations, but I wanted to be more relaxed and fluent. So, the question was: <em>Could I use AI to practise Spanish in a way that felt more natural?</em></p><p>The solution I decided on was a chatbot. It would behave like a real person, easily adapt to my level, and keep a conversation going on almost any topic. There are already several apps that offer AI-generated native speakers to practice with, but the vast majority have limitations: like restricting the length of conversations or limiting the topics you can discuss. Often there is also an expensive subscription plan in place. I realised that by building my own application, I could bypass all those restrictions and design exactly the experience I wanted.</p><p>Choosing my tech stack, I went for the solutions I knew quite well. For the front-end, I used <strong>React</strong> with <strong>Next.js</strong> for scalability. The minimum viable product (MVP), even though quite small, would serve the project well if I wanted to add future functions. I chose <strong>JavaScript</strong>, <strong>HTML</strong>, and <strong>CSS</strong> to write my code. On the back-end, I went with <strong>Node.js</strong> and Vercel with GitHub Actions for deployment. It made it easy to access the application from my smartphone. Once the core structure was in place, I was able to move on to the AI integration.</p><p>I needed a model that was affordable, quick to respond, and easy to integrate with JavaScript. <strong>OpenAI’s GPT-3.5 Turbo model</strong> ticked all those boxes. OpenAI’s documentation was very clear and easy for beginners. In addition, the API is server-based and there was no need for local installation. At the time, GPT-4.1 Mini was another option to consider, but GPT-3.5 Turbo was ten times cheaper to use and returned faster responses, giving me exactly the performance I needed for a smooth experience. Testing, later in the process of building, confirmed that GPT-3.5 Turbo was the right choice.</p><p>My project had three MVPs and three major features I wanted to implement. The first was the chat itself. Following the documentation, I created a route.js file in the API directory to handle the chat functionality. I wanted a smooth experience where students could discuss any topic with a ChatGPT-powered, human-like bot. It was important to avoid situations where the chat would use language that was either too simple or too difficult, so I added a feature allowing students to select their Spanish level at the very beginning of the conversation. Six levels are included, from A1 to C2.</p><pre>const conversationSystemMessage = {<br>      role: &quot;system&quot;,<br>      content: `You are a friendly young adult from Spain who enjoys casual online conversations. Respond like a real person your age would — natural, engaging, and informal. Be pro-active, take control of the conversation. Bring new vocabulary. Tailor your language to match a Spanish learner at the &#39;${level}&#39; level. Keep responses brief and under 400 characters.`,<br>    };<br><br>    const conversationCompletion = await openai.chat.completions.create({<br>      model: &quot;gpt-3.5-turbo&quot;,<br>      messages: [<br>        conversationSystemMessage,<br>        ...updatedHistory,<br>      ],<br>    });</pre><p>In the prompt, I highlighted who the bot is and how it should manage the conversation. To give a natural flow, I wanted it to be proactive and introduce new vocabulary. Every response should match the user’s chosen level and be brief. This way, once the difficulty is selected, the student can start chatting.</p><p>While practicing with the chatbot and receiving responses, I realised that typing quickly and trying to keep up with the conversation often led to writing mistakes. Since I wanted to prioritise the conversation flow, I also wanted my writing skills to be checked and assessed. That’s why I decided to add one more prompt to the route.js file.</p><pre>const correctionSystemMessage = {<br>      role: &quot;system&quot;,<br>      content: `You are a Spanish grammar expert. Correct the following sentence using proper Spanish. Respond with only the corrected sentence — do not add explanations or extra text.`,<br>    };<br><br>    const correctionCompletion = await openai.chat.completions.create({<br>      model: &quot;gpt-3.5-turbo&quot;,<br>      messages: [<br>        correctionSystemMessage,<br>        { role: &quot;user&quot;, content: message },<br>      ],<br>    });</pre><p>Following this prompt, before giving a response, the bot would check the user’s writing skills and fully rewrite the sentence in the correct form. With this feature added, my MVP1 was ready. Let’s see how it looks after adding some CSS styling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*hLtB1gDazH1p5eMKV-MHng.png" /></figure><p>Time to introduce MVP2 — <em>Diccionario </em>(the Dictionary). While receiving responses from ChatGPT, some words could be unfamiliar, and the context of a sentence not fully understandable. Also, when replying to the bot, the idea was to keep expanding language skills by using new vocabulary. Getting quick translations without leaving the page or opening another application quickly became my next focus.</p><pre>const dictionaryMessage = {<br>            role: &quot;system&quot;,<br>            content: `Translate the word &#39;${word}&#39; into &#39;${leng}&#39; with strict dictionary accuracy. Include the article if applicable. If the word cannot be found, reply with: &#39;Word not found.&#39; Provide only the translation — no full sentences or extra explanation.`,<br>        };<br><br>        const dictionaryComplition = await openai.chat.completions.create({<br>            model: &quot;gpt-3.5-turbo&quot;,<br>            messages: [<br>                dictionaryMessage,<br>                { role: &quot;user&quot;, content: word },<br>            ],<br>        });</pre><p>When writing the prompt, I requested a simple, dictionary-like translation. Because of the nature of this feature, I needed a two-way translation: from Spanish to English and from English to Spanish. The tests went very well — the application did exactly what I asked, and it made the conversation much faster and more fluent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*FAzPCJJatvfthcCSCMaETg.png" /></figure><p>At this point, I was almost ready. There was just one last functionality I really wanted to implement. I wanted the user to be able to enhance their vocabulary in a certain topic by simply researching words that could be useful in the conversation. My MVP3 is called <em>Tema</em> (the topic).</p><pre>const topicMessage = {<br>      role: &quot;system&quot;,<br>      content: `Given the topic: &#39;${topic}&#39;, provide 5 Spanish words useful for discussing this topic fluently. List each word on a new line with its English translation in the format: <br>      <br>      word1Spanish   →   word1English <br>      word2Spanish   →   word2English <br>      word3Spanish   →   word3English <br>      word4Spanish   →   word4English<br>      word5Spanish   →   word5English<br>      <br>      If the topic is not found, respond with &#39;Topic not found.&#39; Provide only the list—no sentences or extra text.`,<br>    };<br><br>    const topicCompletion = await openai.chat.completions.create({<br>      model: &quot;gpt-3.5-turbo&quot;,<br>      messages: [<br>        topicMessage,<br>        { role: &quot;user&quot;, content: topic },<br>      ],<br>    });</pre><p>In this feature, the user provides any word related to the topic they would like to have a conversation about. The bot then generates a list of five words in Spanish, each with its English translation. When writing the prompt, we can include an example of how the response should look, and the GPT model is able to follow it closely. That’s how it works in practice:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*SOXozmegdL6ZjIngukECgQ.png" /></figure><p>With all three features combined, the user can have a chat with a bot that imitates a real person while also having access to the dictionary and topic features on the same page. This makes the experience much smoother and helps the student stay focused on improving their skills without switching to other pages. For example, I could add support for other languages. However, as my very first attempt at building AI functionality, I think this was a great starting point.</p><p>I also hope that my journey with <em>Chaté a me</em> will encourage some of my colleagues to build their own applications. Getting started with AI is easier than you might think, and I can’t wait to see great ideas turned into fun and practical projects.</p><p>Feel free to visit my GitHub page if you’d like to clone the project and try it yourself, or if you want to watch the full demo video.</p><p><a href="https://github.com/Albert-S2/chateame">https://github.com/Albert-S2/chateame</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=898b195ef6c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>