<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Love.Law.Robots. by Ang Hou Fu</title>
    <link>https://write.as/houfu/</link>
    <description></description>
    <pubDate>Tue, 25 Aug 2026 13:52:44 +0000</pubDate>
    <image>
      <url>https://i.snap.as/jvl6aNdV.png</url>
      <title>Love.Law.Robots. by Ang Hou Fu</title>
      <link>https://write.as/houfu/</link>
    </image>
    <item>
      <title>It&#39;s time to make a move. Join me!</title>
      <link>https://write.as/houfu/its-time-to-make-a-move-join-me?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[TL;DR: I’ve decided to take this newsletter elsewhere. Basically, long form writing will appear occasionally at houfu.github.io, while shorter form writing will appear on Buy Me a Coffee’s membership tier. The members’ mailing list will be the main fulcrum of my activities. &#xA;&#xA;To thank you for being around, or there first, you will receive an invite to be a (free) lifetime member in your email boxes in due course. Please join me in this new chapter!&#xA;&#xA;An image of a robot turning a page on the book&#xA;&#xA;Oh it’s a perennial dilemma.&#xA;&#xA;When I hunker down to write code, I missed out on the blog, and it looks like I have forgotten folks here. I have been coding a lot, but without any time to share it.&#xA;&#xA;Unfortunately, most of it have been failed experiments. At least, they make a wellspring of content for a blog once I get over the disappointment that I wasted my time.&#xA;&#xA;So, I have to take a break and recalibrate. Writing is always a nice break and I’ve been studying what I liked and don’t like about Love Law Robots.&#xA;&#xA;Even though I managed to persevere with posting on a regular schedule for some time, it was painful. At least some of it was due to the fact that I don’t like write.as interface or how ugly their newsletters turned out. &#xA;I still have no idea how to encourage subscriptions. I don’t think the content on the blog was good enough, and furthermore, people don’t seem to subscribe because of the blog.&#xA;&#xA;In the meantime, there have been changes in my environment. Firstly, LinkedIn, despite my misgivings on my audience there, has become a more viable place to talk about my work. Twitter/X or Mastodon… not so much. &#xA;&#xA;The crucial point is that I shouldn’t be making a newsletter. I should be doing other things, like coding and reading and sharing. Being free of writing a newsletter means I shouldn’t focus on a blogging platform, but a stack. &#xA;&#xA;And this is the stack I am looking to implement:&#xA;&#xA;Socials such as LinkedIn, Mastodon and the like, for quick, “free”, no obligation sharing&#xA;Buy Me a Coffee memberships and digital products to keep my readers and fund my projects&#xA;A static webpage, occasionally updated with long form writing, but probably as some sort of semi-permanent landing page. &#xA;&#xA;As part of the transition, I’d be giving away memberships. At some level, it’s to thank you for sticking around with me. At another level… thanks for being a guinea pig and testing my theories. &#xA;&#xA;I’m hoping that this will be a more efficient use of my limited energies. There’s a lot to be excited for in the coming months!&#xA;&#xA;One last thing — although I am certainly not in this for the money, it’s an important point of principle to me that the projects are financially sustainable. It’s always intellectually simulating to figure out how to make money out of something but I like to think it makes them rational\*. So, I wouldn’t begrudge you for taking what I am offering, but to give a little tip for something valuable is a nice and polite.  &#xA;&#xA;(One of my failed experiments concerns spending over US$200 a month to collect thousands of law related newspaper articles in Singapore… and I don’t know what to do with them. It’s important to urrm think through what you are doing.)&#xA;&#xA;img src=&#34;https://res.cloudinary.com/lovelawrobots/image/upload/fauto,qauto/v1/blog-images/photo2023-06-3023-47-38ozpz52&#34; alt=&#34;Author Portrait&#34; width=&#34;320&#34;/&#xD;&#xA;Love.Law.Robots. - A blog by Ang Hou Fu&#xD;&#xA;&#xD;&#xA;a href=&#34;https://remark.as/p/houfu/its-time-to-make-a-move-join-me&#34;Discuss.../a this Post&#xD;&#xA;If you found this post useful, or like my work, a tip is always appreciated:  script type=&#34;text/javascript&#34; src=&#34;https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js&#34; data-name=&#34;bmc-button&#34; data-slug=&#34;damonhoufbq&#34; data-color=&#34;#BD5FFF&#34; data-emoji=&#34;&#34;  data-font=&#34;Poppins&#34; data-text=&#34;Buy me a coffee&#34; data-outline-color=&#34;#000000&#34; data-font-color=&#34;#ffffff&#34; data-coffee-color=&#34;#FFDD00&#34; /script&#xD;&#xA;Follow this blog on the Fediverse&#xD;&#xA;Contact me:&#xD;&#xA;     Email&#xD;&#xA;     Github &#xD;&#xA;     Personal Mastodon&#xD;&#xA;     LinkedIn&#xD;&#xA;     Twitter&#xD;&#xA;&#xD;&#xA;!--emailsub--&#xD;&#xA;&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><strong>TL;DR:</strong> I’ve decided to take this newsletter elsewhere. Basically, long form writing will appear occasionally at <a href="https://houfu.github.io" rel="nofollow">houfu.github.io</a>, while shorter form writing will appear on <a href="https://buymeacoffee.com/houfu/membership" rel="nofollow">Buy Me a Coffee’s membership tier</a>. The members’ mailing list will be the main fulcrum of my activities.</p>

<p><strong>To thank you for being around, or there first, you will receive an invite to be a (free) lifetime member</strong> <strong>in your email boxes in due course.</strong> Please join me in this new chapter!</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/s--m2p_RqJ_--/f_auto,q_auto/page-turning-bot_p2fbvb" alt="An image of a robot turning a page on the book"/></p>

<p>Oh it’s a perennial dilemma.</p>

<p>When I hunker down to write code, I missed out on the blog, and it looks like I have forgotten folks here. I have been coding a lot, but without any time to share it.</p>

<p>Unfortunately, most of it have been failed experiments. At least, they make a wellspring of content for a blog once I get over the disappointment that I wasted my time.</p>

<p>So, I have to take a break and recalibrate. Writing is always a nice break and I’ve been studying what I liked and don’t like about Love Law Robots.</p>
<ul><li>Even though I managed to persevere with posting on a regular schedule for some time, it was painful. At least some of it was due to the fact that I don’t like write.as interface or how ugly their newsletters turned out.</li>
<li>I still have no idea how to encourage subscriptions. I don’t think the content on the blog was good enough, and furthermore, people don’t seem to subscribe because of the blog.</li></ul>

<p>In the meantime, there have been changes in my environment. Firstly, LinkedIn, despite my misgivings on my audience there, has become a more viable place to talk about my work. Twitter/X or Mastodon… not so much.</p>

<p>The crucial point is that I shouldn’t be making a newsletter. I should be doing other things, like coding and reading and sharing. Being free of writing a newsletter means I shouldn’t focus on a blogging platform, but a stack.</p>

<p>And this is the stack I am looking to implement:</p>
<ul><li>Socials such as LinkedIn, Mastodon and the like, for quick, “free”, no obligation sharing</li>
<li>Buy Me a Coffee memberships and digital products to keep my readers and fund my projects</li>
<li>A static webpage, occasionally updated with long form writing, but probably as some sort of semi-permanent landing page.</li></ul>

<p>As part of the transition, I’d be giving away memberships. At some level, it’s to thank you for sticking around with me. At another level… thanks for being a guinea pig and testing my theories.</p>

<p>I’m hoping that this will be a more efficient use of my limited energies. There’s a lot to be excited for in the coming months!</p>

<p>One last thing — although I am certainly not in this for the money, it’s an important point of principle to me that the projects are financially sustainable. It’s always intellectually simulating to figure out how to make money out of something but I like to think it makes them rational*. So, I wouldn’t begrudge you for taking what I am offering, but to give a little tip for something valuable is a nice and polite.</p>

<p>(One of my failed experiments concerns spending over US$200 a month to collect thousands of law related newspaper articles in Singapore… and I don’t know what to do with them. It’s important to urrm think through what you are doing.)</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/f_auto,q_auto/v1/blog-images/photo_2023-06-30_23-47-38_ozpz52" alt="Author Portrait" width="320"/>
<strong>Love.Law.Robots. – A blog by Ang Hou Fu</strong></p>
<ul><li><a href="https://remark.as/p/houfu/its-time-to-make-a-move-join-me" rel="nofollow">Discuss...</a> this Post</li>
<li>If you found this post useful, or like my work, a tip is always appreciated:  </li>
<li>Follow [this blog on the Fediverse]()</li>
<li>Contact me:
<ul><li><a href="mailto:houfu@lovelawrobots.com" rel="nofollow">Email</a></li>
<li><a href="https://github.com/houfu" rel="nofollow">Github</a></li>
<li><a href="https://kopiti.am/@houfu" rel="nofollow">Personal Mastodon</a></li>
<li><a href="https://www.linkedin.com/in/hou-fu-ang-0a6851113/" rel="nofollow">LinkedIn</a></li>
<li><a href="https://twitter.com/houfu" rel="nofollow">Twitter</a></li></ul></li></ul>


]]></content:encoded>
      <guid>https://write.as/houfu/its-time-to-make-a-move-join-me</guid>
      <pubDate>Wed, 04 Sep 2024 16:13:51 +0000</pubDate>
    </item>
    <item>
      <title>It’s time to get back to writing</title>
      <link>https://write.as/houfu/its-time-to-get-back-to-writing?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[“When I am coding, I am not blogging.”&#xA;&#xA;It’s been a lull of several months though, and I think I want to get back into the mixer once again. I have been coding and buying several domain names, but like many experiments, I did not feel that they were ready for launch. Furthermore, child rearing duties needed more attention. There’s now been some stability, which made me more comfortable to do this again. &#xA;&#xA;Why do I continue to write? I’ve experimented trying to make money out of this using subscriptions but that hasn’t really been convincing. The ROI, so to speak, is unfortunately more intangible. I’ve made friends, conjured the courage to speak and became a different person than I would have been if I just reported for work every day. More and more people ask me about law and coding at social outings and even at job interviews compared to just a few years ago. &#xA;&#xA;I also feel I still have got things to share in the next few months, including a revamped “Prompt Engineering for Lawyers” app. While coding in my dark cave, I also picked up some new things, like using GitHub Copilot, so there’s still more in this tank.&#xA;&#xA;Let’s ratchet this up. It’s a new day!&#xA;&#xA;img src=&#34;https://res.cloudinary.com/lovelawrobots/image/upload/fauto,qauto/v1/blog-images/photo2023-06-3023-47-38_ozpz52&#34; alt=&#34;Author Portrait&#34; width=&#34;320&#34;/&#xD;&#xA;Love.Law.Robots. - A blog by Ang Hou Fu&#xD;&#xA;&#xD;&#xA;a href=&#34;https://remark.as/p/houfu/its-time-to-get-back-to-writing&#34;Discuss.../a this Post&#xD;&#xA;If you found this post useful, or like my work, a tip is always appreciated:  script type=&#34;text/javascript&#34; src=&#34;https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js&#34; data-name=&#34;bmc-button&#34; data-slug=&#34;damonhoufbq&#34; data-color=&#34;#BD5FFF&#34; data-emoji=&#34;&#34;  data-font=&#34;Poppins&#34; data-text=&#34;Buy me a coffee&#34; data-outline-color=&#34;#000000&#34; data-font-color=&#34;#ffffff&#34; data-coffee-color=&#34;#FFDD00&#34; /script&#xD;&#xA;Follow this blog on the Fediverse&#xD;&#xA;Contact me:&#xD;&#xA;     Email&#xD;&#xA;     Github &#xD;&#xA;     Personal Mastodon&#xD;&#xA;     LinkedIn&#xD;&#xA;     Twitter&#xD;&#xA;&#xD;&#xA;!--emailsub--&#xD;&#xA;&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>“When I am coding, I am not blogging.”</p>

<p>It’s been a lull of several months though, and I think I want to get back into the mixer once again. I have been coding and buying several domain names, but like many experiments, I did not feel that they were ready for launch. Furthermore, child rearing duties needed more attention. There’s now been some stability, which made me more comfortable to do this again.</p>

