<?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 Charles De Valois on Medium]]></title>
        <description><![CDATA[Stories by Charles De Valois on Medium]]></description>
        <link>https://medium.com/@charlesdevalois?source=rss-fdb7e249f473------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Ve1s7wAl_LEiKMZL.</url>
            <title>Stories by Charles De Valois on Medium</title>
            <link>https://medium.com/@charlesdevalois?source=rss-fdb7e249f473------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 21:06:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@charlesdevalois/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[Enrich real estate ads with RAG and OpenAI API]]></title>
            <link>https://medium.com/@charlesdevalois/enrich-real-estate-ads-with-rag-and-openai-api-3f09f44b3b93?source=rss-fdb7e249f473------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f09f44b3b93</guid>
            <category><![CDATA[real-estate]]></category>
            <category><![CDATA[llm-applications]]></category>
            <category><![CDATA[retrieval-augmented-gen]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[open-ai-api]]></category>
            <dc:creator><![CDATA[Charles De Valois]]></dc:creator>
            <pubDate>Mon, 23 Sep 2024 13:14:17 GMT</pubDate>
            <atom:updated>2024-09-24T11:57:39.349Z</atom:updated>
            <content:encoded><![CDATA[<p>It was high time I took an interest in Large Language Models, the language models that underlie ChatGPT in particular.</p><p>With this in mind, I have worked on a project that allowed me to get my feet wet and ride this (not so) new GenAI hobbyhorse.</p><p>Here’s my feedback.</p><p>Creating a POC (Proof of Concept) is relatively simple, provided you know how to :</p><ul><li>use an API</li><li>code a few lines of Python (or whatever)</li><li>understand LLM optimization principles and produce prompts</li><li>adopt a business perspective and understand the uses of potential customers</li></ul><p>The results are quite impressive, I think.</p><p>My project aims at enriching and/or analyzing real estate ad descriptions with a view to proposing new features to platforms such as Zazzle for example.</p><p>In this case, I will detail the 3 features my application addresses:</p><h3>1. Create a property review based on the ad description:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*m7_0iWYaK9oxW2WVnKLQ6A.png" /></figure><p>The aim of this first feature was to calculate a rating for the property under review on the following dimensions:</p><ul><li>Property size</li><li>Brightness of property</li><li>Modernity of the property</li><li>Is the property located in a quiet area?</li><li>Proximity to shops</li><li>Proximity to nature</li></ul><p>The challenge here was to obtain a standardized result (a score for each dimension), which is no easy task when you’re simply asking ChatGPT a question.</p><h4>How does it work?</h4><ul><li>I asked ChatGPT to come up with a scale for each dimension to be scored, which would help to frame the LLM, and I came up with a RAG (Retrieval Augmented Generation). This provides complementary documents to the LLM that is going to be called.</li><li>I also provided some examples of expected inputs/outputs to the model via the FewShotChatMessagePromptTemplate method from Langchain, in order to normalize what will come out of the Open AI API.</li><li>The request is then made to the Open AI API, which will return a text message.</li><li>A Regex will extract the notes for each dimension from this text and paste them into a dataframe</li><li>The application uses this dataframe to display the notes on the radar chart above.</li></ul><p>What’s great about LLMs is that you can also obtain a justification for each of the proposed scores.</p><h4>Examples:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*35o8sepPYJZ-rDa5X3XbXA.png" /></figure><h4>My opinion</h4><ul><li>The scores may still be too random, even if the provision of a scale would enable LLM to be framed correctly. To do this, we’d need to test lowering the temperature of the LLM model to obtain more regular results (but with less creativity).</li><li>To go even further, we could submit photos of the property for LLM to describe and complete the property description.</li><li>We could also make the output even more reliable by using the Langchain library’s <a href="https://python.langchain.com/v0.1/docs/modules/model_io/chat/structured_output/">with_structured_output()</a> method, which is compatible with the Open AI API.</li></ul><h4>Possible applications for a real estate advertising platform</h4><ul><li>Improve user experience by offering new filters to users</li><li>Optimize revenues or user experience by sorting search results according to new properties or user preferences</li><li>Offer services to owners of poorly rated properties</li></ul><h3>2. Deduce the likely coordinates of the property described in the advert</h3><p>If you’ve ever searched for an apartment or a house, you’ve probably found yourself on Google Maps (we see you!) trying to find the exact location of the property you were going to visit a few days later. I’ve spent over an hour trying to find a house, frantically clicking on the little yellow man to take a virtual tour of my possible future neighborhood:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*F1bueSL0a5zDekIq.png" /><figcaption>Little yellow man, take me on a virtual tour of my future neighborhood in 3D</figcaption></figure><p>To do this, a normal human would look at the photos and the description of the ad, searching for clues (“400m from the Tesco supermarket”, “100 feet away from the A subway line”).</p><p>So I wanted to test the ability of an LLM to help us in this arduous task, in the manner of a Watson helping his Sherlock:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*eEav39Ih3OV38j2d74-bpg.png" /><figcaption>The app indicates the property has good chances to be within the blue polygon</figcaption></figure><h4>How does it work?</h4><ul><li>An initial request is made to the Open AI API, which is asked to extract all the locations that could identify the property’s location.</li><li>The GPS coordinates of the locations are then retrieved via the Nominatim API, which matches addresses and locations with GPS coordinates.</li><li>Using a few examples, a second request is sent to the Open AI API to retrieve a reasoning and a set of GPS coordinates for tracing a polygon.</li><li>These coordinates are extracted via a Regex</li><li>The application displays a polygon on a map visually delimiting the logical zone where the property is located, with a degree of confidence (also returned by the LLM).</li></ul><h4>My opinion</h4><ul><li>Obviously, the more information in the description, the more interesting the result. In the absence of information, the app will suggest a bigger polygon and a lower trust score.</li><li>To go further, we could provide a database of geolocated locations in each city, which would considerably help our LLM to be more precise.</li></ul><h4>Possible applications</h4><ul><li>For platforms that don’t have access to precise property addresses, this could be an attractive feature for website visitors looking for a property in a particular area.</li></ul><h3>3. Rewrite the property ad in a specific tone</h3><p>This is the most obvious and basic feature, but one that always produces good results with LLMs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*W8YdXNKAwC6rzWGUPebMOg.png" /><figcaption>Funny thing, I get more sarcasms in English than in French, despite the prompt is very similar</figcaption></figure><p>If you want to give your ad description some “cachet”, your creativity is your only limit.</p><p>How does it work?</p><ul><li>A simple prompt with the ad description is sent to the Open AI API.</li><li>The application displays the result without reprocessing</li></ul><p>Here’s the prompt used:</p><blockquote>You are a copywriter of real estate ads, and you have a very specific style.</blockquote><blockquote>I give you a classic real estate ad, and your role is to transform it with your style that we can define this way:</blockquote><blockquote>sarcastic, strong language, literary, convincing.</blockquote><blockquote>Think step by step and follow the rules:</blockquote><blockquote>- No character coming from another language than english</blockquote><blockquote>- No insults</blockquote><blockquote>- No mention of a person</blockquote><blockquote>- Limit the number of sarscasms, this must remain discrete and really a small personal touch.</blockquote><blockquote>Here is the ad:</blockquote><blockquote>{context}</blockquote><h4>My opinion</h4><ul><li>I’m still blown away by the ability of LLMs, and ChatGPT4 in particular, to transcribe the desired level of language.</li></ul><h4>Possible applications for a real estate ad platform</h4><ul><li>Adapt the tone of the message to the personality of the platform</li><li>Instill a list of keywords in the prompt to optimize SEO</li></ul><h3>Conclusion</h3><p>To sum up, in just a few days, I managed to develop an application using the Open AI API and the Langchain library. The latter enables far more sophisticated queries than a simple interaction with ChatGPT, and provides normalized results.</p><p>Depending on the quantity of ads to be processed, and for cost reasons, it will be interesting to test the replacement of the Open AI API by an Open Source solution hosted in the cloud (to be continued ;)).</p><p>If you’d like to find out more, I’ve made available the full code — except the document for the RAG — of the Streamlit application: <a href="https://github.com/chvalois/immo_ad_enricher">https://github.com/chvalois/immo_ad_enricher</a></p><p>Do not hesitate to contact me on LinkedIn if you want to know more: <a href="https://www.linkedin.com/in/charleshenridevalois/">https://www.linkedin.com/in/charleshenridevalois/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f09f44b3b93" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 pillars of motivation at work : have you met TED (talks) ?]]></title>
            <link>https://medium.com/@charlesdevalois/3-pillars-of-motivation-at-work-have-you-met-ted-talks-ec12158673ef?source=rss-fdb7e249f473------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec12158673ef</guid>
            <category><![CDATA[strategy]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[golden-circle]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[happiness]]></category>
            <dc:creator><![CDATA[Charles De Valois]]></dc:creator>
            <pubDate>Wed, 28 Sep 2016 12:07:58 GMT</pubDate>
            <atom:updated>2016-09-28T12:07:58.984Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ywul1VdNkWbdFz3x5iVYCA.png" /></figure><p>I must confess, conferences hosted at marketing &amp; e-commerce tradeshows often bore me deeply, and you’ll agree that most of the time, it is about dropping 3 figures (true or invented) about the market, explaining a concept that everyone already knows, and selling solutions pretending we are the best at doing it, won’t you ?</p><p>With that in mind, I was wary when I launched my first TED conference video, and since I always take calculated risks, I have begun with one of the top 20.</p><p>For those who don’t know, TED conferences (TED for Technology, Entertainment, Design) are conferences organized by a non-lucrative american association, which aim at spreading “ideas worth spreading”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/0*Mh0Kc0QUNZ3jRcDZ.jpg" /></figure><p>This has been a revelation ! Finally, I was attending conferences that make me feel like getting up from my chair to applause the performer. Because this IS a performance : you don’t host a TED conference without any preparation, and you feel it.</p><p>Actually, many conferences appearing in the top 20 talk about motivation at work, and I have decided to summarize what they taught me in this article.</p><p>As a consequence, I’ve identified <strong>3 pillars of motivation</strong>, in response of the 3 different conferences I watched on <a href="http://www.ted.com/">Ted.com</a></p><h3>1. Money incentives are not the best solution</h3><p><strong>The conference:</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FrrkrvAUbU9Y%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrrkrvAUbU9Y&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FrrkrvAUbU9Y%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d42e7c8ad68d4b50249fe0265e5258c6/href">https://medium.com/media/d42e7c8ad68d4b50249fe0265e5258c6/href</a></iframe><p><strong>The big idea:</strong></p><blockquote>« There is a gap between what science knows about motivation at work, and what is being done in business »</blockquote><p><strong>The illustration:</strong></p><p>Dan Pink relies on the “Candle Problem” study (see the video) to explain that the perspective of a higher incentive indexed on our capacity to solve the issue in a limited amount of time tended to block our cognitive capacities.</p><p>The experience lead by the MIT tends to show that :</p><ul><li>When the task only required mechanical skills, financial incentives were efficient. And in that case, the higher the incentive, the better the performance</li><li>But as soon as the task required the lowest cognitive skill, the higher the incentive, the lower the performance</li></ul><p>According to Dan Pink, London School of Economics goes even further concluding that <strong>“financial incentives have a negative impact on overall performance”</strong></p><p>And yet, financial incentives remain the most common practice in business industry to generate results. (Quick precision : that really does not mean that I think we should use this to justify unattractive salaries, we only talk of incentive bonus, and even I don’t agree on suppressing them totally)</p><p>So, apart from financial incentives, how do you keep your team motivated ?</p><p>First, please have a look to this very interesting article about <a href="http://www.nytimes.com/2016/02/28/magazine/what-google-learned-from-its-quest-to-build-the-perfect-team.html">Google searching for the recipe to create the perfect team</a>, which bring a few answers. Quick shortcut : <strong>psychological safety</strong>. No need to paraphrase here, just read the article, it is solid.</p><p>But let’s get back to Dan Pink, who gives us these 3 keys to human motivation at work :</p><ul><li>Autonomy (desire to lead our own life)</li><li>Mastery (desire to become better and better in a field that matters to us)</li><li>Purpose (desire to to something to serve a purpose that is bigger than us)</li></ul><p>Which leads us to the next section:</p><h3>2. Define the “Why” of your company</h3><p><strong>The conference:</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fu4ZoJKF_VuA%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Du4ZoJKF_VuA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fu4ZoJKF_VuA%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/28419ca3a639e5c5132c46281a95abaa/href">https://medium.com/media/28419ca3a639e5c5132c46281a95abaa/href</a></iframe><p><strong>The big idea:</strong></p><blockquote>« People don’t buy what you do, they buy why you do it. »</blockquote><p><strong>The illustration:</strong></p><p>Simon Sinek finds a way to address the 3 elements mentioned above through his “golden circle” (see video).</p><p>He is talking here about our deep motivations, whether you are the buyer of a product, or the buyer of a project.</p><p>Adapted to business industry, it means that the CEO and team leaders of a company need to establish the true “why” of the company — what we better know as “mission statement” — in order to have their client(s) understand what is the purpose of every action achieved in the company.</p><p>Simon Sinek illustrates his “golden circle” methodology through Apple, whose mission is to <strong>“always question the status quo”</strong>.</p><p>Thus, creating products with the best design, and the best ergonomics, is not the final purpose of Apple. What is the final purpose is, in every domain Apple launches products, to question the existing forces, and simply do better. The quest of the impossible and of establishing new references in every market.</p><p>From this “why”, you can then define the “how” (how to do it), and the “what” (the final product):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/0*NxYTnvkffZczo-ba.png" /></figure><p>Let’s use this Golden Circle to a classic company. And think of who their clients are.</p><p>We could think that the only customers of a company are the buyers. But using <a href="http://www.shopbot.business/">Shopbot</a>’s example — the company I work for as CEO — I count <strong>5 different types of customers</strong>:</p><ul><li>Our employees (and our future candidates, who may become future employees)</li><li>Our users (Shopbot websites users)</li><li>Our brands &amp; e-retailers (customers who pay us for the qualified traffic we send to them)</li><li>Our shareholders (people who believe in our vision, our projects, and who fund them)</li><li>Our publishers (who push our e-retailers offers to their audience)</li></ul><p>I now consider our employees as the first customers of the company. They are the DNA of the product we sell, and I am convinced we need to share a common long-term purpose.</p><p><strong>Indeed, defining a “why” and sharing it with your team, defines the frame in which everyone’s commitment makes sense.</strong></p><p>By doing that, you open the doors of motivation that we talked about earlier : the adoption of the “why” by the employees makes everyday decision making much easier (autonomy), encourages personal development and enables the practice of their job in good conditions (mastery), and give them — ideally — a goal that exceeds their own well-being (purpose).</p><p>So now, we have seen the theory. But how can we make it last on a day-to-day basis.</p><p>New management solutions (holacracy for example) are key elements that need to be studied, but quite complex (and risky) to deploy. And we still lack experience in this field to assert they are efficient answers (<a href="http://fortune.com/2016/03/04/management-changes-at-medium/">Medium is well placed to know that</a>).</p><p>So, much easier, I have selected the idea that employees happiness was the engine of success, and even better, that it was <strong>“self-programmable”</strong>.</p><h3>3. Happiness at work generates success</h3><p><strong>The conference:</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FfLJsdqxnZb0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DfLJsdqxnZb0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FfLJsdqxnZb0%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/dee0094c91a915cdedcf63ef5cb4f0df/href">https://medium.com/media/dee0094c91a915cdedcf63ef5cb4f0df/href</a></iframe><p><strong>The big idea:</strong></p><blockquote>« Happiness generates success, not the opposite »</blockquote><p><strong>The illustration:</strong></p><p>I am warning you, this section may appear simplistic, but I consider this as essential as the rest. Shawn Achor speaks of this axiom we are taught about generation after generation : work generates success, which generates happiness.</p><p>And yet, who among you readers did not experience disappointment after noticing that your hard work did not generate expected success ? And even then, success may have been achieved, but has it always been enough to make you happy ?</p><p>On the opposite, Shawn Achor proposes each one of us to reprogram our brain each day, and train it to happiness. Success will then follow.</p><p>So, is it just about autosuggestion ?</p><p>Undoubtedly, but I was fascinated by some TED conferences, emphasizing on <strong>the importance of mental conditioning</strong> (<a href="https://www.youtube.com/watch?v=RcGyVTAoXEU">about stress perception</a>) and <strong>physical conditioning</strong> (<a href="https://www.youtube.com/watch?v=Ks-_Mh1QhMc">about body language</a>) in personal success.</p><p>Anyway, Shawn Achor gives us some exercises, to train our brain to happiness, in order to be always in a positive mood at work:</p><ul><li>Write every day 3 good news, 21 days in a row</li><li>Relive mentally every day a positive personal experience, lived these 24 past hours</li><li>Meditate, in order to focus, and put aside “multitasking” that dominate our lives now</li><li>Repeat spontaneous acts of kindness, like thanking someone while you open your e-mails in the morning</li></ul><p>Personally, while I was trying to do that, I found it very difficult to identify one positive news after reading traditional media (we have this huge media <a href="http://www.lemonde.fr/">www.lemonde.fr</a> in France).</p><p>I think it is everyone’s duty to identify positive sources of inspiration and share it with your community. On my side, I now rely on these TED conferences, or on some specific future-oriented media (like <a href="http://www.wedemain.fr/">www.wedemain.fr</a>, only for French-speaking readers sorry …).</p><p>When these encouraging news meet the “why” of your company, self-fulfillment feeling — as quick it may be — is not very far.</p><p>In conclusion, I don’t pretend establishing an exhaustive and unique methodology to produce motivation as an assembly-line would do, nor judging the companies or managers who would not follow these suggestions.</p><p>I just think that <strong>having that in mind</strong>, even if it is tough to make it permanent, <strong>really helps understanding how your team works</strong>.</p><p>And after all, if you want to know my real motivation writing all this, please refer to TED’s baseline : “ideas worth spreading” …</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec12158673ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>