Can LLM break lines?

Testing using LLM to do automatic line breaks

I have a habit of manually inserting line breaks when I write. Usually, I do this at punctuation marks. When that’s not possible, I try to break at logical points. Since I am experimenting with what LLMs can do, I thought this could be a good test. I tried many models using the same system prompt: Please: - Adjust line breaks so that lines are neither too short nor too long. - Make sure each line has no more than 90 characters. - Preferably, add line breaks after punctuation marks such as periods or commas. - Always start a new line for a new sentence, i.e., after a period that ends a sentence. - If it's not possible to break lines at punctuation marks, break at logical points to maintain readability. - Preserve the original text structure but make the line breaks more readable. - Do not alter the content of the text, only adjust formatting with line breaks. - Return only the text with improved line breaks. Example: Original: The quick brown fox jumps over the lazy dog. The dog, being lazy, does not respond. The journey took about thirty minutes and covered more than five kilometers without stopping. Corrected: The quick brown fox jumps over the lazy dog. The dog, being lazy, does not respond. The journey took about thirty minutes and covered more than five kilometers without stopping. Note that I only tested each model once, so this is not scientific research. ...

October 4, 2024 · 8 min · Xing Shi Cai
Refuse plastic!

No More Plastic: A Journey Towards Sustainability

On April 21, 2024, I organized a book club to discuss the book No. More. Plastic. by Martin Dorey. To prepare for the event, I spent quite some time drafting a slide deck. Now I have translated the slides into Chinese. You can download the slides here: English Version Chinese Version Summary of My Slides A Book Recommendation Martin Dorey, an author, surfer, swimmer, cyclist, and environmentalist, wrote the book “No More Plastic.” He was inspired to take action after discovering an area knee-deep in plastic bottles during his move to a quiet beach in 2009. His book aims to raise awareness about the plastic pollution crisis. ...

May 31, 2024 · 3 min · Xing Shi Cai

Books That Got Me Interested in Math

I always feel that I became a mathematician accidentally. But in retrospect, since I was a kid, I did read serial books about mathematics and mathematicians and has always been drawn to a career and life in mathematics. Below are the books which ignore my interest. Nature’s Numbers: The Unreal Reality Of Mathematics Nature’s Numbers This book by Ian Stewart has some interesting facts about the nature of mathematics. It has been decades since I read it, but I still remember that I was awe-filled when I learned form the book that Fibonacci sequences appear the arrangement of a pine cone. ...

October 17, 2023 · 1 min · Xing Shi Cai
Be a happy vegan in China

How to Be a (Happy) Vegan in China

I’ve been a vegan for over three years, and I’ve lived in Kunshan, Jiangsu, China, for the past two years. Adopting a vegan lifestyle is no trivial feat anywhere in the world, but it feels even more challenging here compared to Sweden, where I used to reside. Here’s what I’ve learned about being a vegan in China. Finding Vegan Food in Restaurants Recommended Restaurants Restaurants that I recommend (see details below) include — ...

August 19, 2023 · 4 min · Xing Shi Cai
Why Buddhism is True

What Stoicism can learn from Buddhism?

Having recently read through Robert Wright’s book ‘Why Buddhism is True,’ I was impressed by Buddhism’s intricate comprehension of human psychology. While the book doesn’t directly set Buddhism against Stoicism, my previous exposure to Stoic made me see how the two philosophies could complement each other. Stoicism, particularly its modern interpretations, claims that achieving eudaimonia - the good life - implies “living according to one’s nature.” Stoics define our nature as being “social and rational.” This, in my perspective, is more readily comprehensible than the similar but more intricate concept nirvana presented in Buddhism. ...

July 15, 2023 · 2 min · Xing Shi Cai

Vegan Mapo Tofu: A Swedish-Chinese Recipe

While living in Sweden, a friend asked me, “Do you know if this recipe is authentic? I found it on the Internet, and I’m not sure if it’s reliable.” She likely assumed a Chinese person would know more about Chinese cooking than random food bloggers on the Internet. But I playfully replied with feigned seriousness, “Where do you think I learned to cook?” “From the Internet? 😲” “Of course!” ...

April 30, 2023 · 2 min · Xing Shi Cai

Stein's Method

I recently give two seminars for DKU’s Discrete Math Seminar on Stein’s method. Here are my slides for the 1st talk and the 2nd talk.

December 16, 2022 · 1 min · Xing Shi Cai

A Book About Difficult Parents

The Sixth Tone is an English news website covering stories in China. A DKU (Duke Kunshan University) student just won a writing contest organized by them with an essay titled Moxa, Receipt, Money, and Generations. It is a candid and touching account on how her father’s obsession with moxa damaged their family. This makes me think that perhaps many of our students also similar family issues. If you are in such a situation, reading the memoir The Glass Castle by Jeannette Walls might be helpful. ...

August 28, 2022 · 2 min · Xing Shi Cai

The Heatwave of Summer 2022

A student recently told me, when they first read my post on climate change, they found the issue very far away from them. But when the recent heatwave (summer 2022) hits, they realized that climate change might be the defining issue of their generation. Here I share a few articles which may hopeful wake-up more young people. Heatwave in China is the most severe ever recorded in the world China heatwave: scorching temperatures and severe drought – in pictures China’s Heat Wave Is Hitting Its Agricultural Sector Hard A Shocking Visualization of the Heatwave ...

August 26, 2022 · 1 min · Xing Shi Cai

Welcome to DKU!

DKU bulletin: Embark on an Exciting Journey! Download the DKU (Duke Kunshan University) bulletin and explore your path ahead. Delve into Part 3: The Curriculum and Part 6: Academic Procedures and Information. Don’t miss Part 10: Majors and Courses as it may spark inspiration for your future passions. Course Selections: Your Path to Success Your first term is filled with opportunities: In the first 7-week session, you can embrace up to 8 credits including an engaging four-credit course, an exciting language course, and a PE course to keep you energized! In the subsequent 7-week session, you can go beyond with up to 10 credits. Consider these guidelines to make the most of it: ...

August 18, 2022 · 2 min · Xing Shi Cai