<p>Why do I continue to write? I’ve experimented trying to make money out of this using subscriptions but that hasn’t really been convincing. The ROI, so to speak, is unfortunately more intangible. I’ve made friends, conjured the courage to speak and became a different person than I would have been if I just reported for work every day. More and more people ask me about law and coding at social outings and even at job interviews compared to just a few years ago.</p>

<p>I also feel I still have got things to share in the next few months, including a revamped “Prompt Engineering for Lawyers” app. While coding in my dark cave, I also picked up some new things, like using GitHub Copilot, so there’s still more in this tank.</p>

<p>Let’s ratchet this up. It’s a new day!</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/f_auto,q_auto/v1/blog-images/photo_2023-06-30_23-47-38_ozpz52" alt="Author Portrait" width="320"/>
<strong>Love.Law.Robots. – A blog by Ang Hou Fu</strong></p>
<ul><li><a href="https://remark.as/p/houfu/its-time-to-get-back-to-writing" rel="nofollow">Discuss...</a> this Post</li>
<li>If you found this post useful, or like my work, a tip is always appreciated:  </li>
<li>Follow [this blog on the Fediverse]()</li>
<li>Contact me:
<ul><li><a href="mailto:houfu@lovelawrobots.com" rel="nofollow">Email</a></li>
<li><a href="https://github.com/houfu" rel="nofollow">Github</a></li>
<li><a href="https://kopiti.am/@houfu" rel="nofollow">Personal Mastodon</a></li>
<li><a href="https://www.linkedin.com/in/hou-fu-ang-0a6851113/" rel="nofollow">LinkedIn</a></li>
<li><a href="https://twitter.com/houfu" rel="nofollow">Twitter</a></li></ul></li></ul>


]]></content:encoded>
      <guid>https://write.as/houfu/its-time-to-get-back-to-writing</guid>
      <pubDate>Sun, 04 Aug 2024 03:26:31 +0000</pubDate>
    </item>
    <item>
      <title>Sailing away on a cruise</title>
      <link>https://write.as/houfu/sailing-away-on-a-cruise?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[I haven&#39;t wrote much in a while as I&#39;ve been taking a break, and a step back to evaluate what I should do next. (Like figuring out whether I should continue this Federated experience or go back to Wordpress or something else)&#xA;&#xA;I have a lot to catch up but I thought I would touch on something straightforward first. &#xA;&#xA;A cruise ship is docked in Singapore. Source: https://commons.m.wikimedia.org/wiki/File:KreuzfahrtschiffeamTerminalinSingapur.jpg&#xA;&#xA;I just came back from a cruise trip. Obviously I have heard of them but I considered them inferior to flying to a new destination. After some curiousity and bouts of cajoling, I decided to do it. &#xA;&#xA;It turned out to be an interesting experience, to say the least. &#xA;&#xA;As an independent and immaculate planner, I am used to being in control of my itinerary. On a cruise though, you have a menu of activities, and nowhere else to go. &#xA;&#xA;Although I find many of the activities honestly lame, I did appreciate the fact that I didn&#39;t have to organise or fix up all the details around the holiday, including contingency plans. &#xA;&#xA;Furthermore, before and during the cruise, I didn&#39;t have much of the information I am used to. The website was short of details (except the upselling), and the app was useless. &#xA;&#xA;The best and only way to get accurate information on what&#39;s going on in the ship was: to ask someone on the ship. &#xA;&#xA;Anyway, if being on holidays was about gaining new experiences, I think my family and I adapted OK to this strange way of having a holiday. &#xA;&#xA;This is a great reminder that there is a critical mass of people who don&#39;t like to go through websites, guides and RTFM to do things and rely on their networks to gain information and connections. &#xA;&#xA;So if you&#39;re wondering why people simply don&#39;t want to fill in your form or talk to your chatbot even when it&#39;s the simplest and most convenient thing in the world, there&#39;s probably a different perspective. &#xA;&#xA;Or at least you can wish they can be sent off on a cruise to nowhere. &#xA;&#xA;img src=&#34;https://res.cloudinary.com/lovelawrobots/image/upload/fauto,qauto/v1/blog-images/photo2023-06-3023-47-38ozpz52&#34; alt=&#34;Author Portrait&#34; width=&#34;320&#34;/&#xD;&#xA;Love.Law.Robots. - A blog by Ang Hou Fu&#xD;&#xA;&#xD;&#xA;a href=&#34;https://remark.as/p/houfu/sailing-away-on-a-cruise&#34;Discuss.../a this Post&#xD;&#xA;If you found this post useful, or like my work, a tip is always appreciated:  script type=&#34;text/javascript&#34; src=&#34;https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js&#34; data-name=&#34;bmc-button&#34; data-slug=&#34;damonhoufbq&#34; data-color=&#34;#BD5FFF&#34; data-emoji=&#34;&#34;  data-font=&#34;Poppins&#34; data-text=&#34;Buy me a coffee&#34; data-outline-color=&#34;#000000&#34; data-font-color=&#34;#ffffff&#34; data-coffee-color=&#34;#FFDD00&#34; /script&#xD;&#xA;Follow this blog on the Fediverse&#xD;&#xA;Contact me:&#xD;&#xA;     Email&#xD;&#xA;     Github &#xD;&#xA;     Personal Mastodon&#xD;&#xA;     LinkedIn&#xD;&#xA;     Twitter&#xD;&#xA;&#xD;&#xA;!--emailsub--&#xD;&#xA;&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>I haven&#39;t wrote much in a while as I&#39;ve been taking a break, and a step back to evaluate what I should do next. (Like figuring out whether I should continue this Federated experience or go back to Wordpress or something else)</p>

<p>I have a lot to catch up but I thought I would touch on something straightforward first.</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/s--mqnQ-Fu9--/f_auto,q_auto/v1/blog-images/Kreuzfahrtschiffe_am_Terminal_in_Singapur_nntlc8" alt="A cruise ship is docked in Singapore. Source: https://commons.m.wikimedia.org/wiki/File:Kreuzfahrtschiffe_am_Terminal_in_Singapur.jpg"/></p>

<p>I just came back from a cruise trip. Obviously I have heard of them but I considered them inferior to flying to a new destination. After some curiousity and bouts of cajoling, I decided to do it.</p>

<p>It turned out to be an interesting experience, to say the least.</p>

<p>As an independent and immaculate planner, I am used to being in control of my itinerary. On a cruise though, you have a menu of activities, and nowhere else to go.</p>

<p>Although I find many of the activities honestly lame, I did appreciate the fact that I didn&#39;t have to organise or fix up all the details around the holiday, including contingency plans.</p>

<p>Furthermore, before and during the cruise, I didn&#39;t have much of the information I am used to. The website was short of details (except the upselling), and the app was useless.</p>

<p>The best and only way to get accurate information on what&#39;s going on in the ship was: to ask someone on the ship.</p>

<p>Anyway, if being on holidays was about <em>gaining new experiences</em>, I think my family and I adapted OK to this strange way of having a holiday.</p>

<p>This is a great reminder that there is a critical mass of people who don&#39;t like to go through websites, guides and RTFM to do things and rely on their networks to gain information and connections.</p>

<p>So if you&#39;re wondering why people simply don&#39;t want to fill in your form or talk to your chatbot even when it&#39;s the simplest and most convenient thing in the world, there&#39;s probably a different perspective.</p>

<p>Or at least you can wish they can be sent off on a cruise to nowhere.</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/f_auto,q_auto/v1/blog-images/photo_2023-06-30_23-47-38_ozpz52" alt="Author Portrait" width="320"/>
<strong>Love.Law.Robots. – A blog by Ang Hou Fu</strong></p>
<ul><li><a href="https://remark.as/p/houfu/sailing-away-on-a-cruise" rel="nofollow">Discuss...</a> this Post</li>
<li>If you found this post useful, or like my work, a tip is always appreciated:  </li>
<li>Follow [this blog on the Fediverse]()</li>
<li>Contact me:
<ul><li><a href="mailto:houfu@lovelawrobots.com" rel="nofollow">Email</a></li>
<li><a href="https://github.com/houfu" rel="nofollow">Github</a></li>
<li><a href="https://kopiti.am/@houfu" rel="nofollow">Personal Mastodon</a></li>
<li><a href="https://www.linkedin.com/in/hou-fu-ang-0a6851113/" rel="nofollow">LinkedIn</a></li>
<li><a href="https://twitter.com/houfu" rel="nofollow">Twitter</a></li></ul></li></ul>


]]></content:encoded>
      <guid>https://write.as/houfu/sailing-away-on-a-cruise</guid>
      <pubDate>Mon, 25 Mar 2024 00:55:05 +0000</pubDate>
    </item>
    <item>
      <title>Running Bots in your Matrix Room using Maubot</title>
      <link>https://write.as/houfu/running-bots-in-your-matrix-room-using-maubot?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Two people seated at a table. conversation. A robot barista behind them. Friendly. Warm. Inviting.&#xA;&#xA;Since receiving support requests and development ideas all over the place for redlines, I decided to try running a #Matrix room to centralise some discussion and an informal venue to ask weird and “stupid” questions. Since I am in the mood for experimentation, I wanted to run robots in my room. For my redlines room, I wanted a robot to track the activity on the GitHub repo, and welcome new users by posting what is the purpose of the room etc.&#xA;&#xA;I was surprised to find very little documents or bots on how to run a matrix bot. I decided to go with maubot because I like the idea of plugins. While the interface and the docs leaves something to be desired, it’s actually relatively straightforward. Here’s a short write-up/#tutorial of how I did it in case it helps someone out there.&#xA;&#xA;!--more--&#xA;&#xA;Step 1: Start a maubot server&#xA;&#xA;You’re going to need a place where your bot could listen for events and react to them. I decided to go with my Contabo VPS which I used to run docker compose services.&#xA;&#xA;The documentation does not provide instructions on how to use docker compose with the #docker image, and the instructions on reverse proxy leaves out #traefik. Having skewered many services into docker compose yaml, I was unfazed.&#xA;&#xA;Add this to your docker compose file, and you will get maubot with traefik SSL.&#xA;&#xA;  maubot:&#xA;    image: dock.mau.dev/maubot/maubot:latest&#xA;    restart: always&#xA;    volumes:&#xA;      ./maubot:/data:z&#xA;    labels:&#xA;      traefik.backend=maubot&#xA;      traefik.http.routers.maubot.rule=Host(maubot.example.com)&#xA;      traefik.http.routers.maubot.tls=true&#xA;      traefik.http.routers.maubot.tls.certresolver=myresolver&#xA;      traefik.http.middlewares.maubot-redirect.redirectscheme.scheme=https&#xA;      traefik.http.middlewares.maubot-redirect.redirectscheme.permanent=true&#xA;      traefik.http.routers.maubot.middlewares=maubot-redirect&#xA;      traefik.http.services.maubot.loadbalancer.server.port=29316&#xA;&#xA;Remember you need to modify the example to your circumstances: 1) correct domain name for your server, 2) create a directory for the data  and 3) fix the reference to the SSL certificate resolver for traefik.&#xA;&#xA;Run docker compose up -d and docker should now pull the maubot image and start running it.&#xA;&#xA;At this point, you should go to the data directory you created for maubot and look for “config.yaml” file. You can look at all the settings and decide whether you need to change them. However, you need to do this now: add an admin user in the “admins” section of the file by providing a user name with a password as a value.&#xA;&#xA;Step 2: Create a new user to be the bot&#xA;&#xA;I wanted a special user to be the bot for my room, so I registered one in my home matrix server for this purpose. It’s like signing up for the service again. There’s nothing special in this step.&#xA;&#xA;You do need to take note of the “access token” for a future step. Find it in Element by pressing on the “Access Token” dropdown arrow under Settings -  Help &amp; About -  Advanced.&#xA;&#xA;Screenshot of access token screen.&#xA;&#xA;Step 3: Create a client on the Maubot Manager&#xA;&#xA;Now let’s dive into creating a bot.&#xA;&#xA;Assuming you’ve got the server up, you can now visit the Maubot manager by adding this “matrix/maubot” to your server’s path and logging in. You should now be able to see the Maubot Manager interface. It allows you to create instances and clients, as well as upload plugins. We’re going to do all three for the first bot we are creating. &#xA;&#xA;First, you’re going to need a client. This is actually the new user you created in step 2. Click on the plus button and add the required details.&#xA;&#xA;Screenshot of Maubot Manager &#xA;&#xA;You’re going to need the details of your bot user’s access token, user ID and homeserver. You can find the user ID in the Settings-General page and it looks like this format: @username:home server. My matrix ID for example is @houfu:matrix.esq.social. The other two information could be found in the screen highlighted in Step 2.&#xA;&#xA;It doesn’t appear to be necessary to fix a device id or avatar url to create your client. You can fill them in later.&#xA;&#xA;Step 4: Upload a plugin&#xA;&#xA;It’s time to get the code of the bot in.&#xA;&#xA;You can find a list of plugins available to maubot on this page: https://plugins.maubot.xyz/&#xA;&#xA;The plugins I chose were:&#xA;&#xA;Github bot to track the updates on the redlines repository.&#xA;A welcome bot&#xA;&#xA;In order to upload the plugin to your maubot server, you would upload an mbp file for the plugin in the Maubot Manager. In many Github repos, you can find a release with the mbp file you can download. Otherwise, you can clone the repo, install maubot through pip and then run \mbc build\ to get the mbp file.&#xA;&#xA;Use the Maubot Manager to upload the plugin.&#xA;&#xA;Step 5: Create an instance&#xA;&#xA;It’s time to bring the code to the bot. Create an instance and link the plugin to the client you created earlier.&#xA;&#xA;Once you have created an instance, you can edit its settings in the box provided. The settings are project specific, so be sure to check the documentation.&#xA;&#xA;Once you have reached this step and checked that everything is enabled and running, your bot is operational and ready for action! (You may need to follow some bot specific instruction like entering commands in your matrix room, so read the docs!)&#xA;&#xA;It works!&#xA;&#xA;Marvel at the wonders of automation!&#xA;&#xA;Screenshot of Element showing a bot in action in a matrix room&#xA;&#xA;Have fun with your bots!&#xA;&#xA;img src=&#34;https://res.cloudinary.com/lovelawrobots/image/upload/fauto,qauto/v1/blog-images/photo2023-06-3023-47-38_ozpz52&#34; alt=&#34;Author Portrait&#34; width=&#34;320&#34;/&#xD;&#xA;Love.Law.Robots. - A blog by Ang Hou Fu&#xD;&#xA;&#xD;&#xA;a href=&#34;https://remark.as/p/houfu/running-bots-in-your-matrix-room-using-maubot&#34;Discuss.../a this Post&#xD;&#xA;If you found this post useful, or like my work, a tip is always appreciated:  script type=&#34;text/javascript&#34; src=&#34;https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js&#34; data-name=&#34;bmc-button&#34; data-slug=&#34;damonhoufbq&#34; data-color=&#34;#BD5FFF&#34; data-emoji=&#34;&#34;  data-font=&#34;Poppins&#34; data-text=&#34;Buy me a coffee&#34; data-outline-color=&#34;#000000&#34; data-font-color=&#34;#ffffff&#34; data-coffee-color=&#34;#FFDD00&#34; /script&#xD;&#xA;Follow this blog on the Fediverse&#xD;&#xA;Contact me:&#xD;&#xA;     Email&#xD;&#xA;     Github &#xD;&#xA;     Personal Mastodon&#xD;&#xA;     LinkedIn&#xD;&#xA;     Twitter&#xD;&#xA;&#xD;&#xA;!--emailsub--&#xD;&#xA;&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/s--cD1SqLno--/f_auto,q_auto/v1/blog-images/vrcxnb9o7gjaz9vvsatv" alt="Two people seated at a table. conversation. A robot barista behind them. Friendly. Warm. Inviting."/></p>

