<?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 Kristjan Eljand on Medium]]></title>
        <description><![CDATA[Stories by Kristjan Eljand on Medium]]></description>
        <link>https://medium.com/@eljand?source=rss-89e9cc88ab40------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*IYHanxejEYJRIIYQ</url>
            <title>Stories by Kristjan Eljand on Medium</title>
            <link>https://medium.com/@eljand?source=rss-89e9cc88ab40------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 07:43:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@eljand/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[AI Training Simplified: The Essential Mathematics Explained]]></title>
            <link>https://medium.com/data-science/ai-training-simplified-the-essential-mathematics-explained-3a94ebeb4a3e?source=rss-89e9cc88ab40------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a94ebeb4a3e</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[ai-training]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Kristjan Eljand]]></dc:creator>
            <pubDate>Sat, 06 Jul 2024 01:04:15 GMT</pubDate>
            <atom:updated>2024-07-06T01:04:15.340Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FupnzKDigWlpz4RThSA8cQ.jpeg" /><figcaption>Image by author</figcaption></figure><h4>An Illustrated Overview of Mathematical Logic Used in AI Training</h4><p>It’s always beneficial to understand how things work. In this article, I will provide a very simple overview of the basic mathematical logic used in training AI models. I promise that if you have a basic education, the following examples will be understandable, and you’ll gain a slightly better understanding of the field of artificial intelligence.</p><h3>Creating an AI for Sales Forecasting</h3><p>Let’s assume we want to create a new AI model to forecast our company’s sales revenue. We have data on the sales revenue of the past two months, advertising costs, and product prices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*i8u52lr6gGPBu2XF" /><figcaption>Illustration by author</figcaption></figure><p>In other words, we want to create a model that tells us how our sales revenue depends on the price of our product and the advertising expenses. Using such a tool, a marketing specialist could, for example, calculate the expected sales revenue if they spend €50 on advertising and set the product price at €6.</p><h3>AI as a Mathematical Formula</h3><p>At its core, AI is nothing more than a mathematical formula (or a set of formulas). Our sales forecasting example could be presented as a mathematical formula like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ROeiPOIqd9PTctos" /><figcaption>Illustration by author</figcaption></figure><p>The formula exists, but we don’t know the values to assign to the model’s parameters m and n. In other words, we don’t know how much increasing advertising costs and adjusting the product price affects our sales revenue.</p><h3>Starting to Learn</h3><p>When we start training the AI, we can assign random values to the model’s parameters. For example, we initially set the advertising cost parameter to 2 and the price parameter to -2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bpLrKVC67vjUwEnK" /><figcaption>Illustration by author</figcaption></figure><p>Now, we simply try it out. If we multiply the advertising cost and product price by their respective parameter values, we see that our initial model is overly optimistic. In the first month, the actual sales revenue was €5, but our model predicted €30. In the second month, the actual sales revenue was €18, and our model predicted €52.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*n5PoHV5uYJRcqeyd" /><figcaption>Illustration by author</figcaption></figure><h3>The Learning Rule</h3><p><strong>If the error is 0</strong>, the model is perfect, and no adjustment is needed.</p><p><strong>If the error is &gt; 0</strong>, the model gave an overly optimistic result:</p><ul><li>Decrease the weights (parameters) if the corresponding input feature (e.g., advertising cost or product price) has a positive value.</li><li>Increase the weights (parameters) if the corresponding input feature has a negative value.</li></ul><p><strong>If the error is &lt; 0</strong>, the model was too pessimistic:</p><ul><li>Increase the weights (parameters) if the corresponding input feature has a positive value.</li><li>Decrease the weights (parameters) if the corresponding input feature has a negative value.</li></ul><p>Following the learning rule, we need to decrease both parameters because both advertising cost and product price have positive value<a href="https://tehisintellekt.ee/artiklid/keeruline-lihtsaks-matemaatika-millega-tehisintellekt-opib/">.</a> For instance, we reduce the advertising cost weight from 2 to 1 and the price parameter from -2 to -3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bqq5i4d0yTWigcXu" /><figcaption>Illustration by author</figcaption></figure><p>If we recalculate, we see that our model now predicts accurately. Great, our first manually trained AI model is ready.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*j6uy9nj0yFKyUlHp" /><figcaption>Illustration by author</figcaption></figure><h3>Testing the Model on Data Not Used for Training</h3><p>If you think the above model is too good to be true, you are correct. Our model worked perfectly on the training data. To assess the model’s accuracy, it must be tested on data that wasn’t used in the training process.</p><p>We trained our model on data from January and February. Now, let’s check how well the model can predict the sales revenue for March and April.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LWbyxjMe8rQrOSNo" /><figcaption>Illustration by author</figcaption></figure><p>From the table above, we see that the model predicts the sales revenue for March as €28 (actual €24) and for April as €21 (actual €18). On average, our model makes an error of €3.5 on new data, which we can call the accuracy of our model.</p><h3>Conclusion</h3><p>In conclusion, AI at its core is a mathematical formula. In our example, the formula had two parameters; the GPT-4 model has more than a trillion (<em>1 trillion = 1,000,000,000,000</em>) parameters. Both are trained on the same principle: gradually adjusting the model’s parameters to reduce the error.</p><p>It is also important to remember that AI learns on training data, but its accuracy can only be assessed using data not used during training (test data).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a94ebeb4a3e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/ai-training-simplified-the-essential-mathematics-explained-3a94ebeb4a3e">AI Training Simplified: The Essential Mathematics Explained</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How the Largest (2731 Teams) Energy Data Hackathon Was Born]]></title>
            <link>https://eljand.medium.com/how-the-largest-2731-teams-energy-data-hackathon-was-born-a77fd29f5083?source=rss-89e9cc88ab40------2</link>
            <guid isPermaLink="false">https://medium.com/p/a77fd29f5083</guid>
            <category><![CDATA[energy]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[green-energy]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Kristjan Eljand]]></dc:creator>
            <pubDate>Thu, 04 Apr 2024 12:06:33 GMT</pubDate>
            <atom:updated>2024-04-08T08:39:00.336Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WatJD2El3Xo-19ne" /><figcaption>Image by Author with the help of Midjourney</figcaption></figure><p>2731 teams from 110 countries participated in the <a href="https://www.kaggle.com/competitions/predict-energy-behavior-of-prosumers/overview"><strong>Enefit energy forecast competition</strong></a>, making it the largest energy data hackathon ever (measured by the number of participating teams). In this article, I write as honestly as possible about what needed to be done to carry out such an initiative in a large organization.</p><h3>Organizing the Competition</h3><p>Predicting the energy behavior of small producers (a household or a business that consumes electricity from the grid and also produces it with solar panels) is difficult. This creates problems for the energy company, as the consumed and produced electricity must always be balanced in the network, and any imbalance incurs costs for the company.</p><p>Consequently, the idea of organizing an international data science competition to improve forecast accuracy was proposed in the summer of 2022. Unlike a typical tender where one contractor is selected and hoped for the best, the hackathon format is like a reverse tender — all bidders do the work, but only the best are paid.</p><blockquote>The hackathon format is like a reverse tender — all bidders do the work, but only the best are paid.</blockquote><p>The idea was initially foreign to the organization and did not find support. However, there was no active opposition either, and the decision was made to organize a community competition (without price money) to prove the format’s viability. The test competition (<a href="https://www.kaggle.com/competitions/predict-electricity-consumption?rvi=1">Journey to zero — predict energy consumption</a>) was successful: 36 teams and 65 competitors participated and the winner was hired by the company.</p><p>The test competition showed that 1) the international data science community is interested in energy topics and 2) a hackathon can, under the right circumstances, be a way to recruit new talent.</p><p>Thanks to these results, it was easy to find support for organizing a larger competition among leaders and specialists at the beginning of 2023. <strong>But… support does not yet mean that the project is funded</strong>. Every large organization has established rules for project financing. As you can imagine, these rules do not include a chapter on organizing an international hackathon on a digital platform. Therefore, the following six months were spent agreeing on a financing model compatible with the rules and obtaining a funding decision. At this point, Enefit’s leaders demonstrated vision and faith in the innovative project’s implementation, and by the beginning of summer 2023, the project had the green light.</p><p>The final organizational challenge was aligning Enefit’s and Kaggle’s plans. While community competitions can be organized on Kaggle’s platform at any convenient time, prize money competitions must follow Kaggle’s work queue. Our initial desire was to start the competition in the middle of summer, but due to the queue, the hackathon’s start had to be moved to the fourth quarter of the year. The competition’s active period is now over, and we can discuss the initial results.</p><h3><strong>Results</strong></h3><p>The Enefit energy forecast hackathon is divided into two periods: a) a three-month competition period (November 2023 — January 2024), during which data scientists could train their models and submit solutions, and b) a three-month evaluation period (February — April 2024), during which models can no longer be improved, and the quality of the submitted models is assessed on new data. Today, we can highlight the competition’s statistics:</p><ul><li><strong>Number of participating teams</strong>: 2,731;</li><li><strong>Number of submitted solutions</strong>: 60,626; P</li><li><strong>Participating countries</strong>: 110 (top 5: Japan 17%, China 13%, USA 10%, Korea 6%, India 6%);</li><li><strong>Public code examples</strong>: 388;</li><li><strong>Forum topics</strong>: 316 topics and 858 posts;</li><li><strong>Page views</strong>: 1.65 million.</li></ul><p>The goal at the start of the competition was to involve 300 data science teams worldwide. To our surprise, this goal was exceeded more than ninefold. The participation of 2731 teams makes this one of the largest hackathons a European company has ever organized. The large number of participating countries also shows that the competition achieved a truly international reach. In total, the competition page was visited 1.65 million times during the competition period, a significant number even just for promoting the company’s brand.</p><p>From the perspective of data science and the energy sector, it is important that competitors submitted nearly 400 code notebooks with their solutions. These are open to all (link) and contribute significantly to the science of energy forecasting. There was also active discussion in the data scientist forum, where many tips for best practices and previous scientific work in the field can be found.</p><blockquote>An international hackathon can simultaneously be a tool for solving real challenges, brand creation, and advancing applied science.</blockquote><p>In conclusion, it can be noted that executing projects that require “out-of-the-box” thinking in a large organization demands time and patience from the project manager and vision and innovation from the leaders, but it is possible to achieve “out-of-the-box” results.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a77fd29f5083" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developing a Company-Specific ChatGPT is One-Third Technology and Two-Thirds Process Improvements]]></title>
            <link>https://medium.com/data-science/developing-a-company-specific-chatgpt-is-one-third-technology-and-two-thirds-process-improvements-2c6b4adf637f?source=rss-89e9cc88ab40------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c6b4adf637f</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[application]]></category>
            <dc:creator><![CDATA[Kristjan Eljand]]></dc:creator>
            <pubDate>Sat, 18 Nov 2023 06:12:30 GMT</pubDate>
            <atom:updated>2023-11-18T06:12:30.305Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*5sQz70PhUyM21U0hdI3Z0Q.png" /><figcaption>Image by Author</figcaption></figure><h4>A practical overview of the processes, roles, and complexities involved in the development of a GPT-based virtual assistant</h4><p>Throughout 2023, we have been developing a GPT-model-based virtual assistant for the employees of Enefit (one of the largest energy companies in the Baltics). In the first article (<a href="https://www.linkedin.com/pulse/developing-company-specific-chatgpt-forenefit-kristjan-eljand">read here</a>), I overviewed the problem, development process, and initial results. In this article, I will delve into the significance of the non-technology related challenges in developing a virtual assistant.</p><h3>Introduction</h3><p>At the beginning of 2023, it was clear that a breakthrough had occurred in the technology of large language models. Unlike the chatbots from the past decade that often disappointed users by the second or third question, ChatGPT came out as precise, versatile, and genuinely helpful. The decision by OpenAI and Microsoft to offer programmatic access to their GPT models, through an open API service, created the opportunity to implement company-specific use cases.</p><p>We approached the Enefit virtual assistant project knowing that the base technology was ready, internal interest was high, and the software development challenge that, while novel and complex, was achievable with good specialists.</p><p>In the early stages of development, this narrative proved correct: nearly 80% of the project activities consisted of software development tasks, and 20% were non-technology related activities. As the project progressed, these proportions changed drastically, leading to the need for entirely new processes and roles.</p><h3>Data/Information governance 2.0</h3><p>A virtual assistant can provide company-specific information only as accurately as the underlying documents permit. In other words, if the foundational documents contain incorrect, poorly structured, or outdated information, the virtual assistant can’t provide much better answers. This is commonly referred to as the GIGO (garbage in, garbage out) principle, which sets fundamental limits to AI capabilities.</p><p>Therefore, a significant part of building a virtual assistant is ensuring the quality of the data/information. This includes:</p><ul><li>Assigning an owner to every document/information group who will be responsible for the accuracy of the information.</li><li>Agreeing on a feedback mechanism that allows virtual assistant users to report bad answers or misinformation.</li><li>Establishing a feedback management process to ensure that user feedback reaches the information owner and is acted upon.</li></ul><p>Essentially, this means that all parties are involved in data management: users who provide continuous feedback and data owners responsible for responding to that feedback.</p><p>Document owners can also contribute to improving how the virtual assistant finds the information under their purview by enriching document sections with keywords, testing the virtual assistant’s accuracy, restructuring content when necessary, testing, improving, testing, improving, … In essence, information owners should view the virtual assistant as a colleague with whom they need to collaborate!</p><p>To conclude this section, I’ll touch upon Microsoft’s new Copilot. At the moment, all eyes are on the launch of Copilot. Most tech enthusiasts have watched the demo videos and expect it to be a plug-and-play product that semi-magically provides good answers to company-related questions. However, this expectation will likely lead to disappointment, as even Copilot isn’t immune to the GIGO principle.</p><p>Looking beyond Copilot’s marketing videos, we find extensive documentation on document management requirements. In summary, Microsoft expects that (<a href="https://learn.microsoft.com/en-us/training/modules/implement-microsoft-365-copilot/3-prepare-your-data-copilot-searches">read more</a>):</p><ul><li>All outdated documents will be deleted.</li><li>All documents should contain accurate and relevant information.</li><li>Companies should establish a new data governance process to ensure the above.</li><li>Documents should be enriched with keywords to enhance the search.</li></ul><p>These are high requirements, especially when we’re talking about documents stored on employees’ computers.</p><p>To be clear, I consider Copilot a fantastic new technology. However, it’s crucial to emphasize that no virtual assistant technology can be successfully implemented without a data governance process.</p><h3>Guiding the Virtual Assistant</h3><p>Large pre-trained language models (e.g., GPT, Llama) are robotic logic machines. This means that if we want them to fulfill a specific role (e.g., executive assistant, contract assistant, legal expert), we need to guide them and provide style examples.</p><p>Directing the virtual assistant means giving the language model both the user’s question and a response guide. For example, “<em>You are a virtual assistant of Enefit who knows about company policies and rules. If you can’t find the answer in the available information, say you don’t know…</em>”</p><p>With this type of guidance, we can instruct the virtual assistant on how to behave, dictate the format it should use to respond, and highlight what it should avoid.</p><p>However, a general guide is often insufficient. For instance, a company may want the virtual assistant to follow a specific style (formal, friendly, etc.). In such cases, style examples, which are essentially question-answer pairs, can be provided. As language models are trained to continue existing text, the virtual assistant tries to answer user questions similarly to the provided style examples.</p><p>Creating response guides and style examples, testing different versions, and refining them constitutes the third significant part of virtual assistant development.</p><p>The ‘Virtual Assistant Trainer/Guide’ role is entirely new and can be effectively filled only by someone knowledgeable in the domain for which the virtual assistant is created. Effective development of the virtual assistant necessitates close collaboration among software developers, information owners, and the virtual assistant trainer, since the cause of each ‘poor’ response could lie with different specialists.</p><h3>Conclusion</h3><p>Developing a chatbot that functions at 80% efficiency is easy with today’s technologies, but creating a virtual assistant with 95% quality is a complex task.</p><p>At first glance, one might think that 80% is sufficient, so why go through so much trouble for the last 20 percentage points? In reality, based on the experience of the past decade with chatbots, we know that a chatbot that is precise 80% of the time does not surpass the “cognitive usefulness threshold” of users.</p><p>This cognitive usefulness threshold is a hidden benchmark that exists in all our minds, but we cannot precisely define where this limit lies. However, using technology, we quickly understand whether or not this limit has been crossed. If the quality of the technology falls below this threshold, we will completely abandon the use of the given technology.</p><p>In other words, the difference between 80% and 95% lies in the fact that in the first case, no one will start using this technology, and in the second case, it becomes an everyday assistant for many employees.</p><blockquote><em>The difference between 80% and 95% accuracy lies in the fact that in the first case, no one will start using this technology, and in the second case, it becomes an everyday assistant for many employees!</em></blockquote><p>To achieve this last 15–20%, it is necessary to implement a data management system that ensures the relevance of the foundational information, create new roles and processes associated with the development of the virtual assistant, train all parties on the new technology, and support the implementation and adoption at both strategic and operational levels. Therefore, technology only constitutes 1/3 of the virtual assistant development, while organizational and process-related challenges make up the remainder.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c6b4adf637f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/developing-a-company-specific-chatgpt-is-one-third-technology-and-two-thirds-process-improvements-2c6b4adf637f">Developing a Company-Specific ChatGPT is One-Third Technology and Two-Thirds Process Improvements</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developing a company-specific chatGPT for Enefit]]></title>
            <link>https://medium.com/enefitit/developing-a-company-specific-chatgpt-for-enefit-135ae5c0f653?source=rss-89e9cc88ab40------2</link>
            <guid isPermaLink="false">https://medium.com/p/135ae5c0f653</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[hr]]></category>
            <category><![CDATA[virtual-assistant]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Kristjan Eljand]]></dc:creator>
            <pubDate>Fri, 06 Oct 2023 08:28:05 GMT</pubDate>
            <atom:updated>2023-10-06T08:28:05.448Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fo0cSGK8bK54DjHJC8HkLg.jpeg" /><figcaption>Image by Author with the assistance of DALL E</figcaption></figure><p><em>An overview of developing and measuring a value of a company-specific chatGPT for the employees of a large energy company</em></p><h3>Problem</h3><p><a href="https://www.enefit.com/home">Enefit </a>is one of the largest energy companies in the Baltics, employing over 5,000 people and operating in five different markets (Estonia, Latvia, Lithuania, Poland, and Finland). Over the decades, the document base directed at the company’s employees has grown to thousands of documents (strategy, rules, procedures, process descriptions, guidelines, etc.), and <strong>ideally, employees should be aware of all of them</strong>.</p><p>When we asked employees to measure the time it takes to find answers to company-related questions, the results were as follows:</p><ul><li><strong>On average, it takes 18 minutes</strong> to find answers from internal documents (median);</li><li>For about 10% of the questions, it takes an hour or more to get an answer (waiting for a response from a manager or colleague);</li><li><strong>For about 5% of the questions, no answer is ever received</strong> (searched for a couple of hours and then given up).</li></ul><p>Thus, <strong>it can be said that employees are unable to navigate the maze of orders, rules, and guidelines. As a result, efficiency is lower than it could be</strong>, and the execution of processes deviates from the ideal.</p><blockquote><em>If an employee has to search for answers to an average of two questions per day, they spend more than 150 working hours per year on this activity (i.e., 252 working days </em>2 questions <em>18 minutes = 9072 minutes or 151 working hours).</em></blockquote><h3>Development process</h3><p>To address the problem, we began developing a custom ChatGPT for the company this spring. The goal was to create a solution based on GPT language models <strong>that could answer any question about the company’s operations</strong>, whether it’s about strategy, processes, or health insurance.</p><p>At the beginning of the development activity, we lacked an understanding of the feasibility of creating such technology. Therefore, we followed the <strong>Plan-Develop-Learn</strong> principle, where users test each step of the development, and based on their feedback, the subsequent development tasks are defined:</p><ol><li><strong>Plan </strong>— formulate a development hypothesis you want to test;</li><li><strong>Develop </strong>— carry out the necessary developments;</li><li><strong>Learn </strong>— test the developments on users and summarize the results.</li></ol><p>The project’s scope and the number of testers grew with each iteration. The goal of the first iteration was to test whether it’s fundamentally possible to create a company-specific ChatGPT that could provide answers based on our own documents.</p><p>In the second phase, we focused on documents from a specific area and included specialists familiar with those documents as testers. The aim was to prove that artificial intelligence can provide answers that are logical for specialists.</p><p>In the third phase, we expanded the document base, feeding the system all the documents directed at employees, and increased the number of testers to about 80. These <strong>testers were selected from 14 different units and all five home markets</strong>.</p><p>In the final phase, the document base will no longer be expanded, and the chatbot will be implemented.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sCKPsvOZSHOIuk2AJ3-C2w.png" /><figcaption>The development process of company-specific virtual agent (illustration by Author)</figcaption></figure><h3>How It Works !?</h3><p>The developed virtual assistant operates on the RAG (Retrieval Augmented Generation) principle. First, we’ll look for the relevant pieces of information from the vector database. Then, the GPT model composes an answer. The generalized workflow is illustrated in the following diagram:</p><ol><li>Users pose questions through the Microsoft Teams interface — a conversation with the virtual assistant can be initiated like a chat with a team member.</li><li>Semantic search is used to find documents that are most likely related to the user’s question.</li><li>Relevant documents, along with the question and answering guidelines, are sent to the GPT-4 model.</li><li>The answer provided by the GPT-4 model is sent to the user.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zSr5QpyGzjOs8kF09iCcFA.png" /><figcaption>The workflow of GPT-based retrieval augmented generation (Illustration by Author)</figcaption></figure><h3><strong>Initial results</strong></h3><p>Throughout the project, we have learned a lot. Here are some of the most significant and interesting discoveries:</p><ul><li>With the help of a virtual assistant, it takes an average of 30 seconds to find answers from internal documents. This means a time-saving of 17.5 minutes for each question (without the virtual assistant, the time taken was an average of 18 minutes).</li></ul><blockquote>If an employee has to search for an answer to two questions per day, they save over 140 working hours a year (i.e., 252 working days * 2 questions * 17.5 minutes saved = 8820 minutes or 147 working hours).</blockquote><ul><li>The <strong>virtual assistant offers potential to elevate document management to a new level</strong> — we’ve repeatedly seen during tests how the chatbot points out outdated documents that the document owner should update.</li><li>This technology changes existing habits, meaning its successful adoption is critically dependent on implementation and training for both employees and document owners.</li></ul><h3>Conclusion</h3><p>This was a brief overview of the project to create a customized chatbot for Enefit — an energy company with more than 5000 employees in 5 home markets. I will write more about various aspects of the project in the future: testing, measured value, challenges, and our vision for the solution.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=135ae5c0f653" width="1" height="1" alt=""><hr><p><a href="https://medium.com/enefitit/developing-a-company-specific-chatgpt-for-enefit-135ae5c0f653">Developing a company-specific chatGPT for Enefit</a> was originally published in <a href="https://medium.com/enefitit">enefitit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ettevõttespetsiifilise chatGPT arendamine Eesti Energia töötajatele]]></title>
            <link>https://medium.com/enefitit/ettev%C3%B5ttespetsiifilise-chatgpt-arendamine-eesti-energia-t%C3%B6%C3%B6tajatele-5dbf9fc78612?source=rss-89e9cc88ab40------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dbf9fc78612</guid>
            <category><![CDATA[vestlusrobot]]></category>
            <category><![CDATA[tehisintellekt]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[virtual-assistant]]></category>
            <category><![CDATA[chatbots]]></category>
            <dc:creator><![CDATA[Kristjan Eljand]]></dc:creator>
            <pubDate>Mon, 02 Oct 2023 09:29:06 GMT</pubDate>
            <atom:updated>2023-11-17T09:25:58.678Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fo0cSGK8bK54DjHJC8HkLg.jpeg" /></figure><p>Ülevaade GPT-mudelitel põhineva virtuaalse assistendi arendamisest Eesti Energia töötajatele</p><h3>Probleemipüstitus</h3><p>Eesti Energia on Baltikumi üks suurimaid energeetikaettevõtteid, kus töötab enam kui 5000 töötajat ja mis tegutseb viiel erineval turul (Eesti, Läti, Leedu, Poola ja Soome). Aastakümnete jooksul on ettevõtte töötajatele suunatud dokumendibaas kasvanud tuhandete dokumentide suuruseks (strateegia, reeglid, korrad, protsessikirjeldused, juhendid, jmt) ning ideaalis võiksid töötajad sellest kõigest teadlikud olla.</p><p>Kui me palusime töötajatel mõõta aega, mis kulub ettevõtet puudutavatele küsimustele vastuse leidmiseks, olid tulemused järgmised:</p><ul><li><strong>keskmiselt kulub sisedokumentidest vastusete leidmiseks 18 minutit (mediaan);</strong></li><li><strong>ca 10%-le küsimustele vastuse saamiseks kulub tund või rohkem</strong> (oodatakse vastust juhilt või kollegilt);</li><li><strong>ca 5%-le küsimustest ei saadagi vastust</strong> (otsitakse paar tundi ja seejärel loobutakse).</li></ul><p>Seega võib öelda, et <strong>töötajad ei suuda kordade, reeglite ja juhendite labürindis orienteeruda. Selle tulemusena on efektiivsus madalam, kui see võiks olla</strong> ning protsesside teostus hälbib ideaalist.</p><blockquote>NB: Kui töötaja peab otsima vastust keskmiselt kahele küsimusele päevas, kulub tal aastas sellele tegevusele enam kui 150 töötundi (s.o 252 tööpäeva * 2 küsimust * 18 minutit = 9072 minutit ehk 151 töötundi)</blockquote><h3>Lahenduse väljatöötamine</h3><p>Probleemi adresseerimiseks alustasime käesoleval kevadel ettevõttele kohandatud chatGPT loomist. Eesmärgiks oli luua GPT-keelemudelitel põhinev lahendus, mis <strong>oskaks vastata kõigile küsimustele ettevõtte toimimise kohta, </strong>olgu selleks strateegia, protsessid või tervisekindlustus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a2b5ZncMA-wMQDUDb8wgFA.png" /><figcaption>Näide Eesti Energia töötajate virtuaalse assistendi toimimisest. Antud näites on ettevõttesiseseks tarbimiseks mõeldud info peidetud.</figcaption></figure><p>Arendusetegevuse alguses puudus meil arusaam sellise tehnoloogia loomise võimalikkuse osas ning seetõttu järgisime <strong>Plaani-Arenda-Õpi </strong>põhimõtet, kus kasutajad testivad arenduse igat sammu ja nende tagasiside põhjal defineeritakse järgnevad arendusülesanded:</p><ol><li><strong>Plaani </strong>— püstita arendushüpotees, mida soovid testida;</li><li><strong>Arenda </strong>— teosta vajalikud arendused;</li><li><strong>Õpi</strong> — testi arendusi kasutajate peal ning tee tulemustest kokkuvõte.</li></ol><p>Igas arendustsüklis kasvas projekti skoop ja testijate arv. Arenduse esimese iteratsiooni eesmärgiks oli testida, kas põhimõtteliselt on võimalik luua ettevõttele kohandatud chatGPT, mis suudaks anda vastuseid meie enda dokumentide kohta.</p><p>Teises faasis võtsime ette ühe konkreetse valdkonna dokumendid ning testijatena kaasasime antud dokumente hästi tundvad spetsialistid. Eesmärgiks oli tõestada, et kas tehisintellekt suudab anda vastuseid, mis on spetsialistide jaoks loogilised.</p><p>Kolmandas faasis laiendasime dokumendibaasi, andes süsteemile ette kõik dokumendid, mis on töötajatele suunatud ja suurendasime testijate arvu ca 80-ni. Seejuures on testijad valitud 14. erinevast üksusest ning kõigilt viielt koduturult.</p><p>Viimases faasis dokumendibaasi enam ei laiendata ja toimub vestlusroboti juurutus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V5RDMyxBlQ4NQubGl68hIQ.png" /><figcaption>Eesti Energia virtuaalse assistendi arendusetapid</figcaption></figure><h3>Kuidas see töötab</h3><p>Loodud virtuaalne assistent töötab RAG (<em>Retrieval Augmented Generation</em>) põhimõttel, mille käigus otsitakse esmalt ettevõtte informatsiooni hulgast olulised infokillud ja seejärel lastakse GPT-mudelil koostada vastus. Protsessi üldistatud töövoog on esitatud järgneval joonisel:</p><ol><li>Kasutaja esitab küsimuse läbi Microsoft Teams’i kasutajaliidese — vestluse virtuaalse assistendiga saab avada nagu vestluse tiimikaaslasega;</li><li>Kasutaja küsimusele leitakse <a href="https://www.tehisintellekt.ee/artiklid/mis-on-semantiline-otsing">semantilise otsingu</a> abil dokumendid, mis kõige suurema tõenäosusega seonduvad antud küsimusega;</li><li>Relevantsed dokumendid, koos küsimuse ja vastamisjuhendiga saadetakse GPT-4 mudelile;</li><li>GPT-4 mudeli poolt antav vastus saadetakse kasutajale.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_JkGrh2UE0QRYQObDbyJmA.png" /><figcaption>Ettevõttele kohandatud chatGPT tööpõhimõte</figcaption></figure><h3>Esmased tulemused</h3><p>Oleme projekti käigus õppinud palju ning tõstan järgnevalt esile mõned olulisemad ja huvitavamad avastused:</p><ul><li>Virtuaalse assistendi abil kulub sisemistest dokumentidest vastuse leidmiseks keskmiselt 30 sekundit.<strong> See tähendab 17.5 minutilist aja kokkuhoidu iga küsimuse pealt</strong> (<em>ilma virtuaalse assistendita oli ajakulu keskmiselt 18 minutit</em>).</li></ul><blockquote>Kui töötaja peab otsima vastust keskmiselt kahele küsimusele päevas, säästab ta virtuaalse assistendi abil aastas <strong>enam kui 140 töötundi</strong> (s.o 252 tööpäeva * 2 küsimust * 17.5 minutit kokkuhoidu = 8820 minutit ehk 147 töötundi)</blockquote><ul><li><a href="https://www.tehisintellekt.ee/"><strong>Virtuaalne assistent</strong></a><strong> loob potentsiaali dokumendihalduse viimiseks uuele tasemele</strong> — oleme testide käigus korduvalt näinud, kuidas vestlusrobot näitab kätte aegunud dokumendid, mida dokumendi omanik peaks uuendama.</li><li>Tegemist on olemasolevaid harjumusi muutva tehnoloogiaga, mis tähendab, et selle eduka kasutuselevõtu kriitiliseks eduteguriks on juurutus ja koolitused nii töötajatele kui ka dokumentide omanikele.</li></ul><h3>Kokkuvõte</h3><p>See oli lühiülevaade Eesti Energiale kohandatud vestlusroboti loomise projektist. Kirjutan tulevikus lähemalt projekti erinevatest aspektidest: testimisest, mõõdetud väärtusest, keerukustest ja meie edasisest visioonist lahenduse osas.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dbf9fc78612" width="1" height="1" alt=""><hr><p><a href="https://medium.com/enefitit/ettev%C3%B5ttespetsiifilise-chatgpt-arendamine-eesti-energia-t%C3%B6%C3%B6tajatele-5dbf9fc78612">Ettevõttespetsiifilise chatGPT arendamine Eesti Energia töötajatele</a> was originally published in <a href="https://medium.com/enefitit">enefitit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Summary of the Energy Tech Summit 2023]]></title>
            <link>https://medium.com/enefitit/summary-of-the-energy-tech-summit-2023-fc50de3c7ccf?source=rss-89e9cc88ab40------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc50de3c7ccf</guid>
            <category><![CDATA[summary]]></category>
            <category><![CDATA[tech-summit]]></category>
            <category><![CDATA[energy]]></category>
            <category><![CDATA[sustainability]]></category>
            <category><![CDATA[decarbonization]]></category>
            <dc:creator><![CDATA[Kristjan Eljand]]></dc:creator>
            <pubDate>Tue, 09 May 2023 07:28:09 GMT</pubDate>
            <atom:updated>2023-05-09T07:28:09.053Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P3Nw9Rd6eVzSQSNFgXJKXA.png" /><figcaption>Image from the <a href="http://www.energytechsummit.com/">www.energytechsummit.com</a></figcaption></figure><p>Summarizing the top-50 contenders of the Energy Tech Summit 2023</p><p>Energy Tech Summit 2023 focused on decarbonization, attracting over 400 companies from 25 countries to participate in the competition. The jury handpicked the top 50 innovative firms to showcase their unique products and services on stage. In this article, I will summarize the contenders by giving a one-sentence summary about each company and exploring the top keywords that describe them.</p><h3>Exploring the top keywords</h3><p>When examining the contenders, I tried to extract keywords about each company and <strong>the number one keyword in the company descriptions seems to be sustainability</strong>. This includes sustainable powertrains, sustainable fuels, materials, and business practices.</p><p>The second and the third most popular keywords were decarbonization and green energy which includes activities like carbon emission reduction, carbon credits, hydrogen and clean energy generators.</p><p>Thirdly, there were at least 6 competitors focusing on AI &amp; analytics. This mainly includes AI supported services and various optimization algorithms.</p><p>Lastly, I would like to highlight the topic of biofuels. Several companies were focusing on the topic with the activities varying from building biofuel generators to producing various biofuels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ObEkgBxX_6T_TwFH7jzlBA.png" /><figcaption>Chart by author</figcaption></figure><p>Next, I’ll share you my list of single-sentence summaries about the top-50 companies with my subjective highlights.</p><h3>Decarbonizing long-haul freight 🚚💨💭🌱🌍</h3><p><strong>Here’s my subjective list of the most interesting companies</strong> who are tackling the challenge of decarbonizing long-haul freight:</p><ul><li><strong>Carnot Engines</strong> (<a href="https://carnotengines.com/">https://carnotengines.com/</a>) touches the idea that there is a room for a completely new engine design that enables to use sustainable fuels and burn them with up to 70% efficiency.</li><li><strong>Me energy</strong> (<a href="https://meenergy.earth/">https://meenergy.earth/</a>) produces mobile charging stations for electric vehicles, <strong>using bioethanol</strong> as a source of electricity. The charging stations, called Rapid Charger 150, have a system power of 150 kW and can charge two vehicles simultaneously.</li><li><strong>Optiyol</strong> (<a href="https://www.optiyol.com/">https://www.optiyol.com/</a>) provides the transportation route optimization software that is enhanced with monitoring and analytical solutions. So, optimization is the core product, but the mobile monitoring and anlalytics features make it a whole product.</li><li><strong>Transmetrics </strong>(<a href="https://www.transmetrics.ai/">https://www.transmetrics.ai/</a>) is also an optimization software provider that helps logistics companies optimize their resources. It predicts the demand of empty containers and trucks + predictive maintenance of assets.</li><li><strong>Trucknet</strong> is a logistics and transportation digital platform aimed at reducing freight costs by providing real-time visibility, CO2 emission calculation, and a system for selling unused space in trucks while adhering to high privacy standards. (<a href="https://www.trucknet.io/">https://www.trucknet.io/</a>)</li><li><strong>Vertoro</strong> is producing a new type of fuel made from waste woody biomass or technical lignin mixed with a solvent and heat, aiming to decrease carbon footprint without rising costs. (<a href="https://vertoro.com/">https://vertoro.com/</a> ) (<strong>was selected by Jury as a best in this group</strong>)</li></ul><p><strong>Other challengers in this group:</strong></p><ul><li><strong>EH Group Engineering</strong> is a Swiss-based company that specializes in fuel cell technology for clean energy generation, offering fuel cell stacks and systems and focusing on engineering and developing solutions in the energy sector. (https://www.ehgroup.ch/)</li><li><strong>Spark</strong> is a sustainable aviation fuels company focused on developing and producing e-fuels that will help achieve carbon-neutrality in aviation by 2050. (https://www.sparkefuels.com/)</li><li><strong>Swiss Airtainer</strong> specializes in providing sustainable temperature-controlled airfreight solutions for the pharmaceutical industry through (https://www.swissairtainer.com/)</li></ul><h3>Decarbonizing construction materials 🌱🏗️</h3><p>The main topic here is to take waste and recycle it into something that can be used as the construction material.</p><p><strong>My subjective list of highlights:</strong></p><ul><li><strong>Audette</strong> is a software that includes some of the similar functionalities as energy solution calculator — it aims to show how different assets in the building is using energy and generating emissions and tries to reflect of how much the new investment might save costs/emissions (<a href="https://audette.io/">https://audette.io/</a>).</li><li><strong>Hyperion robotics </strong>(<a href="https://www.hyperionrobotics.com/">https://www.hyperionrobotics.com/</a>) is 3D printing concrete elements. This enables to use more efficient designs of concrete elements and to reduce the usage of concrete up to 75% while keeping the structural strength the same. (<strong>Hyperion is the overall winner of the competition</strong>).</li><li><strong>Mixteresting </strong>(<a href="https://mixteresting.com/">https://mixteresting.com/</a>) is trying to use optimization and simulation to find the new concrete mixes (e.g. concrete mixed with wood) to reduce the cement usage and increase the use of materials that are net-neutral.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*vwmfBcysvU_UTkaDMow21g.png" /><figcaption>Novel concrete structure printed by the robot of Hyperion robotics (the winner of the event) (Image by Hyperion robotics).</figcaption></figure><p><strong>Other challengers:</strong></p><ul><li><strong>CAMBOND</strong> develops eco-friendly bio-adhesives and biocomposites to reduce pollution and plastics, and offers sustainable solutions with a joint venture company in China that pilots the manufacturing of homeware products. (https://cambond.co.uk/)</li><li><strong>Enerpaper</strong> provides sustainable, cost-effective insulation solutions through the use of recycled paper cellulose, offering multiple benefits to customers, buildings, and the environment. (https://www.enerpaper.com/)</li><li><strong>Kubik</strong> uses plastic waste to create low-carbon, eco-friendly buildings in the African market that are modular, easy to assemble, and have great insulation, while reducing the carbon and plastic footprint. (https://www.buildkubik.com/)</li><li><strong>Mineral Carbonation International</strong> develops and commercializes technology for carbon capture and storage by converting carbon dioxide into stable minerals. (https://www.mineralcarbonation.com/)</li><li><strong>Vestack</strong> specializes in creating modular buildings from sustainable and renewable materials, offering a digital co-design process, construction off-site, and on-site assembly to reduce carbon footprint and achieve faster project completion. (https://www.vestack.com/)</li></ul><h3>Battery value chain 🔋💰🚚💡</h3><p>The common trend amongst the companies that aim to make the battery value chain more sustainable is to recycle the used batteries to use them more than once.</p><p><strong>My highlights:</strong></p><ul><li><strong>Entrix</strong> — (<a href="https://www.entrixenergy.com/">https://www.entrixenergy.com/</a>) provides software to optimize the use of energy storage assets and to trade their flexibility. As such, it provides the functionalities of VPP and energy optimization. (w<strong>as selected by Jury as a best in this group</strong>)</li><li><strong>Inion </strong>— (<a href="http://www.inionsoftware.com/">www.inionsoftware.com</a>) predicting consumption and solar generation, includes integration to Nord Pool markets and optimizes the battery usage (direct comparison to EDS energy optimizer).</li><li><strong>CTRL ENERGY</strong> is a company that has developed LEPO, a reusable and wire-free battery design. The main point is that you can easily take the battery module apart, replace the old cells and put it back together. (<a href="https://lepo.tech/">https://lepo.tech/</a>) (add image)</li></ul><p><strong>Other challengers</strong>:</p><ul><li><strong>Circu Li-ion</strong> specializes in upcycling batteries to promote economical electrification, reduce CO2 emissions, and maximize the % of raw materials recovered through reuse while offering solutions for micromobility, power tools, and recyclers. (https://www.circuli-ion.com/)</li><li><strong>Daanaa</strong> develops sustainable energy solutions through advanced, integrated power transfer and provides proprietary chip-based technology for power transfer and data integration with existing hardware. (https://daanaa.com/)</li><li><strong>Evyon</strong> repurposes second-life EV batteries to create planet-friendly battery energy storage systems, maximizing the value of every battery for a fully renewable future while making an impact on four of the UN’s Sustainable Development Goals. (https://www.evyon.com/)</li><li><strong>Green Li-ion</strong> remanufactures Lithium-Ion batteries and waste using their world-first Green-HydrorejuvenationTM technology, and they have secured $20.5 million in pre-Series B funding from investors to expand globally and create a sustainable future. (https://www.greenli-ion.com/)</li><li><strong>Lina</strong> produces novel sodium batteries. (https://www.lina.energy/)</li><li><strong>Reefilla</strong> provides a mobile and predictive charging delivery service for electric vehicles, using Fillee, a mobile charging “power bank”, that refills up to 140km of battery life wherever the car is, while also using 100% green energy and second-life batteries to contribute to net-zero emissions. (https://www.reefilla.com/)</li><li><strong>Urban Electric Power</strong> designs and manufactures rechargeable batteries using zinc and manganese dioxide technology for residential, commercial, and utility applications with an aim to provide innovative and effective solutions to the world’s energy challenges. (https://urbanelectricpower.com/)</li></ul><h3>Enabling voluntary carbon markets 💚💰💡📈</h3><ul><li><strong>Agerpoint</strong> provides tools for better data on agriculture, forestry, and conservation by creating 3D models of crops and trees to understand plant health, yield, and biodiversity. (https://www.agerpoint.com/)</li><li><strong>Carbonbase</strong> offers carbon management solutions for measuring, reducing, and offsetting carbon emissions for individuals and enterprises. (https://www.carbonbase.co/)</li><li><strong>Carbon 27</strong> generates digital carbon credits from renewable projects and sells them through blockchain technology to bring profits to clean energy generators and reduce CO2 emissions. (https://carbon27.com/)</li><li><strong>Carbonfuture</strong> builds tech infrastructure for carbon removal efforts and offers carbon removal credits with third-party certifications and auditing. (https://www.carbonfuture.earth/)</li><li><strong>Greenly</strong> measures and reduces carbon footprint for businesses to transition towards a net-zero emissions future. (https://greenly.earth/)</li><li><strong>Powerstove</strong> produces and sells clean, smokeless cookstoves that generate electricity, using precision airflow system technology and incorporating IoT technology. (https://powerstove.africa/)</li><li><strong>Ureca</strong> is a marketplace for carbon credits that offers carbon offsetting from carefully selected and verified emissions reduction projects. (<a href="https://ureca.com/">https://ureca.com/</a>) (<strong>was selected by Jury as a best in this group</strong>)</li></ul><h3>Decarbonization of X 🌐🔌</h3><p><strong>My highlights:</strong></p><ul><li><strong>Arbnco</strong> offers a software platform that uses machine learning algorithms to analyze energy usage patterns (don’t explain what it means) and prioritize interventions for property owners and managers. (<a href="https://arbnco.co.uk/">https://arbnco.co.uk/</a>)</li><li><strong>HeyCharge</strong> provides a Smart EV Charging solution that works without internet connectivity, offering a white-label charging solution. The solution itself is that the charger connects to mobile phone over Bluetooth and mobile phone has the internet connection not the charger (<a href="https://www.heycharge.com/">https://www.heycharge.com/</a>)</li><li><strong>BluWave-ai</strong> providing software that includes predicting consumption and consumption and optimizing the single EV or EV fleet. Seems, that from the customer segmentation side they are a little bit unfocused. That said, they have already secured $9.5 million in Series A funding. (https://www.bluwave-ai.com/)</li><li><strong>IONATE</strong> is developing novel transformers (highly enriched with software) that enable to solve the distributed grid challenges on hardware level. (https://www.ionate.energy/)</li></ul><p><strong>Other challengers:</strong></p><ul><li><strong>3DC Inc.</strong> is a carbon materials startup that has developed Graphene Mesosponge, a new carbon material that accelerates battery evolution and offers tailor-made carbon materials through their unique Template Technique. (<a href="https://www.3dc.co.jp/en/">https://www.3dc.co.jp/en/</a>)</li><li><strong>GAFT </strong>(Green Air Fuel Technologies) is developing the first end-to-end patented solution to renewable jet fuel out of CO2 without using fossil fuels or food crops. (was selected by Jury as a best in this group)</li><li><strong>Boson Energy</strong> produces clean hydrogen from waste using <strong>gasification technology</strong>, with a goal to create carbon-negative, emission-free, and grid-independent energy solutions by completely recycling non-recyclable waste, and offering unique sector coupling opportunities. (https://bosonenergy.com/)</li><li><strong>Carbonauten NET Materials®</strong> produces eco-friendly materials combining technical biocarbon with various binders for use in industries such as plastics, agriculture, construction, and energy with better properties than many conventional materials and provides a platform for six carbon-reducing activities, contributing to the decarbonization of various industries. (https://carbonauten.com/)</li><li><strong>Greenwood-Power</strong> specializes in designing and manufacturing non-conventional instrument transformers for medium and low voltage applications, aiming to bring this technology into every segment of the energy grid, offering individual production tailored to the customer with short decision-making processes and fast implementation. (https://www.greenwood-power.com/)</li><li><strong>Tau Group</strong> develops and manufactures advanced electric motor technologies for e-mobility, focusing on copper winding wire, magnetic cores, and electrical steel for electric vehicles while promoting sustainability and providing real-time information for engineers. (https://tau.group/)</li><li><strong>Co-Energy</strong> is an Israeli start-up that offers technological solutions for waste treatment, converting waste into hydrogen, biochar, electricity, and fuel, with an aim to create a circular economy and achieve zero waste goals. (Link to website: <a href="https://co-energy.energy/)">https://co-energy.energy/)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc50de3c7ccf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/enefitit/summary-of-the-energy-tech-summit-2023-fc50de3c7ccf">Summary of the Energy Tech Summit 2023</a> was originally published in <a href="https://medium.com/enefitit">enefitit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tutorial of Python in Azure App Service]]></title>
            <link>https://medium.com/enefitit/tutorial-of-python-in-azure-app-service-ed348887dfc0?source=rss-89e9cc88ab40------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed348887dfc0</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[step-by-step-guide]]></category>
            <category><![CDATA[azure-app-service]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Kristjan Eljand]]></dc:creator>
            <pubDate>Wed, 22 Mar 2023 10:44:37 GMT</pubDate>
            <atom:updated>2023-06-07T10:26:29.009Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hzZ3wuJtOuo-IZhU" /><figcaption>Photo by <a href="https://unsplash.com/@element5digital?utm_source=medium&amp;utm_medium=referral">Element5 Digital</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Publish your code as a production-ready app without the traditional server setup</h4><h3>Introduction</h3><p><a href="https://learn.microsoft.com/en-us/azure/app-service/overview#app-service-on-linux">Azure App Service</a> is a fully managed platform for building, deploying, and scaling web apps. It supports a variety of programming languages, including Python, and allows you to focus on your code without worrying about server setup or management. In this tutorial, we will walk through the process of deploying a Python app in Azure App Service.</p><p><strong>NB: If you’re interested in Azure functions instead of Azure App Service, then you should check out </strong><a href="https://medium.com/towards-data-science/tutorial-of-python-azure-functions-81949b1fd6db"><strong>this tutorial</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2xgsYhBjZMAMapNczPIQzg.gif" /><figcaption>The output of our sample application.</figcaption></figure><h3>Step 0: Environment configuration</h3><p>If you haven’t used Azure services before, then the most time-consuming step is the environment setup. I’ll suggest having the following setup:</p><ol><li>An Azure account with an active subscription. <a href="https://azure.microsoft.com/free/?ref=microsoft.com&amp;utm_source=microsoft.com&amp;utm_medium=docs&amp;utm_campaign=visualstudio">You can create an account for free</a>.</li><li>Python version 3.9 or higher.</li><li><a href="https://code.visualstudio.com/">Visual Studio Code</a> on one of the supported platforms (<a href="https://code.visualstudio.com/docs/supporting/requirements#_platforms">take a look at the supported platforms</a>).</li><li>The <a href="https://marketplace.visualstudio.com/items?itemName=ms-python.python">Python extension</a> for Visual Studio Code.</li><li>The Azure tools extension for Visual Studio Code (find it under VS Code extensions and click install).</li></ol><p>As you see, there are four main steps which might take an hour of your time. Luckily, you just have to do them once.</p><h3>Step 1: Create the project folder</h3><p>Open terminal, create the project directory named “python-azure-app” and enter this directory:</p><pre>mkdir python-azure-app<br>cd python-azure-app</pre><h3>Step 2: Create a Virtual Environment and Install Dependencies</h3><p>To create a virtual environment, run the following command:</p><pre>python3 -m venv venv</pre><p>Activate the virtual environment using:</p><ul><li>On Windows: env\Scripts\activate</li><li>On macOS/Linux: source env/bin/activate</li></ul><p><em>Checkpoint: At this point, you should be located in “python-azure-app” folder and have your virtual environment activated</em>.</p><h3>Step 3: Create requirements.txt and install packages</h3><ol><li>Open VS code by typing code . in the terminal.</li><li>Create a new file named requirements.txt in your project directory and add Flask and requests into it. We’ll be later using requests to get data for our application.</li></ol><p>Your workspace should look similar to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8DKcztFqgOVSolAA3HA9Lg.png" /></figure><p>Install the dependencies:</p><pre>pip install -r requirements.txt</pre><h3>Step 4: Create &amp; run the app</h3><ol><li>Create a new directory and navigate to it using the command line. Inside the directory, create a new file called app.py and add the following code:</li></ol><pre>from flask import Flask<br><br>app = Flask(__name__)<br><br>@app.route(&#39;/&#39;)<br>def hello():<br>    return &quot;Hello, Azure!&quot;<br><br>if __name__ == &#39;__main__&#39;:<br>    app.run()</pre><p>2. Test the application through terminal by typing:</p><pre>flask run</pre><p>3. Open the application at <a href="http://127.0.0.1:5000/">http://127.0.0.1:5000/</a> in a web browser to ensure that everything works as expected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9a9XRi81Hf2Ptwgm7qJkkw.png" /><figcaption>The homepage of the sample application returns “Hello, Azure!”.</figcaption></figure><h3>Step 5: Enhance the application</h3><p>Let’s add some real custom logic to our application. In this tutorial, we’ll create an application that outputs today’s electricity prices in Baltic market.</p><ol><li>Create calculator.py file and add the code for querying the external electricity price API:</li></ol><pre>import requests<br>import datetime as dt<br><br>def get_baltic_electricity_prices():<br>    &quot;&quot;&quot;Get Baltic electricity prices for today&quot;&quot;&quot;<br>    today = dt.datetime.today()<br>    end_datetime = today.strftime(&quot;%Y-%m-%dT23:00Z&quot;)<br>    start_datetime = today.strftime(&quot;%Y-%m-%dT00:00Z&quot;) <br><br>    # Get raw data from Elering API<br>    api_url = &quot;https://dashboard.elering.ee/api/nps/price&quot;<br>    response = requests.get(<br>        url=api_url, <br>        params={&quot;start&quot;:start_datetime, &quot;end&quot;:end_datetime}<br>        ).json()<br><br>    return response</pre><p>2. Open app.py and change the initial code.</p><pre>from flask import Flask<br><br>from calculator import get_baltic_electricity_prices<br><br>app = Flask(__name__)<br><br>@app.route(&#39;/&#39;)<br>def get_prices():<br>    prices = get_baltic_electricity_prices()<br>    return prices<br><br>if __name__ == &#39;__main__&#39;:<br>    app.run()</pre><p>3. Rerun the application with flask run and open it at <a href="http://127.0.0.1:5000/">http://127.0.0.1:5000/</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qtQhHN3nT0NWPXdxCZ0Xxw.png" /><figcaption>The output of our enhanced application that returns Baltic electricity prices for today in JSON format.</figcaption></figure><h3>Step 6: Create an app service instance in Azure</h3><ol><li>In VS Code, click on Azure icon (<em>if you don’t see the icon, install Azure tools through VS Code extensions</em>).</li><li>Log-in to your Azure account.</li><li>Select + (Create Resource…).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1sa_C6aTa_QRo_iPMzcGhQ.png" /></figure><p>4. Choose the Create App Service Web App… option.</p><p>5. Enter the globally unique name for your app.</p><p>6. Select the Python version for your application (in our case, it is <strong>Python 3.9</strong>).</p><p>7. Select the app service plan (select <strong>Free </strong>for testing).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sh-K8-vkRskPe0QLBaO5Vw.png" /></figure><p>8. Select the <strong>Deploy </strong>button in the “<strong>Created new web app</strong>” notification.</p><p>9. Select the quickstart folder you are working in as the one to deploy.</p><p>10. Answer <strong>Yes </strong>to update your build configuration and improve deployment performance.</p><p>11. When the deployment is complete, a notification will appear in the lower right corner of VS Code. You can use this notification to browse to your web app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5jjzJfCcPfHPn6QSD53oaA.png" /></figure><h3>Step 7: Clean up resources</h3><p>When you’re finished with the sample app, you can remove all of the resources for the app from Azure.</p><p>In the Azure Tools extension for VS Code:</p><ol><li>Find the RESOURCES section.</li><li>Select the Group By icon and select Group by Resource Group.</li></ol><p>In the list of resources, find the resource group to delete, right-click it, and select <strong>Delete Resource Group</strong>…. You’ll be prompted to confirm the deletion by entering the name of the resource group in the dialog box.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed348887dfc0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/enefitit/tutorial-of-python-in-azure-app-service-ed348887dfc0">Tutorial of Python in Azure App Service</a> was originally published in <a href="https://medium.com/enefitit">enefitit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick overview: In 2022, home batteries became profitable in Estonian market]]></title>
            <link>https://medium.com/enefitit/quick-overview-in-2022-home-batteries-became-profitable-in-estonian-market-6e56a69c91fc?source=rss-89e9cc88ab40------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e56a69c91fc</guid>
            <category><![CDATA[energy-storage]]></category>
            <category><![CDATA[energy-market]]></category>
            <category><![CDATA[optimization]]></category>
            <dc:creator><![CDATA[Kristjan Eljand]]></dc:creator>
            <pubDate>Tue, 03 Jan 2023 09:48:05 GMT</pubDate>
            <atom:updated>2023-01-03T09:48:05.171Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QKmd5qOKyVmpvUFBcMBMwQ.png" /></figure><p>Large fluctuations in electricity prices have made home batteries profitable.</p><ul><li>It is possible to earn revenue, by charging the battery during cheap hours and discharging during expensive hours.</li><li>To make a profit, the difference between expensive and cheap electricity prices must be greater than the cost of the battery, network charges and taxes combined.</li><li>If we consider the cost of a 15 kWh battery to be €10,500*, then <strong>the difference between expensive and cheap electricity prices must be approximately 20 cents/kWh in order to make profit</strong>.</li><li><strong>In 2022 in Estonia, home batteries were profitable for the first time on an annual basis**</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LT-XzWZlJM892uAR6AfjVw.png" /><figcaption>To calculate the annual result, the three cheapest and the three most expensive hours of each day have been compared and the results have been averaged. (Image by the author).</figcaption></figure><p><em>* If a 15 kWh battery costs €10,500, the price of one kWh is €700. If the price of your battery is cheaper, the break-even point is also lower.</em></p><p><em>** In order to benefit from the difference in electricity prices, the battery must be managed with optimization software, such as Enefit uses for its customers.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e56a69c91fc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/enefitit/quick-overview-in-2022-home-batteries-became-profitable-in-estonian-market-6e56a69c91fc">Quick overview: In 2022, home batteries became profitable in Estonian market</a> was originally published in <a href="https://medium.com/enefitit">enefitit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kiire ülevaade: 2022. aastal muutusid koduakud kasumlikuks]]></title>
            <link>https://medium.com/enefitit/kiire-%C3%BClevaade-2022-aastal-muutusid-koduakud-kasumlikuks-388778a1cf42?source=rss-89e9cc88ab40------2</link>
            <guid isPermaLink="false">https://medium.com/p/388778a1cf42</guid>
            <category><![CDATA[energiakulud]]></category>
            <category><![CDATA[elekter]]></category>
            <category><![CDATA[energia]]></category>
            <category><![CDATA[enefitit]]></category>
            <dc:creator><![CDATA[Kristjan Eljand]]></dc:creator>
            <pubDate>Thu, 29 Dec 2022 10:25:00 GMT</pubDate>
            <atom:updated>2022-12-29T10:25:00.545Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QKmd5qOKyVmpvUFBcMBMwQ.png" /></figure><p>Elektrihindade suured kõikumised on muutnud koduakud kasumlikuks.</p><ul><li>Laadides akut odavatel ning tühjendades kalli hinnaga tundidel, on võimalik teenida tulu.</li><li>Kasumi saamiseks peab kallite ja odavate elektrihindade vahe olema suurem kui aku kulu, võrgutasud ja maksud kokku.</li><li>Kui arvestame 15 kWh aku maksumuseks 10 500 €*, siis <strong>kasumi saamiseks peab kallite ja odavate elektrihindade vahe olema ligikaudu 20 senti/kWh</strong>.</li><li><strong>2022. aastal olid koduakud esimest korda aastases lõikes kasumlikud</strong>**.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UIGAei1LV8poNoKp39wyEQ.png" /><figcaption>Aastase tulemuse arvutamiseks on võrreldud iga päeva kolme odavamat ja kallimat tundi ning tulemused on keskmistatud. (Autori koostatud).</figcaption></figure><p><em>* Kui 15 kWh aku maksab 10 500 €, siis ühe kWh hind on 700 €. Kui sinu aku hind on odavam, on ka tasuvuslävi madalam.</em></p><p><em>** Selleks, et elektrihindade erinevuselt kasu lõigata, tuleb akut juhtida optimeerimistarkvaraga nagu näiteks teeb Eesti Energia oma koduaku klientide puhul.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=388778a1cf42" width="1" height="1" alt=""><hr><p><a href="https://medium.com/enefitit/kiire-%C3%BClevaade-2022-aastal-muutusid-koduakud-kasumlikuks-388778a1cf42">Kiire ülevaade: 2022. aastal muutusid koduakud kasumlikuks</a> was originally published in <a href="https://medium.com/enefitit">enefitit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Training an Energy Decision Agent With Reinforcement Learning]]></title>
            <link>https://medium.com/data-science/training-an-energy-decision-agent-with-reinforcement-learning-a7567b61d0aa?source=rss-89e9cc88ab40------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7567b61d0aa</guid>
            <category><![CDATA[energy-efficiency]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[energy]]></category>
            <category><![CDATA[optimization]]></category>
            <dc:creator><![CDATA[Kristjan Eljand]]></dc:creator>
            <pubDate>Wed, 23 Nov 2022 15:56:04 GMT</pubDate>
            <atom:updated>2022-11-23T15:56:04.027Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ta6yOf5C-qt6wxzJ" /><figcaption>Photo by <a href="https://unsplash.com/@federize?utm_source=medium&amp;utm_medium=referral">Federico Beccari</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>High-level overview of the setup, training process and the results</h4><p>Real-world reinforcement learning applications are hard to find. This article gives a <strong>high-level overview of building an RL agent aimed to optimize the energy use</strong>. The article is divided into following sections:</p><ol><li><strong>Problem setting</strong> — defining the problem and the goal.</li><li><strong>Building a simulation environment</strong> — description of how the training environment was built including the representation of the observation space, action space and rewards of the agent.</li><li><strong>Training process</strong> — frameworks, algorithms used in the training and the chart of the training process.</li><li><strong>Agent in action </strong>— an example of how the trained agent makes decisions.</li><li><strong>Conclusion</strong> — final thoughts.</li></ol><h3>Problem setting</h3><p>We have an household that <strong>generates its own solar energy with 12 kWp unit </strong>and is able to <strong>store this energy in a home battery (Tesla Powerwall 2 with 13 kWh capacity) </strong>which can be controlled through API. The electricity contract of the household is based on <strong>day-ahead market prices </strong>and the storage device can also be used to <strong>participate in </strong><a href="https://www.next-kraftwerke.com/knowledge/afrr"><strong>aFRR-up/secondary reserve</strong></a><strong> market</strong>.</p><p>Our goal is to <strong>train an agent that minimizes the energy cost of a household by</strong> <strong>controlling the battery </strong>considering the energy markets (day-ahead market, frequency markets), the local conditions (e.g. the baseload of the household) and user preferences (e.g. battery level can’t go below certain threshold).</p><h3>Building a simulation environment</h3><p>In reinforcement learning, the agent learns by making actions in an environment, receiving rewards/penalties for those actions and modifying its action pattern (policy) accordingly.</p><p>One could either use the real environment (the real household and the energy markets) or simulated environment. In this project, a simulation environment was built, using the <a href="https://github.com/openai/gym">OpenAI Gym</a> as a framework.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H4izdbHvWYZJ1m7Y2iC01g.png" /><figcaption>The simulation environment is a digital representation of the real physical environment that is used for training the reinforcement learning agent (image by author).</figcaption></figure><p>Developing the simulation environment for the energy decision agent involved the following steps:</p><ol><li>Representing the current situation (the state) of the environment numerically. The state representation needs to involve all of the information that our agent needs for training.</li><li>Representing the possible actions (things that our agent can make with our battery) numerically. Representing and updating the current state of the home battery.</li><li>Developing a logic of what it means to make a specific action in the environment. In other words, expressing what would happen with the household, battery and the energy cost when specific action is carried out by the agent.</li></ol><p>In total, the programmatical representation of our environment included ca 700 lines of code (including the helper functions). Next, I’ll explain some of the key parts of the environment.</p><h4>Representing the current state/observation</h4><p>The state/observation is a numerical representation of the current situation. In our project, this means representing the current state of energy markets, household and the assets.</p><h4>Initial representation of the current state</h4><p>Our initial (unmodified) observation space consists of the following information:</p><ul><li>12-hour forecast of day-ahead energy market prices,</li><li>12-hour forecast of afrr_up frequency market prices,</li><li>12-hour forecast of household’s consumption,</li><li>12-hour forecast of local solar production,</li><li>The information about the battery (vector of length 4): the capacity of the battery (e.g. 13 kWh); the current charge level of the battery (e.g. 2 kWh); the maximum charge power (e.g. 5 kW); the minimum allowed charge level (e.g. 1 kWh).</li></ul><p>The code block below represents an example of the unmodified observation components: we have 12 forecasted values of day-ahead and afrr-up market prices, the same number of corresponding baseload and pv-product values and 4 values that represent the information about the battery.</p><pre>&#39;day_ahead&#39;: array([ 4, 6, 12, 41, -12, 18, 46, 69, 41, 65, 64, 22], dtype = int32)<br>&#39;afrr_up&#39;: array([ 0, 78, 62, 0, 0, 0, 0, 0, 0, 0, 0, 87], dtype=int32)<br>&#39;baseload&#39;: array([ 2, 10, 10, 4, 4, 3, 5, 4, 4, 4, 4, 9], dtype=int32)<br>&#39;pv&#39;: array([ 0, 1, 2, 4, 10, 4, 12, 6, 10, 5, 9, 0], dtype=int32)<br>&#39;bat&#39;: array([13., 2., 15., 1.], dtype=float32)</pre><h4>Modified observation space</h4><p>The initial observation representation was modified in order to make it easier to handle by the neural network that our agent uses for learning. Each observation was <strong>normalized</strong> (represented between 0 and 1) and <strong>flattened</strong> (given as a single vector instead of five different vectors). The modified observation looks like this:</p><pre>array([0.159375, 0.175 , 0.10625 , 0.09375 , 0.13125 , 0.084375, 0.096875, <br>0.121875, 0.078125, 0.103125, 0.09375 , 0.19375 , 0.3 , 0.34375 , 0.0625 , <br>0.0625 , 0.0625 , 0.0625 , 0.0625 , 0.0625 , 0.0625 , 0.365625, 0.375 , <br>0.0625 , 0.5625 , 0.625 , 0.125 , 0.125 , 0.0625 , 0.0625 , 0.0625 , <br>0.125 , 0.0625 , 0.6875 , 0.5625 , 0.375 , 0. , 0.0625 , 0. , 0. , <br>0. , 0. , 0. , 0. , 0. , 0.125 , 0.0625 , 0.5 , 0.8125 , 0.125 , <br>0.9375 , 0.0625 ])</pre><h4>Action space</h4><p>Action space represents the decisions (actions) that the agent can make. Our energy decision agent has discrete action space of length 6.</p><pre>0: &#39;bat_from_grid&#39; #battery is charged from the grid<br>1: &#39;bat_to_grid&#39; #battery sends energy to the grid <br>2: &#39;bat_to_home&#39; #battery fulfills household’s energy need <br>3: &#39;bat_from_pv&#39; #battery charges from solar panels production<br>4: &#39;bat_afrr_up&#39; #battery participates in afrr frequency market <br>5: &#39;bat_idle&#39; #battery doesn’t do anything (stays idle)</pre><p>Each value (from 0–5) corresponds to one of the actions that the agent can do with the battery. Each action affects the State-of-Charge of the battery and has a corresponding cost/benefit.</p><p><em>Complexity: One episode is 24 hours and we have 6 actions to select for each hour. We have </em><strong><em>4 738 381 338 321 616 896</em></strong><em> (4.7 quintillion) possible ways to use this battery in a single episode.</em></p><h4>Reward</h4><p>The agent <strong>is rewarded on each step</strong> and the reward equals the energy cost that the household experiences. For example, if the agent decides on action value 0: ‘bat_from_grid’, then the maximum possible amount of energy is charged from the grid to the battery and the agent receives the reward that equals to: <em>charging cost + household baseload cost + revenue from pv production + …</em></p><p>The goal of the agent was <strong>to maximize the reward for the 24 hours timespan </strong>(that is: 24 hours was defined as a single episode).</p><h3>Training process</h3><p>During the training phase, the agent makes actions in the simulated environment and tries to find the action plan that is monetarily most beneficial to the household. In this project, the agent was represented by the <a href="https://github.com/ray-project/ray/blob/master/rllib/algorithms/impala/impala.py">RLLIB’s implementation of the IMPALA algorithm</a>. IMPALA enables to train the agent of multiple CPU cores simultaneously. The setup in this project included 4 cores/workers and 3 environments per worker.</p><p>The image below represents the mean episode reward (calculated as a mean of 100 episodes) during the training process. We can see that the agent evolved very quickly but the stability of the policy (its decision pattern) was rather low during the first two million steps of training. At the last stages of the training, our agent was able to consistently retrieve the mean reward of 1.5–1.6 € per episode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*50LC9iY2ap5Y1LN3rtkcMQ.png" /><figcaption>Mean episode reward during the training process of the agent. Mean reward represents the 24h energy cost of the household. Positive reward means that the household earns money by selling electricity to the grid (image by author).</figcaption></figure><h3>Agent in action</h3><p>As a final step, let’s take a look at the actions that our agent proposes for a sample 24-hour period (the image below). The Day-ahead and Afrr-up columns represent the market prices on those hours. The baseload and the PV represent the regular consumption and the PV-production of the household (in kWh). The Action column indicates the action/decision that is proposed by our energy decision agent and the SoC column shows the battery level (in kWh) at the end of the hour (after carrying out the proposed action).</p><p>The first highlighted region of the table shows how our agent is able to allocate the battery on the afrr-up market during the high-priced hours (hours 21, 22, 0) and charge from the grid during the hours when the day-ahead prices are low (hours 28 and 4).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wb5pdRgnxUZUAn3skPbcGA.png" /><figcaption>Example decisions of the trained agent — we can see that our agent is able to carry out the arbitrage between different market prices (table by author).</figcaption></figure><p>The second highlighted region indicates the pure market price arbitrage by our agent — discharging with the high-priced hours (hours 3 and 5) and charging during the low-priced hours (hours 4 and 6).</p><h3>Conclusion</h3><p>As a conclusion, I would like to highlight the following aspects:</p><ul><li>The reinforcement learning can be used to train an energy decision agents.</li><li>The key of building a real-world application of reinforcement learning is in building a training environment that closely resembles the physical world.</li><li>RL agents doesn’t guarantee optimality and can be very sensitive to the small changes in the environment.</li><li>Think! Maybe your problem could be solved with a simpler method!</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7567b61d0aa" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/training-an-energy-decision-agent-with-reinforcement-learning-a7567b61d0aa">Training an Energy Decision Agent With Reinforcement Learning</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>