<p>Since receiving support requests and development ideas all over the place for <a href="https://www.lovelawrobots.com/workshopping-my-little-story-about-redlines" rel="nofollow">redlines</a>, I decided to try running a <a href="https://write.as/houfu/tag:Matrix" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Matrix</span></a> room to centralise some discussion and an informal venue to ask weird and “stupid” questions. Since I am in the mood for experimentation, I wanted to run robots in my room. For my redlines room, I wanted a robot to track the activity on the GitHub repo, and welcome new users by posting what is the purpose of the room etc.</p>

<p>I was surprised to find very little documents or bots on how to run a matrix bot. I decided to go with <a href="https://github.com/maubot/maubot" rel="nofollow">maubot</a> because I like the idea of plugins. While the interface and the docs leaves something to be desired, it’s actually relatively straightforward. Here’s a short write-up/<a href="https://write.as/houfu/tag:tutorial" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">tutorial</span></a> of how I did it in case it helps someone out there.</p>



<h3 id="step-1-start-a-maubot-server">Step 1: Start a maubot server</h3>

<p>You’re going to need a place where your bot could listen for events and react to them. I decided to go with my Contabo VPS which I used to run docker compose services.</p>

<p>The documentation does not provide instructions on how to use docker compose with the <a href="https://write.as/houfu/tag:docker" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">docker</span></a> image, and the instructions on reverse proxy leaves out <a href="https://write.as/houfu/tag:traefik" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">traefik</span></a>. Having skewered many services into docker compose yaml, I was unfazed.</p>

<p>Add this to your docker compose file, and you will get maubot with traefik SSL.</p>

<pre><code class="language-yaml">  maubot:
    image: dock.mau.dev/maubot/maubot:latest
    restart: always
    volumes:
      - ./maubot:/data:z
    labels:
      - traefik.backend=maubot
      - traefik.http.routers.maubot.rule=Host(`maubot.example.com`)
      - traefik.http.routers.maubot.tls=true
      - traefik.http.routers.maubot.tls.certresolver=myresolver
      - traefik.http.middlewares.maubot-redirect.redirectscheme.scheme=https
      - traefik.http.middlewares.maubot-redirect.redirectscheme.permanent=true
      - traefik.http.routers.maubot.middlewares=maubot-redirect
      - traefik.http.services.maubot.loadbalancer.server.port=29316
</code></pre>

<p>Remember you need to modify the example to your circumstances: 1) correct domain name for your server, 2) create a directory for the data  and 3) fix the reference to the SSL certificate resolver for traefik.</p>

<p>Run <code>docker compose up -d</code> and docker should now pull the maubot image and start running it.</p>

<p>At this point, you should go to the data directory you created for maubot and look for “config.yaml” file. You can look at all the settings and decide whether you need to change them. However, you need to do this now: add an admin user in the “admins” section of the file by providing a user name with a password as a value.</p>

<h3 id="step-2-create-a-new-user-to-be-the-bot">Step 2: Create a new user to be the bot</h3>

<p>I wanted a special user to be the bot for my room, so I registered one in my home matrix server for this purpose. It’s like signing up for the service again. There’s nothing special in this step.</p>

<p>You do need to take note of the “access token” for a future step. Find it in Element by pressing on the “Access Token” dropdown arrow under Settings –&gt; Help &amp; About –&gt; Advanced.</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/s--_9etdjk4--/f_auto,q_auto/v1/blog-images/wgpbe4qu4flrpwcandus" alt="Screenshot of access token screen."/></p>

<h3 id="step-3-create-a-client-on-the-maubot-manager">Step 3: Create a client on the Maubot Manager</h3>

<p>Now let’s dive into creating a bot.</p>

<p>Assuming you’ve got the server up, you can now visit the Maubot manager by adding this “_matrix/maubot” to your server’s path and logging in. You should now be able to see the Maubot Manager interface. It allows you to create instances and clients, as well as upload plugins. We’re going to do all three for the first bot we are creating.</p>

<p>First, you’re going to need a client. This is actually the new user you created in step 2. Click on the plus button and add the required details.</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/s--ipZ5Gpx1--/f_auto,q_auto/v1/blog-images/uqqtf11wlpgco48jrp6p" alt="Screenshot of Maubot Manager "/></p>

<p>You’re going to need the details of your bot user’s access token, user ID and homeserver. You can find the user ID in the Settings-General page and it looks like this format: @<em>username:home server.</em> My matrix ID for example is @houfu:matrix.esq.social. The other two information could be found in the screen highlighted in Step 2.</p>

<p>It doesn’t appear to be necessary to fix a device id or avatar url to create your client. You can fill them in later.</p>

<h3 id="step-4-upload-a-plugin">Step 4: Upload a plugin</h3>

<p>It’s time to get the code of the bot in.</p>

<p>You can find a list of plugins available to maubot on this page: <a href="https://plugins.maubot.xyz/" rel="nofollow">https://plugins.maubot.xyz/</a></p>

<p>The plugins I chose were:</p>
<ul><li><a href="https://github.com/maubot/github" rel="nofollow">Github bot</a> to track the updates on the redlines repository.</li>
<li><a href="https://github.com/williamkray/maubot-welcome" rel="nofollow">A welcome bot</a></li></ul>

<p>In order to upload the plugin to your maubot server, you would upload an mbp file for the plugin in the Maubot Manager. In many Github repos, you can find a release with the mbp file you can download. Otherwise, you can clone the repo, install maubot through pip and then run `mbc build` to get the mbp file.</p>

<p>Use the Maubot Manager to upload the plugin.</p>

<h3 id="step-5-create-an-instance">Step 5: Create an instance</h3>

<p>It’s time to bring the code to the bot. Create an instance and link the plugin to the client you created earlier.</p>

<p>Once you have created an instance, you can edit its settings in the box provided. The settings are project specific, so be sure to check the documentation.</p>

<p>Once you have reached this step and checked that everything is enabled and running, your bot is operational and ready for action! (You may need to follow some bot specific instruction like entering commands in your matrix room, so read the docs!)</p>

<h3 id="it-works">It works!</h3>

<p>Marvel at the wonders of automation!</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/s--du5d2VOD--/f_auto,q_auto/v1/blog-images/rzigid0xhjp3zpquf1dz" alt="Screenshot of Element showing a bot in action in a matrix room"/></p>

<p>Have fun with your bots!</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/f_auto,q_auto/v1/blog-images/photo_2023-06-30_23-47-38_ozpz52" alt="Author Portrait" width="320"/>
<strong>Love.Law.Robots. – A blog by Ang Hou Fu</strong></p>
<ul><li><a href="https://remark.as/p/houfu/running-bots-in-your-matrix-room-using-maubot" rel="nofollow">Discuss...</a> this Post</li>
<li>If you found this post useful, or like my work, a tip is always appreciated:  </li>
<li>Follow [this blog on the Fediverse]()</li>
<li>Contact me:
<ul><li><a href="mailto:houfu@lovelawrobots.com" rel="nofollow">Email</a></li>
<li><a href="https://github.com/houfu" rel="nofollow">Github</a></li>
<li><a href="https://kopiti.am/@houfu" rel="nofollow">Personal Mastodon</a></li>
<li><a href="https://www.linkedin.com/in/hou-fu-ang-0a6851113/" rel="nofollow">LinkedIn</a></li>
<li><a href="https://twitter.com/houfu" rel="nofollow">Twitter</a></li></ul></li></ul>


]]></content:encoded>
      <guid>https://write.as/houfu/running-bots-in-your-matrix-room-using-maubot</guid>
      <pubDate>Fri, 08 Sep 2023 01:13:33 +0000</pubDate>
    </item>
    <item>
      <title>Workshopping my little story about redlines</title>
      <link>https://write.as/houfu/workshopping-my-little-story-about-redlines?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Should I submit this as a talk to #geekcampsg? &#xA;label for=&#34;mn-demo&#34; class=&#34;margin-toggle&#34;&amp;#8853;/labelinput type=&#34;checkbox&#34; id=&#34;mn-demo&#34; class=&#34;margin-toggle&#34;/span class=&#34;marginnote&#34;I originally reserved this for Tech.Law.Fest, but chickened out when I was not sure there was an opportunity to speak. (On hindsight, my hunch was probably right.)/spanI am thinking about lots of things: is this an interesting topic to share, is it a 5-10 mins or 30-45 mins presentation? While I continue procrastinating on taking the plunge, I thought I would outline the topic here for future reference. Feel free to let me know of your comments!&#xA;&#xA;A lawyer is drawing thick red lines on a document. &#xA;&#xA;!--more--&#xA;&#xA;It begins with an itch&#xA;&#xA;This story begins when I heard that the #Singapore government decided to simplify its legislation by replacing words with other words. For example, a “writ” is now known as a “originating application”. While I identified with the end goal, I didn’t agree with the method of doing it. My argument wasn’t that I didn’t like the words chosen, it was that the effect was minimal.label for=&#34;mn-demo&#34; class=&#34;margin-toggle&#34;&amp;#8853;/labelinput type=&#34;checkbox&#34; id=&#34;mn-demo&#34; class=&#34;margin-toggle&#34;/span class=&#34;marginnote&#34;If you want to read the result of that project, you can take a look at it here./span&#xA;&#xA;In order to describe this argument, I needed to compute the differences between versions of legislation and show such changes. When I looked for a way in Python to describe differences in text, I found this:&#xA;&#xA;[&#39;    1. Beautiful is better than ugly.\n&#39;,&#xA; &#39;-   2. Explicit is better than implicit.\n&#39;,&#xA; &#39;-   3. Simple is better than complex.\n&#39;,&#xA; &#39;+   3.   Simple is better than complex.\n&#39;,&#xA; &#39;?     ++\n&#39;,&#xA; &#39;-   4. Complex is better than complicated.\n&#39;,&#xA; &#39;?            ^                     ---- ^\n&#39;,&#xA; &#39;+   4. Complicated is better than complex.\n&#39;,&#xA; &#39;?           ++++ ^                      ^\n&#39;,&#xA; &#39;+   5. Flat is better than nested.\n&#39;]&#xA;&#xA;A coder familiar with Python might be able to quickly tell the difference, but to my intended audience of lawyers and non (Python) coders, it looks like a bunch of gobbledygook. I needed something more familiar, like Microsoft Word’s track changes. I also needed in Markdown since this was how Jupyter Notebooks and Streamlit like their text.&#xA;&#xA;I was shocked I couldn’t find anything so I wrote some code myself. It took me about a week of my spare time to whip out a package. \[The post I wrote in 2022 gives more technical details on how the code was written.\] The results looked good enough for a side project of a side project.&#xA;&#xA;A screen capture of PLUS explorer showing the redlines library in action.&#xA;&#xA;That did the job for me and I was happy to leave it as is.&#xA;&#xA;Oh, and to help somebody else, I decided to spin off the code and publish it as an open source standalone package on the #Python package index. It was free anyway, so whatever right? I moved on with my life in relative peace.&#xA;&#xA;I wake up starry eyed&#xA;&#xA;My peaceful life continued quietly for a bout a year as I worked on other things like my day job and ChatGPT. One morning, I woke up to find that my tiny open source project suddenly acquiring a lot of stars on GitHub.&#xA;&#xA;Screenshot of a page on GitHub showing that I reached my stargazer achievement&#xA;&#xA;I was confused until I realised that it was being used to show changes made by AI in an online course. \[I wrote about more initial reaction in a post earlier this year.\]&#xA;&#xA;Since then, I have done many things I could only do as an open source maintainer:&#xA;&#xA;I merged a pull request of code that I didn’t write&#xA;I answered more questions from strangers about the library, so much so that I thought opening a Matrix room was worth it.&#xA;Many of the updates I have written to the library nowadays are requested by others, some of which are challenging on my level.&#xA;&#xA;I never thought when I was just scratching my itch that I would have written a library that other people are using. It’s really gratifying to watch it grow from humble beginnings, especially since I never considered myself to be a professional coder or some of the other really smart guys I admire.&#xA;&#xA;What are some of the challenges of being a maintainer?&#xA;&#xA;Being a maintainer rather than a user required a big shift in thinking.&#xA;&#xA;Accepting code contributions was difficult at first because I disagreed with the way others write. It became easier when I saw it from other people’s point of view. Like me, they contributed the time and code from their free time, with little expectation of gain. That’s not worth getting into fights. In any case, I could always supplement the contribution myself if it was necessary. Getting used to this perspective made the other changes easier.&#xA;Developing in the open required shifts in the way I coded. In the past, when I had an idea, I would work feverishly on my own and released it when I was done. Now whenever I have an idea, I would post an issue on the GitHub repo, label it accordingly and leave it around for a short time before deciding what to do with it. Sometimes I would get comments, and even code that I could integrate into the project.&#xA;Even though it’s nice to receive code and feedback, most of the work is still a one man show. I have to decide direction and when to release, and it’s up to me to make sure the code works for everyone. I also have to be the most knowledgeable person about the project (at least in my matrix room).&#xA;&#xA;What’s the benefits of doing this project?&#xA;&#xA;I have been a #lawyer all my professional life. The way which many lawyers work is very alien to #OpenSource. The caricature looks like this: our work has to be perfect when it is submitted to court or the client. Lawyers don’t develop in the open or in an “agile” manner. Lawyers have to be the smartest in the room, so we don’t regard comments or feedback from others on our work kindly.&#xA;&#xA;Obviously I don’t regard myself as that kind of lawyer, although reality can be very challenging. As far as side projects go, this ticks many boxes:&#xA;&#xA;I get to stretch my coding skills rather than my lawyering skills.&#xA;I get to explore a different kind of “project management”. In the process, I discover new dimensions of myself as a team player and leader.&#xA;I have a lot more empathy for people who code for work. This includes knowing when they’re trying to BS me.&#xA;Even though this does not look obvious initially, I have been able to transfer the knowledge and skills gained doing this work to my work life. It’s allowed me to differentiate myself from my peers.&#xA;&#xA;Another important benefit for me is that I get to meet many new people both online and offline. Frankly, I am the kind of guy who dislikes drinks and meet ups. Many of the people who are interested in a free and open source project that isn’t going to make the news or a lot of money tend to be genuine people. So all this is very gratifying and I have learnt a lot from them.&#xA;&#xA;I do wish more lawyers would try this out, and since this is an open source project, there are many ways to contribute.&#xA;&#xA;What’s next for me&#xA;&#xA;I have a lot of plans for redlines. It’s all there in the issues page or readme on the GitHub repo.&#xA;&#xA;Having gained some experience in maintaining an open source project, I am obviously looking for something more ambitious. I’ll be looking out and hopefully this time I am going to get some help from the open.&#xA;&#xA;img src=&#34;https://res.cloudinary.com/lovelawrobots/image/upload/fauto,qauto/v1/blog-images/photo2023-06-3023-47-38_ozpz52&#34; alt=&#34;Author Portrait&#34; width=&#34;320&#34;/&#xD;&#xA;Love.Law.Robots. - A blog by Ang Hou Fu&#xD;&#xA;&#xD;&#xA;a href=&#34;https://remark.as/p/houfu/workshopping-my-little-story-about-redlines&#34;Discuss.../a this Post&#xD;&#xA;If you found this post useful, or like my work, a tip is always appreciated:  script type=&#34;text/javascript&#34; src=&#34;https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js&#34; data-name=&#34;bmc-button&#34; data-slug=&#34;damonhoufbq&#34; data-color=&#34;#BD5FFF&#34; data-emoji=&#34;&#34;  data-font=&#34;Poppins&#34; data-text=&#34;Buy me a coffee&#34; data-outline-color=&#34;#000000&#34; data-font-color=&#34;#ffffff&#34; data-coffee-color=&#34;#FFDD00&#34; /script&#xD;&#xA;Follow this blog on the Fediverse&#xD;&#xA;Contact me:&#xD;&#xA;     Email&#xD;&#xA;     Github &#xD;&#xA;     Personal Mastodon&#xD;&#xA;     LinkedIn&#xD;&#xA;     Twitter&#xD;&#xA;&#xD;&#xA;!--emailsub--&#xD;&#xA;&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><em>Should I <a href="https://geekcamp.sg/" rel="nofollow">submit this as a talk</a> to <a href="https://write.as/houfu/tag:geekcampsg" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">geekcampsg</span></a>?
<label for="mn-demo" class="margin-toggle">⊕</label><input type="checkbox" id="mn-demo" class="margin-toggle"/><span class="marginnote">I originally reserved this for Tech.Law.Fest, but chickened out when I was not sure there was an opportunity to speak. (On hindsight, my hunch was probably right.)</span>I am thinking about lots of things: is this an interesting topic to share, is it a 5-10 mins or 30-45 mins presentation? While I continue procrastinating on taking the plunge, I thought I would outline the topic here for future reference. Feel free to let me know of your comments!</em></p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/s--SMoU7zQ8--/f_auto,q_auto/v1/blog-images/qorw9n2brhildzq5ivls" alt="A lawyer is drawing thick red lines on a document. "/></p>



<h1 id="it-begins-with-an-itch">It begins with an itch</h1>

<p>This story begins when I heard that the <a href="https://write.as/houfu/tag:Singapore" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Singapore</span></a> government decided to simplify its legislation by replacing words with other words. For example, a “writ” is now known as a “originating application”. While I identified with the end goal, I didn’t agree with the method of doing it. My argument wasn’t that I didn’t like the words chosen, it was that the effect was minimal.<label for="mn-demo" class="margin-toggle">⊕</label><input type="checkbox" id="mn-demo" class="margin-toggle"/><span class="marginnote"><a href="https://www.lovelawrobots.com/evaluating-legislation-for-readability-exploring-plus" rel="nofollow">If you want to read the result of that project, you can take a look at it here.</a></span></p>

<p>In order to describe this argument, I needed to compute the differences between versions of legislation and show such changes. When I looked for a way in Python to describe differences in text, I found this:</p>

<pre><code>[&#39;    1. Beautiful is better than ugly.\n&#39;,
 &#39;-   2. Explicit is better than implicit.\n&#39;,
 &#39;-   3. Simple is better than complex.\n&#39;,
 &#39;+   3.   Simple is better than complex.\n&#39;,
 &#39;?     ++\n&#39;,
 &#39;-   4. Complex is better than complicated.\n&#39;,
 &#39;?            ^                     ---- ^\n&#39;,
 &#39;+   4. Complicated is better than complex.\n&#39;,
 &#39;?           ++++ ^                      ^\n&#39;,
 &#39;+   5. Flat is better than nested.\n&#39;]
</code></pre>

<p>A coder familiar with Python might be able to quickly tell the difference, but to my intended audience of lawyers and non (Python) coders, it looks like a bunch of gobbledygook. I needed something more familiar, like Microsoft Word’s track changes. I also needed in Markdown since this was how Jupyter Notebooks and Streamlit like their text.</p>

<p>I was shocked I couldn’t find anything so I wrote some code myself. It took me about a week of my spare time to whip out a package. [<a href="https://www.lovelawrobots.com/so-what-difference-does-it-make-drawing-red-lines-with-python" rel="nofollow">The post I wrote in 2022 gives more technical details on how the code was written.</a>] The results looked good enough for a side project of a side project.</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/s--hwBjX9ZP--/f_auto,q_auto/v1/blog-images/ogpgvc6zy84wzoas6jgn" alt="A screen capture of PLUS explorer showing the redlines library in action."/></p>

<p>That did the job for me and I was happy to leave it as is.</p>

<p>Oh, and to help somebody else, I decided to spin off the code and publish it as an open source standalone package on the <a href="https://write.as/houfu/tag:Python" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Python</span></a> package index. It was free anyway, so whatever right? I moved on with my life in relative peace.</p>

<h1 id="i-wake-up-starry-eyed">I wake up starry eyed</h1>

<p>My peaceful life continued quietly for a bout a year as I worked on other things like my day job and ChatGPT. One morning, I woke up to find that my tiny open source project suddenly acquiring a lot of stars on GitHub.</p>

<p><img src="http://res-2.cloudinary.com/lovelawrobots/image/upload/q_auto/v1/blog-images/stars_github.png" alt="Screenshot of a page on GitHub showing that I reached my stargazer achievement"/></p>

<p>I was confused until I realised that it was being used to show changes made by AI in <a href="https://www.deeplearning.ai/short-courses/chatgpt-prompt-engineering-for-developers/?ref=lovelawrobots.com" rel="nofollow">an online course</a>. [<a href="https://www.lovelawrobots.com/the-unexpected-joys-of-open-source" rel="nofollow">I wrote about more initial reaction in a post earlier this year.</a>]</p>

<p>Since then, I have done many things I could only do as an open source maintainer:</p>
<ul><li>I merged a pull request of code that I didn’t write</li>
<li>I answered more questions from strangers about the library, so much so that I thought opening a Matrix room was worth it.</li>
<li>Many of the updates I have written to the library nowadays are requested by others, some of which are challenging on my level.</li></ul>

<p>I never thought when I was just scratching my itch that I would have written a library that other people are using. It’s really gratifying to watch it grow from humble beginnings, especially since I never considered myself to be a professional coder or some of the other really smart guys I admire.</p>

<h1 id="what-are-some-of-the-challenges-of-being-a-maintainer">What are some of the challenges of being a maintainer?</h1>

<p>Being a maintainer rather than a user required a big shift in thinking.</p>
<ul><li>Accepting code contributions was difficult at first because I disagreed with the way others write. It became easier when I saw it from other people’s point of view. Like me, they contributed the time and code from their free time, with little expectation of gain. That’s not worth getting into fights. In any case, I could always supplement the contribution myself if it was necessary. Getting used to this perspective made the other changes easier.</li>
<li>Developing in the open required shifts in the way I coded. In the past, when I had an idea, I would work feverishly on my own and released it when I was done. Now whenever I have an idea, I would post an issue on the GitHub repo, label it accordingly and leave it around for a short time before deciding what to do with it. Sometimes I would get comments, and even code that I could integrate into the project.</li>
<li>Even though it’s nice to receive code and feedback, most of the work is still a one man show. I have to decide direction and when to release, and it’s up to me to make sure the code works for everyone. I also have to be the most knowledgeable person about the project (at least in my matrix room).</li></ul>

<h1 id="what-s-the-benefits-of-doing-this-project">What’s the benefits of doing this project?</h1>

<p>I have been a <a href="https://write.as/houfu/tag:lawyer" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">lawyer</span></a> all my professional life. The way which many lawyers work is very alien to <a href="https://write.as/houfu/tag:OpenSource" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">OpenSource</span></a>. The caricature looks like this: our work has to be perfect when it is submitted to court or the client. Lawyers don’t develop in the open or in an “agile” manner. Lawyers have to be the smartest in the room, so we don’t regard comments or feedback from others on our work kindly.</p>

<p>Obviously I don’t regard myself as that kind of lawyer, although reality can be very challenging. As far as side projects go, this ticks many boxes:</p>
<ul><li>I get to stretch my coding skills rather than my lawyering skills.</li>
<li>I get to explore a different kind of “project management”. In the process, I discover new dimensions of myself as a team player and leader.</li>
<li>I have a lot more empathy for people who code for work. This includes knowing when they’re trying to BS me.</li>
<li>Even though this does not look obvious initially, I have been able to transfer the knowledge and skills gained doing this work to my work life. It’s allowed me to differentiate myself from my peers.</li></ul>

<p>Another important benefit for me is that I get to meet many new people both online and offline. Frankly, I am the kind of guy who dislikes drinks and meet ups. Many of the people who are interested in a free and open source project that isn’t going to make the news or a lot of money tend to be genuine people. So all this is very gratifying and I have learnt a lot from them.</p>

<p>I do wish more lawyers would try this out, and since this is an open source project, there are many ways to contribute.</p>

<h1 id="what-s-next-for-me">What’s next for me</h1>

<p>I have a lot of plans for redlines. It’s all there in the issues page or readme on the GitHub repo.</p>

<p>Having gained some experience in maintaining an open source project, I am obviously looking for something more ambitious. I’ll be looking out and hopefully this time I am going to get some help from the open.</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/f_auto,q_auto/v1/blog-images/photo_2023-06-30_23-47-38_ozpz52" alt="Author Portrait" width="320"/>
<strong>Love.Law.Robots. – A blog by Ang Hou Fu</strong></p>
<ul><li><a href="https://remark.as/p/houfu/workshopping-my-little-story-about-redlines" rel="nofollow">Discuss...</a> this Post</li>
<li>If you found this post useful, or like my work, a tip is always appreciated:  </li>
<li>Follow [this blog on the Fediverse]()</li>
<li>Contact me:
<ul><li><a href="mailto:houfu@lovelawrobots.com" rel="nofollow">Email</a></li>
<li><a href="https://github.com/houfu" rel="nofollow">Github</a></li>
<li><a href="https://kopiti.am/@houfu" rel="nofollow">Personal Mastodon</a></li>
<li><a href="https://www.linkedin.com/in/hou-fu-ang-0a6851113/" rel="nofollow">LinkedIn</a></li>
<li><a href="https://twitter.com/houfu" rel="nofollow">Twitter</a></li></ul></li></ul>


]]></content:encoded>
      <guid>https://write.as/houfu/workshopping-my-little-story-about-redlines</guid>
      <pubDate>Sat, 02 Sep 2023 18:11:11 +0000</pubDate>
    </item>
    <item>
      <title>Revisiting Retrieval Augmented Generation</title>
      <link>https://write.as/houfu/revisiting-retrieval-augmented-generation?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[A mouse looks up to a sky with a moon and stars&#xA;&#xA;I’ve been kinda hot and cold on Retrieval Augmented Generation (RAG).&#xA;&#xA;I rushed in and experimented early using an overview of Singapore law. After seeing other locals try to implement them, I scoffed at it. I dismissed it as “grab three relevant articles from my vector db and ask #ChatGPT to write an answer on it”. Now I am going to have a second go.&#xA;&#xA;!--more--&#xA;&#xA;One of the problems I suggested with a simple implementation of RAG concerned the embeddings used to search:&#xA;&#xA;  The granularity of the embeddings made from your data store seems also to have a significant impact. An embedding that takes too wide or narrow a snapshot of your data might miss or jumble the point.&#xA;&#xA;A straightforward way to be more flexible is to divorce the embeddings used for search and the context used for generating an answer.&#xA;&#xA;https://twitter.com/zhanghaili0610/status/1692887244745388125&#xA;&#xA;Once you have more flexibility with the context, there are various ways to play with what is passed to the large language model:&#xA;&#xA;In the previous tweet, it’s suggested that the embeddings can be laser focused, but we can pass the whole document as context.&#xA;We don’t need to pass the whole document as is to the model, instead we can summarise it or even add new context to it.&#xA;&#xA;Now that OpenAI models can accept 16,000 or more tokens, it may be useful to play with how the context is presented to the model.&#xA;&#xA;Currently, I am thinking of an “Ask a Judgement” Chatbot. Court judgements presents an interesting kind of document: they are long, contain several sections, and are also interlinked in complex ways. &#xA;&#xA;Although smooshing it down into a vector database is going to be interesting, I guess  I also have to think about what a user might want to ask a judgement. It’s still worth a fine prototype! I am especially curious to see whether it’s able to resolve my qualms about how RAG does in legal documents.&#xA;&#xA;Let’s keep building!&#xA;&#xA;img src=&#34;https://res.cloudinary.com/lovelawrobots/image/upload/fauto,qauto/v1/blog-images/photo2023-06-3023-47-38ozpz52&#34; alt=&#34;Author Portrait&#34; width=&#34;320&#34;/&#xD;&#xA;Love.Law.Robots. - A blog by Ang Hou Fu&#xD;&#xA;&#xD;&#xA;a href=&#34;https://remark.as/p/houfu/revisiting-retrieval-augmented-generation&#34;Discuss.../a this Post&#xD;&#xA;If you found this post useful, or like my work, a tip is always appreciated:  script type=&#34;text/javascript&#34; src=&#34;https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js&#34; data-name=&#34;bmc-button&#34; data-slug=&#34;damonhoufbq&#34; data-color=&#34;#BD5FFF&#34; data-emoji=&#34;&#34;  data-font=&#34;Poppins&#34; data-text=&#34;Buy me a coffee&#34; data-outline-color=&#34;#000000&#34; data-font-color=&#34;#ffffff&#34; data-coffee-color=&#34;#FFDD00&#34; /script&#xD;&#xA;Follow this blog on the Fediverse&#xD;&#xA;Contact me:&#xD;&#xA;     Email&#xD;&#xA;     Github &#xD;&#xA;     Personal Mastodon&#xD;&#xA;     LinkedIn&#xD;&#xA;     Twitter&#xD;&#xA;&#xD;&#xA;!--emailsub--&#xD;&#xA;&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/s--8DZk3gKi--/f_auto,q_auto/a-mouse-looks-in-a-window-of-a-glass-house-art-deco-uhd-intense-mysterious-perspective-romanti-847029297_nbgyoa" alt="A mouse looks up to a sky with a moon and stars"/></p>

<p>I’ve been kinda hot and cold on Retrieval Augmented Generation (RAG).</p>

<p>I rushed in and <a href="https://www.lovelawrobots.com/can-we-make-chatgpt-better-with-your-data" rel="nofollow">experimented early using an overview of Singapore law</a>. After seeing other locals try to implement them, I scoffed at it. <a href="https://www.lovelawrobots.com/more-thoughts-on-generative-ai" rel="nofollow">I dismissed it</a> as “grab three relevant articles from my vector db and ask <a href="https://write.as/houfu/tag:ChatGPT" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">ChatGPT</span></a> to write an answer on it”. Now I am going to have a second go.</p>



<p>One of the problems I suggested with a simple implementation of RAG concerned the embeddings used to search:</p>

<blockquote><p>The granularity of the embeddings made from your data store seems also to have a significant impact. An embedding that takes too wide or narrow a snapshot of your data might miss or jumble the point.</p></blockquote>

<p>A straightforward way to be more flexible is to divorce the embeddings used for search and the context used for generating an answer.</p>

<p><a href="https://twitter.com/zhanghaili0610/status/1692887244745388125" rel="nofollow">https://twitter.com/zhanghaili0610/status/1692887244745388125</a></p>

<p>Once you have more flexibility with the context, there are various ways to play with what is passed to the large language model:</p>
<ul><li>In the previous tweet, it’s suggested that the embeddings can be laser focused, but we can pass the whole document as context.</li>
<li>We don’t need to pass the whole document as is to the model, instead we can summarise it or even add new context to it.</li></ul>

<p>Now that OpenAI models can accept 16,000 or more tokens, it may be useful to play with how the context is presented to the model.</p>

<p>Currently, I am thinking of an “Ask a Judgement” Chatbot. Court judgements presents an interesting kind of document: they are long, contain several sections, and are also interlinked in complex ways.</p>

<p>Although smooshing it down into a vector database is going to be interesting, I guess  I also have to think about what a user might want to ask a judgement. It’s still worth a fine prototype! I am especially curious to see whether it’s able to resolve my qualms about how RAG does in legal documents.</p>

<p>Let’s keep building!</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/f_auto,q_auto/v1/blog-images/photo_2023-06-30_23-47-38_ozpz52" alt="Author Portrait" width="320"/>
<strong>Love.Law.Robots. – A blog by Ang Hou Fu</strong></p>
<ul><li><a href="https://remark.as/p/houfu/revisiting-retrieval-augmented-generation" rel="nofollow">Discuss...</a> this Post</li>
<li>If you found this post useful, or like my work, a tip is always appreciated:  </li>
<li>Follow [this blog on the Fediverse]()</li>
<li>Contact me:
<ul><li><a href="mailto:houfu@lovelawrobots.com" rel="nofollow">Email</a></li>
<li><a href="https://github.com/houfu" rel="nofollow">Github</a></li>
<li><a href="https://kopiti.am/@houfu" rel="nofollow">Personal Mastodon</a></li>
<li><a href="https://www.linkedin.com/in/hou-fu-ang-0a6851113/" rel="nofollow">LinkedIn</a></li>
<li><a href="https://twitter.com/houfu" rel="nofollow">Twitter</a></li></ul></li></ul>


]]></content:encoded>
      <guid>https://write.as/houfu/revisiting-retrieval-augmented-generation</guid>
      <pubDate>Sat, 26 Aug 2023 23:28:10 +0000</pubDate>
    </item>
    <item>
      <title>How do you price a legal chatbot?</title>
      <link>https://write.as/houfu/how-do-you-price-a-legal-chatbot?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Cover Image by a href=&#34;https://pixabay.com/users/mohamedhassan-5229782/?utmsource=link-attribution&amp;utmmedium=referral&amp;utmcampaign=image&amp;utmcontent=7325332&#34;Mohamed Hassan/a from a href=&#34;https://pixabay.com//?utmsource=link-attribution&amp;utmmedium=referral&amp;utmcampaign=image&amp;utmcontent=7325332&#34;Pixabay/a&#xA;&#xA;I used to think #chatbots are lame. You type stuff in and pray the “AI” understood what you said. If you knew what you want, you’re not going to ask nicely. Just give me a button or a dropdown!&#xA;&#xA;With #GenAI like #ChatGPT, the odds of hitting the mark with your program have improved. I explored making a legal chatbot early on but I hit a dead-end when I couldn’t figure out what the use case is. &#xA;&#xA;Even if I did figure out a use case, the next problem if I wanted to take it to the next level is pricing. How do you charge someone for using your legal chatbot?&#xA;&#xA;!--more--&#xA;&#xA;Luckily for me, somebody else appeared to have walked the same path as me. &#xA;&#xA;A few weeks ago, I talked about “Scott”, a legal chatbot which performs augmented data retrieval over cases in Singapore. I tried it at an early stage. Suffice to say, I am not its target audience, and I wondered aloud whether it was worth it.&#xA;&#xA;I am still glad it graduated from “Beta”, and it now has a pricing model too.&#xA;&#xA;A pricing chart for Scott, a litigation assistant that works like a Chatbot.&#xA;&#xA;If you read past the marketing shtick, there is only one price for this chatbot — $720 for 6 months, aka $120 per month. As a comparison, if you don’t want fancy schmancy AI, a single user would pay SAL $85 a month for a boolean search engine over roughly the same materials. &#xA;&#xA;I found the idea of limiting the output of a chatbot to be very interesting. A simple way to illustrate is to tell the user to cough up more dough for the GPT-4 answer rather than the GPT-3.5 answer. It might be tough to get a customer to understand how a GPT-4 answer is different from a GPT-3.5 answer. I haven’t seen anyone try this yet, although I feel it is technically doable.&#xA;&#xA;As a lawyer though, I am kinda hesitant about giving a “half” or “flawed” product to my users. If the answer do suck, would I be liable for giving it? This smells like litigation waiting around the corner. &#xA;&#xA;Another issue in my mind is how to entice others to try it. Chatbots are hardly used by most people for legal information, let alone used effectively to demonstrate its value. A “freemium” model is probably imperative in this regard. A 7 day “try it yourself” window is probably not sufficient for most people to evaluate the product though. Furthermore, if I need something specific from a chatbot, I am going to go in, get what I want and get out before paying. &#xA;&#xA; For now, my thinking goes like this:&#xA;&#xA;A basic subscription level which has limited “skills” rather than output.&#xA;A premium level which possess desirable skills (generating documents, contracts, agents etc). It should be easy to transition between basic and premium levels, because users want different things and I want my users to stay with me.&#xA;&#xA;Given that skills are a important differentiating factor, this has to be built into the fundamental design of the chatbot.&#xA;&#xA;Disclaimer: Obviously, I haven’t tried this out in the wild and the idea of a legal chatbot is still mostly in the drawing boards. So, I would want to keep working on this in my spare time.  &#xA;&#xA;img src=&#34;https://res.cloudinary.com/lovelawrobots/image/upload/fauto,qauto/v1/blog-images/photo2023-06-3023-47-38ozpz52&#34; alt=&#34;Author Portrait&#34; width=&#34;320&#34;/&#xD;&#xA;Love.Law.Robots. - A blog by Ang Hou Fu&#xD;&#xA;&#xD;&#xA;a href=&#34;https://remark.as/p/houfu/how-do-you-price-a-legal-chatbot&#34;Discuss.../a this Post&#xD;&#xA;If you found this post useful, or like my work, a tip is always appreciated:  script type=&#34;text/javascript&#34; src=&#34;https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js&#34; data-name=&#34;bmc-button&#34; data-slug=&#34;damonhoufbq&#34; data-color=&#34;#BD5FFF&#34; data-emoji=&#34;&#34;  data-font=&#34;Poppins&#34; data-text=&#34;Buy me a coffee&#34; data-outline-color=&#34;#000000&#34; data-font-color=&#34;#ffffff&#34; data-coffee-color=&#34;#FFDD00&#34; /script&#xD;&#xA;Follow this blog on the Fediverse&#xD;&#xA;Contact me:&#xD;&#xA;     Email&#xD;&#xA;     Github &#xD;&#xA;     Personal Mastodon&#xD;&#xA;     LinkedIn&#xD;&#xA;     Twitter&#xD;&#xA;&#xD;&#xA;!--emailsub--&#xD;&#xA;&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/s---5d1CvVK--/f_auto,q_auto/v1/blog-images/customer-service-7325332_1280_kxnbag" alt="Cover Image by &lt;a href=&#34;https://pixabay.com/users/mohamed_hassan-5229782/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=7325332&#34;&gt;Mohamed Hassan&lt;/a&gt; from &lt;a href=&#34;https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=7325332&#34;&gt;Pixabay&lt;/a&gt;"/></p>

<p>I used to think <a href="https://write.as/houfu/tag:chatbots" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">chatbots</span></a> are lame. You type stuff in and pray the “AI” understood what you said. If you knew what you want, you’re not going to ask nicely. Just give me a button or a dropdown!</p>

<p>With <a href="https://write.as/houfu/tag:GenAI" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">GenAI</span></a> like <a href="https://write.as/houfu/tag:ChatGPT" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">ChatGPT</span></a>, the odds of hitting the mark with your program have improved. I explored making a legal chatbot early on but I hit a dead-end when I couldn’t figure out what the use case is.</p>

<p>Even if I did figure out a use case, the next problem if I wanted to take it to the next level is <em>pricing</em>. How do you charge someone for using your legal chatbot?</p>



<p>Luckily for me, somebody else appeared to have walked the same path as me.</p>

<p>A few weeks ago, I talked about “Scott”, a legal chatbot which performs augmented data retrieval over cases in Singapore. I tried it at an early stage. Suffice to say, I am not its target audience, and <a href="https://www.lovelawrobots.com/more-thoughts-on-generative-ai" rel="nofollow">I wondered aloud whether it was worth it</a>.</p>

<p>I am still glad it graduated from “Beta”, and it now has a pricing model too.</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/s--yHruKkoq--/f_auto,q_auto/v1/blog-images/Screenshot_2023-08-08_at_21-40-39_SCOTT_-_Your_litigation_research_assistant_fxbgkh" alt="A pricing chart for Scott, a litigation assistant that works like a Chatbot." title="Source: https://scott.intelllex.com/"/></p>

<p>If you read past the marketing shtick, there is only one price for this chatbot — $720 for 6 months, aka $120 per month. As a comparison, if you don’t want fancy schmancy AI, a single user would pay SAL <a href="https://www.lawnet.sg/lawnet/web/lawnet/lawnet-basic-subscription-pricing?p_p_id=56_INSTANCE_Ukw4Jvssvu8A&amp;p_p_state=exclusive" rel="nofollow">$85</a> a month for a boolean search engine over roughly the same materials.</p>

<p>I found the idea of limiting the output of a chatbot to be very interesting. A simple way to illustrate is to tell the user to cough up more dough for the GPT-4 answer rather than the GPT-3.5 answer. It might be tough to get a customer to understand how a GPT-4 answer is different from a GPT-3.5 answer. I haven’t seen anyone try this yet, although I feel it is technically doable.</p>

<p>As a lawyer though, I am kinda hesitant about giving a “half” or “flawed” product to my users. If the answer do suck, would I be liable for giving it? This smells like litigation waiting around the corner.</p>

<p>Another issue in my mind is how to entice others to try it. Chatbots are hardly used by most people for legal information, let alone used effectively to demonstrate its value. A “freemium” model is probably imperative in this regard. A 7 day “try it yourself” window is probably not sufficient for most people to evaluate the product though. Furthermore, if I need something specific from a chatbot, I am going to go in, get what I want and get out before paying.</p>

<p> For now, my thinking goes like this:</p>
<ul><li>A basic subscription level which has limited “skills” rather than output.</li>
<li>A premium level which possess desirable skills (generating documents, contracts, agents etc). It should be easy to transition between basic and premium levels, because users want different things and I want my users to stay with me.</li></ul>

<p>Given that skills are a important differentiating factor, this has to be built into the fundamental design of the chatbot.</p>

<p><strong>Disclaimer</strong>: Obviously, I haven’t tried this out in the wild and the idea of a legal chatbot is still mostly in the drawing boards. So, I would want to keep working on this in my spare time.</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/f_auto,q_auto/v1/blog-images/photo_2023-06-30_23-47-38_ozpz52" alt="Author Portrait" width="320"/>
<strong>Love.Law.Robots. – A blog by Ang Hou Fu</strong></p>
<ul><li><a href="https://remark.as/p/houfu/how-do-you-price-a-legal-chatbot" rel="nofollow">Discuss...</a> this Post</li>
<li>If you found this post useful, or like my work, a tip is always appreciated:  </li>
<li>Follow [this blog on the Fediverse]()</li>
<li>Contact me:
<ul><li><a href="mailto:houfu@lovelawrobots.com" rel="nofollow">Email</a></li>
<li><a href="https://github.com/houfu" rel="nofollow">Github</a></li>
<li><a href="https://kopiti.am/@houfu" rel="nofollow">Personal Mastodon</a></li>
<li><a href="https://www.linkedin.com/in/hou-fu-ang-0a6851113/" rel="nofollow">LinkedIn</a></li>
<li><a href="https://twitter.com/houfu" rel="nofollow">Twitter</a></li></ul></li></ul>


]]></content:encoded>
      <guid>https://write.as/houfu/how-do-you-price-a-legal-chatbot</guid>
      <pubDate>Tue, 08 Aug 2023 14:54:45 +0000</pubDate>
    </item>
    <item>
      <title>Your first coding language: what&#39;s wrong with Python</title>
      <link>https://write.as/houfu/your-first-coding-language-whats-wrong-with-python?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[I saw this post the other day that got me thinking about how I learnt to #code.&#xA;&#xA;https://twitter.com/dmimno/status/1679474354579488771&#xA;&#xA;It was a great opportunity for me to revisit a post I wrote nearly a year ago on the subject: So you want to code? (Lawyer Edition)&#xA;&#xA;!--more--&#xA;&#xA;The original poster concludes on why getting people to learn #Python as a first language is bad:&#xA;&#xA;  Remember how pythons kill. Not with teeth or venom, but by embracing you and slowly squeezing. The only reason we use this language is because everyone else does. We can discuss what&#39;s better, but we need to acknowledge that python is not good.&#xA;&#xA;This might suggest that people shouldn&#39;t learn Python as a first language, but once you study the substance of his complaints, it doesn&#39;t hold water:&#xA;&#xA;Package hell: it&#39;s true that this is a problem with Python, especially when compared to installing something on Windows. I&#39;m not sure how to &#34;solve&#34; this. The basic idea, which works for many installation instructions for python, is to create a virtual environment. I haven&#39;t had much problems with this issue once I understood the point of isolating your program&#39;s environment.&#xA;&#xA;For some strange reason, using for loops is slower than other ways of iterating: nobody is stopping anyone from using for loops. Besides, computers are so fast these days, whatever differences in performance is likely unintelligible to a beginner.&#xA;&#xA;Unhelpful error messages: I have never experienced great error messages when I was a beginner, and they were always bewildering, frustrating and unhelpful at first. JavaScript wasn&#39;t an exception. It&#39;s a learning curve, and if you&#39;re serious about coding, you need to figure this one out in any language.&#xA;&#xA;It&#39;s slow: seems similar to problem 2.&#xA;&#xA;As I read my old post, I realised I never made any recommendations on #programming languages. This is the relevant paragraph.&#xA;&#xA;  So, this is my suggestion: don’t aim to conquer programming languages or produce full-blown applications to rival a LegalTech company you’ve always admired on your own. Focus instead on developing proof of concepts or pushing the tools you are already familiar with as far as you can go. In addition, look at no code or low code alternatives to get easy wins.&#xA;&#xA;I am a firm believer in using the best tool for the job. For example, web development in Javascript is miles ahead of any other language. Though I&#39;ve dabbled in the growing list of Python projects which promise to match React and Next.js, it&#39;s not meeting my expectations. Having said that, I seem to be delaying myself whenever I have to do some frontend work. I guess I am not looking forward to coding in #Javascript.&#xA;&#xA;So, if you want my opinion on what should your first programming language, I would recommend Python for the ecosystem, the docs and the &#34;batteries included&#34;. In an imperfect world, it&#39;s the best.&#xA;&#xA;img src=&#34;https://res.cloudinary.com/lovelawrobots/image/upload/fauto,qauto/v1/blog-images/photo2023-06-3023-47-38_ozpz52&#34; alt=&#34;Author Portrait&#34; width=&#34;320&#34;/&#xD;&#xA;Love.Law.Robots. - A blog by Ang Hou Fu&#xD;&#xA;&#xD;&#xA;a href=&#34;https://remark.as/p/houfu/your-first-coding-language-whats-wrong-with-python&#34;Discuss.../a this Post&#xD;&#xA;If you found this post useful, or like my work, a tip is always appreciated:  script type=&#34;text/javascript&#34; src=&#34;https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js&#34; data-name=&#34;bmc-button&#34; data-slug=&#34;damonhoufbq&#34; data-color=&#34;#BD5FFF&#34; data-emoji=&#34;&#34;  data-font=&#34;Poppins&#34; data-text=&#34;Buy me a coffee&#34; data-outline-color=&#34;#000000&#34; data-font-color=&#34;#ffffff&#34; data-coffee-color=&#34;#FFDD00&#34; /script&#xD;&#xA;Follow this blog on the Fediverse&#xD;&#xA;Contact me:&#xD;&#xA;     Email&#xD;&#xA;     Github &#xD;&#xA;     Personal Mastodon&#xD;&#xA;     LinkedIn&#xD;&#xA;     Twitter&#xD;&#xA;&#xD;&#xA;!--emailsub--&#xD;&#xA;&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>I saw this post the other day that got me thinking about how I learnt to <a href="https://write.as/houfu/tag:code" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">code</span></a>.</p>

<p><a href="https://twitter.com/dmimno/status/1679474354579488771" rel="nofollow">https://twitter.com/dmimno/status/1679474354579488771</a></p>

<p>It was a great opportunity for me to revisit a post I wrote nearly a year ago on the subject: <a href="https://www.lovelawrobots.com/so-you-want-to-code" rel="nofollow">So you want to code? (Lawyer Edition)</a></p>



<p>The original poster concludes on why getting people to learn <a href="https://write.as/houfu/tag:Python" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Python</span></a> as a first language is bad:</p>

<blockquote><p>Remember how pythons kill. Not with teeth or venom, but by embracing you and slowly squeezing. The only reason we use this language is because everyone else does. We can discuss what&#39;s better, but we need to acknowledge that python is not good.</p></blockquote>

<p>This might suggest that people shouldn&#39;t learn Python as a first language, but once you study the substance of his complaints, it doesn&#39;t hold water:</p>
<ol><li><p>Package hell: it&#39;s true that this is a problem with Python, especially when compared to installing something on Windows. I&#39;m not sure how to “solve” this. The basic idea, which works for many installation instructions for python, is to create a virtual environment. I haven&#39;t had much problems with this issue once I understood the point of isolating your program&#39;s environment.</p></li>

<li><p>For some strange reason, using for loops is slower than other ways of iterating: nobody is stopping anyone from using for loops. Besides, computers are so fast these days, whatever differences in performance is likely unintelligible to a beginner.</p></li>

<li><p>Unhelpful error messages: I have never experienced great error messages when I was a beginner, and they were always bewildering, frustrating and unhelpful at first. JavaScript wasn&#39;t an exception. It&#39;s a learning curve, and if you&#39;re serious about coding, you need to figure this one out in any language.</p></li>

<li><p>It&#39;s slow: seems similar to problem 2.</p></li></ol>

<p>As I read my old post, I realised I never made any recommendations on <a href="https://write.as/houfu/tag:programming" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">programming</span></a> languages. This is the relevant paragraph.</p>

<blockquote><p>So, this is my suggestion: don’t aim to conquer programming languages or produce full-blown applications to rival a LegalTech company you’ve always admired on your own. Focus instead on developing proof of concepts or pushing the tools you are already familiar with as far as you can go. In addition, look at no code or low code alternatives to get easy wins.</p></blockquote>

<p>I am a firm believer in using the best tool for the job. For example, web development in Javascript is miles ahead of any other language. Though I&#39;ve dabbled in the growing list of Python projects which promise to match React and Next.js, it&#39;s not meeting my expectations. Having said that, I seem to be delaying myself whenever I have to do some frontend work. I guess I am not looking forward to coding in <a href="https://write.as/houfu/tag:Javascript" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Javascript</span></a>.</p>

<p>So, if you want my opinion on what should your first programming language, I would recommend Python for the ecosystem, the docs and the “batteries included”. In an imperfect world, it&#39;s the best.</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/f_auto,q_auto/v1/blog-images/photo_2023-06-30_23-47-38_ozpz52" alt="Author Portrait" width="320"/>
<strong>Love.Law.Robots. – A blog by Ang Hou Fu</strong></p>
<ul><li><a href="https://remark.as/p/houfu/your-first-coding-language-whats-wrong-with-python" rel="nofollow">Discuss...</a> this Post</li>
<li>If you found this post useful, or like my work, a tip is always appreciated:  </li>
<li>Follow [this blog on the Fediverse]()</li>
<li>Contact me:
<ul><li><a href="mailto:houfu@lovelawrobots.com" rel="nofollow">Email</a></li>
<li><a href="https://github.com/houfu" rel="nofollow">Github</a></li>
<li><a href="https://kopiti.am/@houfu" rel="nofollow">Personal Mastodon</a></li>
<li><a href="https://www.linkedin.com/in/hou-fu-ang-0a6851113/" rel="nofollow">LinkedIn</a></li>
<li><a href="https://twitter.com/houfu" rel="nofollow">Twitter</a></li></ul></li></ul>


]]></content:encoded>
      <guid>https://write.as/houfu/your-first-coding-language-whats-wrong-with-python</guid>
      <pubDate>Wed, 19 Jul 2023 15:37:22 +0000</pubDate>
    </item>
    <item>
      <title>What&#39;s intelligence?</title>
      <link>https://write.as/houfu/whats-intelligence?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Watching large language models spew words at each other hasn&#39;t improved my understanding of them.&#xA;&#xA;image&#xA;&#xA;!--more--&#xA;&#xA;Since I wrote that post on the court hearing stimulator for Prompt Engineering for Lawyers, I&#39;ve been obsessed with how I would implement it.&#xA;&#xA;As a lesson on prompt engineering, I aimed to show you can do with one #ChatGPT prompt or chat. To be fair, it got very far. ChatGPT was able to argue with itself and the hearing reached its termination point fairly often.&#xA;&#xA;However I won&#39;t implement a court hearing simulator with ChatGPT this way. If I could create various chats using the API, I would want to tweak each one to my favourite settings and watch them run. There are also other features such as recording results which would have been out of scope in the original experiment.&#xA;&#xA;That&#39;s what I did with my casually named &#34;AI Lawyers Battle Royale&#34; project. I&#39;m still working on it, so I only have a GitHub link. However it&#39;s already boasting a cleaner interface and scope for me to use more fact patterns and scenarios. It also has an autopilot mode, so if you are not fond of arguing, you can get ChatGPT to do everything for you. Do give it a shot if you know how to run #streamlit apps and have an #OpenAI key.&#xA;&#xA;Eventually I am hoping to emulate an experiment like the authors in &#34;Language Model Negotiation with Self-Play and In-Context Learning from AI Feedback&#34;. https://arxiv.org/abs/2305.10142&#xA;&#xA;To summarise the paper, the authors managed to get various language models to negotiate on what price to buy a balloon and to learn from itself how to improve its position. (Spoiler: only some models can do this and returns diminish really fast)&#xA;&#xA;Let&#39;s see how some of these models do on arguing legal applications, a truly word generating task. For now, the AI is able to come up with a pretty cogent heating.&#xA;&#xA;I&#39;ll experiment some more and tell you about what I find if it&#39;s interesting.&#xA;&#xA;For now I am getting a bit sceptical whether AI was persuaded by one argument or the other, or if this is all a statistical mumbo jumbo.&#xA;&#xA;I was alerted to this possibility when I asked one litigant to write in the voice of a ten year old while the other was normal. Besides my impression that there seem to be limits in directing ChatGPT how to argue, I found that ChatGPT judge selected the ten year old to win in a few rounds.&#xA;&#xA;This means that either (a) ChatGPT has no bias in deciding who wins or (b) ChatGPT doesn&#39;t care who wins. Of course it is also possible that ChatGPT was able to reach a decision based on the arguments.&#xA;&#xA;Hopefully with more data, I can reach some conclusions. For example, if it is true that decisions are random, we would see the same distribution for difficult hearings and straightforward hearings. If ChatGPT can refer to arguments, we would expect that capable lawyers (assisted by a coach, perhaps) will outperform those with less ability.&#xA;&#xA;I would also like to try some open source models too for comparison and experience.&#xA;&#xA;Let the battles begin!&#xA;&#xA;img src=&#34;https://res.cloudinary.com/lovelawrobots/image/upload/fauto,qauto/v1/blog-images/photo2023-06-3023-47-38_ozpz52&#34; alt=&#34;Author Portrait&#34; width=&#34;320&#34;/&#xD;&#xA;Love.Law.Robots. - A blog by Ang Hou Fu&#xD;&#xA;&#xD;&#xA;a href=&#34;https://remark.as/p/houfu/whats-intelligence&#34;Discuss.../a this Post&#xD;&#xA;If you found this post useful, or like my work, a tip is always appreciated:  script type=&#34;text/javascript&#34; src=&#34;https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js&#34; data-name=&#34;bmc-button&#34; data-slug=&#34;damonhoufbq&#34; data-color=&#34;#BD5FFF&#34; data-emoji=&#34;&#34;  data-font=&#34;Poppins&#34; data-text=&#34;Buy me a coffee&#34; data-outline-color=&#34;#000000&#34; data-font-color=&#34;#ffffff&#34; data-coffee-color=&#34;#FFDD00&#34; /script&#xD;&#xA;Follow this blog on the Fediverse&#xD;&#xA;Contact me:&#xD;&#xA;     Email&#xD;&#xA;     Github &#xD;&#xA;     Personal Mastodon&#xD;&#xA;     LinkedIn&#xD;&#xA;     Twitter&#xD;&#xA;&#xD;&#xA;!--emailsub--&#xD;&#xA;&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><em><strong>Watching large language models spew words at each other hasn&#39;t improved my understanding of them.</strong></em></p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/s--sv6ViSnv--/f_auto,q_auto/photo-1678845530864-18a666ca9762_cusp1a" alt="image"/></p>



<p>Since I wrote <a href="http://www.lovelawrobots.com/chatgpt-a-court-room-simulator" rel="nofollow">that post on the court hearing stimulator for Prompt Engineering for Lawyers</a>, I&#39;ve been obsessed with how I would implement it.</p>

<p>As <a href="https://prompt-engineer-lawyers.streamlit.app" rel="nofollow">a lesson on prompt engineering</a>, I aimed to show you can do with one <a href="https://write.as/houfu/tag:ChatGPT" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">ChatGPT</span></a> prompt or chat. To be fair, it got very far. ChatGPT was able to argue with itself and the hearing reached its termination point fairly often.</p>

<p>However I won&#39;t implement a court hearing simulator with ChatGPT this way. If I could create various chats using the API, I would want to tweak each one to my favourite settings and watch them run. There are also other features such as recording results which would have been out of scope in the original experiment.</p>

<p>That&#39;s what I did with my casually named “<em>AI Lawyers Battle Royale</em>” project. I&#39;m still working on it, so I only have a <a href="https://github.com/houfu/AI_Lawyers_Battle_Royale" rel="nofollow">GitHub link</a>. However it&#39;s already boasting a cleaner interface and scope for me to use more fact patterns and scenarios. It also has an autopilot mode, so if you are not fond of arguing, you can get ChatGPT to do everything for you. Do give it a shot if you know how to run <a href="https://write.as/houfu/tag:streamlit" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">streamlit</span></a> apps and have an <a href="https://write.as/houfu/tag:OpenAI" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">OpenAI</span></a> key.</p>

<p>Eventually I am hoping to emulate an experiment like the authors in “Language Model Negotiation with Self-Play and In-Context Learning from AI Feedback”. <a href="https://arxiv.org/abs/2305.10142" rel="nofollow">https://arxiv.org/abs/2305.10142</a></p>

<p>To summarise the paper, the authors managed to get various language models to negotiate on what price to buy a balloon and to learn from itself how to improve its position. (Spoiler: only some models can do this and returns diminish really fast)</p>

<p>Let&#39;s see how some of these models do on arguing legal applications, a truly word generating task. For now, the AI is able to come up with a pretty cogent heating.</p>

<p>I&#39;ll experiment some more and tell you about what I find if it&#39;s interesting.</p>

<p>For now I am getting a bit sceptical whether AI was persuaded by one argument or the other, or if this is all a statistical mumbo jumbo.</p>

<p>I was alerted to this possibility when I asked one litigant to write in the voice of a ten year old while the other was normal. Besides my impression that there seem to be limits in directing ChatGPT how to argue, I found that ChatGPT judge selected the ten year old to win in a few rounds.</p>

<p>This means that either (a) ChatGPT has no bias in deciding who wins or (b) ChatGPT doesn&#39;t care who wins. Of course it is also possible that ChatGPT was able to reach a decision based on the arguments.</p>

<p>Hopefully with more data, I can reach some conclusions. For example, if it is true that decisions are random, we would see the same distribution for difficult hearings and straightforward hearings. If ChatGPT can refer to arguments, we would expect that capable lawyers (assisted by a coach, perhaps) will outperform those with less ability.</p>

<p>I would also like to try some open source models too for comparison and experience.</p>

<p>Let the battles begin!</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/f_auto,q_auto/v1/blog-images/photo_2023-06-30_23-47-38_ozpz52" alt="Author Portrait" width="320"/>
<strong>Love.Law.Robots. – A blog by Ang Hou Fu</strong></p>
<ul><li><a href="https://remark.as/p/houfu/whats-intelligence" rel="nofollow">Discuss...</a> this Post</li>
<li>If you found this post useful, or like my work, a tip is always appreciated:  </li>
<li>Follow [this blog on the Fediverse]()</li>
<li>Contact me:
<ul><li><a href="mailto:houfu@lovelawrobots.com" rel="nofollow">Email</a></li>
<li><a href="https://github.com/houfu" rel="nofollow">Github</a></li>
<li><a href="https://kopiti.am/@houfu" rel="nofollow">Personal Mastodon</a></li>
<li><a href="https://www.linkedin.com/in/hou-fu-ang-0a6851113/" rel="nofollow">LinkedIn</a></li>
<li><a href="https://twitter.com/houfu" rel="nofollow">Twitter</a></li></ul></li></ul>


]]></content:encoded>
      <guid>https://write.as/houfu/whats-intelligence</guid>
      <pubDate>Tue, 11 Jul 2023 05:30:58 +0000</pubDate>
    </item>
    <item>
      <title>Christmas won&#39;t be here for a while</title>
      <link>https://write.as/houfu/christmas-wont-be-here-for-a-while?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Houfu dreams of having his #MachineLearning tool for years but will still have to wait longer.&#xA;&#xA;Screenshot from Prodigy showing a/b testing of prompts&#xA;&#xA;!--more--&#xA;&#xA;Back in the pre-#ChatGPT days, I had long wanted to make my machine-learning model but eventually never got around to it because of the lack of data I had. In this sense, &#34;lack of data&#34; didn&#39;t mean I was stuck in a desert. There was lots of data lying around; it just didn&#39;t make sense because it was trapped in scanned PDFs.&#xA;&#xA;Another aspect of this problem was that it had to be adequately annotated before the machine could detect information like named entities or classify them. For that #annotation work, I have dreamt of using #Prodigy, from the makers of #spaCy. I still have the four-button sticker which you use to confirm your annotation!&#xA;&#xA;In another quaint example of how ChatGPT has upended this field, annotation is now less important since large language models are pretty good at classification, sentiment analysis or detecting entities in a few-shot or zero-shot scenario.&#xA;&#xA;Unfortunately, this large language model has created a new problem. I don&#39;t know how to handle all my creativity regarding #prompts. If I don&#39;t commit them to git, I will lose them quite quickly. Even if I remember all of them, how do I know which prompt was effective? It would be good to collect them so I can also test them on a new model.&#xA;&#xA;Currently, it&#39;s still rather ad-hoc. I... I keep them in my #Notion and rate them with my notes on what I thought of their effectiveness and room for improvement. &#xA;&#xA;Screenshot of a Notion page used to keep my notes on the prompts I have used&#xA;&#xA;It turned out to be tedious and quite hard to improve. It reminded me of a spellbook filled with incantations. &#xA;&#xA;So it was heartening to see that the new version of Prodigy has some new workflows for prompt engineering:&#xA;&#xA;https://twitter.com/explosionai/status/1676876788570681346?s=20&#xA;&#xA;The idea of a prompt tournament and generating tests with OpenAI integration will help check how effective my prompts can be. &#xA;&#xA;Alas, the USD390 price tag is still putting me off all these years. I know it&#39;s value for money, but I can&#39;t pay for it. However, it&#39;s great knowing they are going in the right direction. Maybe when they have added more prompt engineering and LLM solutions (and a healthy dose of inflation), I will no longer be able to resist it. &#xA;&#xA;In any case, this must be a clear sign that prompt engineering is here to stay, and rather than a mysterious art, it can be a science too.&#xA;&#xA;img src=&#34;https://res.cloudinary.com/lovelawrobots/image/upload/fauto,qauto/v1/blog-images/photo2023-06-3023-47-38_ozpz52&#34; alt=&#34;Author Portrait&#34; width=&#34;320&#34;/&#xD;&#xA;Love.Law.Robots. - A blog by Ang Hou Fu&#xD;&#xA;&#xD;&#xA;a href=&#34;https://remark.as/p/houfu/christmas-wont-be-here-for-a-while&#34;Discuss.../a this Post&#xD;&#xA;If you found this post useful, or like my work, a tip is always appreciated:  script type=&#34;text/javascript&#34; src=&#34;https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js&#34; data-name=&#34;bmc-button&#34; data-slug=&#34;damonhoufbq&#34; data-color=&#34;#BD5FFF&#34; data-emoji=&#34;&#34;  data-font=&#34;Poppins&#34; data-text=&#34;Buy me a coffee&#34; data-outline-color=&#34;#000000&#34; data-font-color=&#34;#ffffff&#34; data-coffee-color=&#34;#FFDD00&#34; /script&#xD;&#xA;Follow this blog on the Fediverse&#xD;&#xA;Contact me:&#xD;&#xA;     Email&#xD;&#xA;     Github &#xD;&#xA;     Personal Mastodon&#xD;&#xA;     LinkedIn&#xD;&#xA;     Twitter&#xD;&#xA;&#xD;&#xA;!--emailsub--&#xD;&#xA;&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><em><strong>Houfu dreams of having his <a href="https://write.as/houfu/tag:MachineLearning" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">MachineLearning</span></a> tool for years but will still have to wait longer.</strong></em></p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/f_auto,q_auto/Screenshot_2023-07-07_at_00-14-50_Built-in_Recipes_Prodigy_An_annotation_tool_for_AI_Machine_Learning_NLP_fmy9fa" alt="Screenshot from Prodigy showing a/b testing of prompts"/></p>



<p>Back in the pre-<a href="https://write.as/houfu/tag:ChatGPT" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">ChatGPT</span></a> days, I had long wanted to make my machine-learning model but eventually never got around to it because of the lack of data I had. In this sense, “lack of data” didn&#39;t mean I was stuck in a desert. There was lots of data lying around; it just didn&#39;t make sense because <a href="mining-pdfs-to-obtain-better-text-from-decisions" rel="nofollow">it was trapped in scanned PDFs</a>.</p>

<p>Another aspect of this problem was that it had to be adequately annotated before the machine could detect information like named entities or classify them. For that <a href="https://write.as/houfu/tag:annotation" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">annotation</span></a> work, I have dreamt of <a href="https://prodigy.ai/" rel="nofollow">using <a href="https://write.as/houfu/tag:Prodigy" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Prodigy</span></a>, from the makers of <a href="https://write.as/houfu/tag:spaCy" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">spaCy</span></a></a>. I still have the four-button sticker which you use to confirm your annotation!</p>

<p>In another quaint example of how ChatGPT has upended this field, annotation is now less important since large language models are pretty good at classification, sentiment analysis or detecting entities in a few-shot or zero-shot scenario.</p>

<p>Unfortunately, this large language model has created a new problem. I don&#39;t know how to handle all my creativity regarding <a href="https://write.as/houfu/tag:prompts" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">prompts</span></a>. If I don&#39;t commit them to git, I will lose them quite quickly. Even if I remember all of them, how do I know which prompt was effective? It would be good to collect them so I can also test them on a new model.</p>

<p>Currently, it&#39;s still rather ad-hoc. I... I keep them in my <a href="https://write.as/houfu/tag:Notion" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Notion</span></a> and rate them with my notes on what I thought of their effectiveness and room for improvement.</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/f_auto,q_auto/v1/blog-images/ph3ntyl50kqvlfqfpa2u" alt="Screenshot of a Notion page used to keep my notes on the prompts I have used"/></p>

<p>It turned out to be tedious and quite hard to improve. It reminded me of a spellbook filled with incantations.</p>

<p>So it was heartening to see that the new version of Prodigy has some new workflows for prompt engineering:</p>

<p><a href="https://twitter.com/explosion_ai/status/1676876788570681346?s=20" rel="nofollow">https://twitter.com/explosion_ai/status/1676876788570681346?s=20</a></p>

<p>The idea of a prompt tournament and generating tests with OpenAI integration will help check how effective my prompts can be.</p>

<p>Alas, the <a href="https://prodi.gy/buy" rel="nofollow">USD390 price tag</a> is still putting me off all these years. I know it&#39;s value for money, but I can&#39;t pay for it. However, it&#39;s great knowing they are going in the right direction. Maybe when they have added more prompt engineering and LLM solutions (and a healthy dose of inflation), I will no longer be able to resist it.</p>

<p>In any case, this must be a clear sign that prompt engineering is here to stay, and rather than a mysterious art, it can be a science too.</p>

<p><img src="https://res.cloudinary.com/lovelawrobots/image/upload/f_auto,q_auto/v1/blog-images/photo_2023-06-30_23-47-38_ozpz52" alt="Author Portrait" width="320"/>
<strong>Love.Law.Robots. – A blog by Ang Hou Fu</strong></p>
<ul><li><a href="https://remark.as/p/houfu/christmas-wont-be-here-for-a-while" rel="nofollow">Discuss...</a> this Post</li>
<li>If you found this post useful, or like my work, a tip is always appreciated:  </li>
<li>Follow [this blog on the Fediverse]()</li>
<li>Contact me:
<ul><li><a href="mailto:houfu@lovelawrobots.com" rel="nofollow">Email</a></li>
<li><a href="https://github.com/houfu" rel="nofollow">Github</a></li>
<li><a href="https://kopiti.am/@houfu" rel="nofollow">Personal Mastodon</a></li>
<li><a href="https://www.linkedin.com/in/hou-fu-ang-0a6851113/" rel="nofollow">LinkedIn</a></li>
<li><a href="https://twitter.com/houfu" rel="nofollow">Twitter</a></li></ul></li></ul>


]]></content:encoded>
      <guid>https://write.as/houfu/christmas-wont-be-here-for-a-while</guid>
      <pubDate>Thu, 06 Jul 2023 16:49:01 +0000</pubDate>
    </item>
  </channel>
</rss>