<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/assets/atom.xsl" type="text/xsl"?><feed
	xmlns="http://www.w3.org/2005/Atom"
	xmlns:thr="http://purl.org/syndication/thread/1.0"
	xml:lang="en-US"
	><title>Sacha Chua - category - ai</title>
	<subtitle>Emacs, sketches, and life</subtitle>
	<link rel="self" type="application/atom+xml" href="https://sachachua.com/blog/category/ai/feed/atom/index.xml" />
  <link rel="alternate" type="text/html" href="https://sachachua.com/blog/category/ai" />
  <id>https://sachachua.com/blog/category/ai/feed/atom/index.xml</id>
  <generator uri="https://11ty.dev">11ty</generator>
	<updated>2025-02-28T15:33:30Z</updated>
<entry>
		<title type="html">Letting A+ play with generative artificial intelligence for fiction, and a primer</title>
		<link rel="alternate" type="text/html" href="https://sachachua.com/blog/2025/02/letting-a-play-with-generative-artificial-intelligence-for-fiction/"/>
		<author><name><![CDATA[Sacha Chua]]></name></author>
		<updated>2025-03-01T14:46:18Z</updated>
    <published>2025-02-28T15:33:30Z</published>
    <category term="ai" />
		<id>https://sachachua.com/blog/2025/02/letting-a-play-with-generative-artificial-intelligence-for-fiction/</id>
		<content type="html"><![CDATA[<div class="update" id="org0d30a7e">
<p>
<span class="timestamp-wrapper"><span class="timestamp">[2025-03-01 Sat]</span></span>: After experimenting with ChatGPT in depth, A+ has decided that she prefers Claude, so we'll try that.
</p>

</div>

<p>
A+ likes prompting <a href="https://claude.ai/">Claude AI</a> to generate funny
kid-focused Star Wars fanfic mostly exploring how
various characters might babysit Luke, Leia, and
Grogu in a universe where Anakin did not fall to
the Dark Side. This seems to be working out well.
It encourages her to improvise stories even when
we're off-screen, and it lets her play with small
variations on ideas and quickly try things out.
The stories that Claude generates are humorous and
descriptive, with better dialogue and
characterization than I might come up with myself.
This is infinitely better than letting her wander
around <a href="https://fanfiction.net">fanfiction.net</a> on her own.
</p>

<p>
She often runs into the free tier's usage limits.
There are plenty of other things she enjoys doing,
so it's not a problem. She just goes on to read
other things, practise singing, or colour. Still,
we've been noodling around the idea of paying for
a subscription, especially if we can help her get
even more out of it. For example, maybe we could
build some routines like:
</p>

<ul class="org-ul">
<li>Daily: Tell me your favourite story of the day. What did you like about it? What was the problem and what was the solution?</li>
<li>Weekly:
<ul class="org-ul">
<li>Check in to see if you're all caught up with schoolwork</li>
<li>Pick a story and let's draw a quick scene from
it together; maybe I can compile it into a
little PDF we can enjoy</li>
</ul></li>
<li>Once a month:
<ul class="org-ul">
<li>Record one story out loud (~ 250 words, so a couple of minutes)</li>
</ul></li>
</ul>

<p>
(I know, I know, it's pretty aspirational. But maybe I can sneak some of it in here and there, especially if I start doing it myself. Then she usually wants to join in.)
</p>
<div id="outline-container-letting-a-play-with-generative-artificial-intelligence-for-fiction-and-a-primer-prompt-engineering" class="outline-2">
<h3 id="letting-a-play-with-generative-artificial-intelligence-for-fiction-and-a-primer-prompt-engineering">Prompt engineering</h3>
<div class="outline-text-2" id="text-letting-a-play-with-generative-artificial-intelligence-for-fiction-and-a-primer-prompt-engineering">
<p>
A+ currently writes prompts like:
</p>

<ul class="org-ul">
<li>Write a funny story where Darth Vader has a bunch of body doubles (like Queen Amidala did) and they have a very important meeting. The Emperor is trying to find Darth Vader and keeps finding the body doubles instead.</li>
<li>Write a silly story where Anakin raises Luke and Leia with Padme instead of turning to the dark side.</li>
<li>Write a continuation of The Skywalker Family Chronicles where Anakin is helping Luke and Leia get dressed for a very important Bring Your Children to a Council meeting.</li>
<li>Write a funny continuation of The Skywalker Family Chronicles about the time that Captain Rex brought the rest of the 501 Legion and Commander Cody's Legion to help babysit Luke and Leia.</li>
<li>Write a continuation of The Skywalker Family Chronicles where Commander Cody has to babysit Luke and Leia because Captain Rex is dealing with leftover Separatist droids and has to call in reinforcements who run into the Skywalker Naboo Lake House, fully armed, and wearing their full armor, asking whether his problem is either rouge Separatists droids or the Skywalker children and bringing two bags of military equipment and two bags of Skywalker Specific Stress Depleters and other things for babysitting.</li>
<li>Write a continuation of The Skywalker Family Chronicles where Grogu reads his journal, flipping to the page where Padme takes Ahsoka, Anakin, Yoda, Grogu, still talking and potty training, Luke, and Leia to a boat ride, but it turns out Yoda, Anakin, Luke, Ahsoka, and Leia get seasick, told from Grogu's point of view in detail.
<ul class="org-ul">
<li>It was interesting to see this prompt evolve over 16 iterations starting from "Write a continuation of The Skywalker Family Chronicles where Padme takes Anakin, Luke, and Leia to a boat ride, but it turns out that boat rides become disasters for Skywalkers."</li>
</ul></li>
<li>Write a continuation of The Skywalker Family Chronicles where Ahsoka reads her journal, ending up on the page where she ends up at the Senate Medical Center due to some flu that only Togrutas can catch, the journal written in slightly squiggly handwriting, which is either Grogu or Anakin's handwriting.</li>
</ul>

<details class="code-details" style="padding: 1em;
                 border-radius: 15px;
                 font-size: 0.9em;
                 box-shadow: 0.05em 0.1em 5px 0.01em  #00000057;">
                  <summary><strong>The story Claude generated for that prompt</strong></summary>
<p>
Ahsoka's Journal — Entry #47
</p>

<p>
[The handwriting is notably messy and inconsistent, with some letters larger than others and lines that don't quite stay straight across the page]
</p>

<p>
<del>Dear Snips Journal</del> <del>Ahsoka's Top Secret Thoughts</del> Today's Very Important Record of Events
</p>

<p>
Anakin here. Ahsoka is sick in bed with Togrutan Spotted Fever (which is apparently a thing??), so I'm writing this for her because she made me promise to "keep her journal updated" and threatened to tell Padmé about the speeder bike incident if I didn't. So here we are.
</p>

<p>
Medical droid says she'll be fine in a few days but needs rest. She keeps trying to get up to train, so I'm taking dictation between making her stay in bed. Her exact words: "Make sure you get everything right, Master, or I'll know."
</p>

<p>
<del>This is ridiculous</del> Here's what happened:
</p>

<p>
It started three days ago when Ahsoka's lekku developed these weird purple spots. She insisted it was "just a cosmetic phase all Togruta go through" and refused to see a healer. Then she collapsed during lightsaber practice, which was TERRIFYING, by the way. Not that I panicked. I was very calm and collected as I carried her across the Senate District while shouting for people to move out of the way.
</p>

<p>
The twins kept trying to "help" by Force-pushing pedestrians, which didn't actually help AT ALL. Leia claims "that man was going to step on Ahsoka's lekku" but I'm pretty sure she just wanted to see if she could push someone into a fountain. (She could.)
</p>

<p>
Luke tried to use the Force to make Ahsoka float "so you don't have to carry her, Dad" but only managed to make her boots come off. One hit Senator Organa right in the back of the head. I'll have to apologize for that later.
</p>

<p>
When we got to the Senate Medical Center, the droid at reception just stared at us like we were crazy. In my defense, it's not every day a former Jedi Knight runs in carrying an unconscious Togruta while two Force-sensitive five-year-olds make medical equipment float around the waiting room.
</p>

<p>
Padmé arrived looking perfect as always, somehow already briefed on the situation. She claims she "felt a disturbance in the Force, and that disturbance was you causing chaos, Anakin." She's not even Force-sensitive! How does she KNOW these things??
</p>

<p>
The medical droid diagnosed Ahsoka with "Togrutan Spotted Fever" which apparently only Togruta can catch. The spots spread all over her lekku and montrals before the fever kicked in. The droid said it's like "human chicken pox but confined to head-tails" which is both fascinating and disgusting.
</p>

<p>
Grogu seemed very interested in the spots, kept trying to touch them until Ahsoka made that scary growling noise. Now he brings her soup instead. At least I think it's soup. It's green and bubbling and I'm a little afraid to ask what's in it, but Ahsoka seems to like it.
</p>

<p>
Obi-Wan stopped by with "medicinal tea" which smelled terrible but made Ahsoka laugh so hard she snorted bacta solution out her nose. Something about a mission where I apparently got similar spots in an inappropriate location? I DON'T REMEMBER THIS AND IT NEVER HAPPENED.
</p>

<p>
Oh, Ahsoka wants me to add:
</p>

<p>
"Master Yoda visited and said 'Strong with the antibodies, you must be.' He brought me a weird root that tasted awful but made my headache go away. Also, tell the younglings the spots are NOT for coloring practice!"
Speaking of which, I caught Luke trying to "connect the dots" on Ahsoka's lekku with a marker while she was sleeping. Leia was standing lookout. I'm simultaneously proud of their teamwork and horrified by their choices.
Padmé has now banned everyone except medical droids from the sick room after Ahsoka's fever spiked when Rex brought the entire 501st to "boost morale." Apparently twenty clone troopers singing get-well songs isn't restful. Who knew?
</p>

<p>
Ahsoka is falling asleep now, but insists I note that "Anakin's nursin g skills are terri bl&#x2026;"
</p>

<p>
She didn't finish that sentence because she's WRONG and also finally sleeping. I am an EXCELLENT caretaker! I've only spilled bacta solution twice, and the second time wasn't even my fault because R2 bumped into me.
I should wrap this up. Padmé says my handwriting is getting worse, which I didn't think was possible. Also, Grogu is trying to add his own notes in the margins and I can't tell if those are drawings or actual words.
Get better soon, Snips. The twins miss their "Auntie 'Soka" and I miss having someone else to blame when things go wrong.
</p>

<p>
— Anakin
</p>

<p>
[In the corner, there appears to be a small green handprint with what might be Grogu's attempt at writing "Get better" beside it]
</p>


</details>

<p>
All right, let's get a bit meta here. "Here are some prompts that my 9-year-old child has been using to generate funny Star Wars fanfiction in alternate timelines. Suggest 5 ideas for improving her prompts and provide detailed examples." We're out of free messages for Claude, so I asked ChatGPT.
</p>

<p>
It suggested:
</p>

<ol class="org-ol">
<li>Be more specific about the chaos or conflict.</li>
<li>Add unexpected reactions from characters.</li>
<li>Use a "What If?" format to spark creativity.</li>
<li>Introduce a clear perspective or narrator.</li>
<li>Add an absurd or over-the-top element.</li>
</ol>

<details class="code-details" style="padding: 1em;
                 border-radius: 15px;
                 font-size: 0.9em;
                 box-shadow: 0.05em 0.1em 5px 0.01em  #00000057;">
                  <summary><strong>Full response including examples and details</strong></summary>
<p>
Your child already has a fantastic imagination and a great sense of
humor! Here are five general tips to help improve and refine her prompts
for even funnier and more engaging Star Wars fanfiction:
</p>

<p>
<b>1. Be More Specific About the Chaos or Conflict</b>
</p>

<ul class="org-ul">
<li>Funny stories often work best when there's a strong contrast or a big
misunderstanding. Adding more details about what could go wrong will
make the story even funnier.</li>
<li><b>Example:</b> Instead of: <i>"Write a funny story where Darth Vader has a
bunch of body doubles, and the Emperor keeps finding them instead."</i>
Try: <i>"Write a story where Darth Vader has a dozen body doubles, but
they're all terrible actors who keep revealing they're fakes in
ridiculous ways. The Emperor gets increasingly frustrated as he
accidentally promotes one to Grand Moff, challenges another to a
lightsaber duel, and gets tricked by one into approving a Death Star
Karaoke Night."</i></li>
</ul>

<p>
<b>2. Add Unexpected Reactions From Characters</b>
</p>

<ul class="org-ul">
<li>One of the funniest things in fanfiction is when characters react in
ways they normally wouldn't. Encourage your child to play with
unexpected character reactions.</li>
<li><b>Example:</b> Instead of: <i>"Write a silly story where Anakin raises Luke
and Leia with Padmé instead of turning to the dark side."</i> Try:
<i>"Write a story where Anakin raises Luke and Leia with Padmé, but he's
the most overprotective parent in the galaxy. He installs
lightsaber-proof baby gates, interrogates their playdates like a Jedi
Council trial, and insists on Force-training them before they can
walk. Meanwhile, Obi-Wan just shakes his head and drinks space tea."</i></li>
</ul>

<p>
<b>3. Use a "What If?" Format to Spark Creativity</b>
</p>

<ul class="org-ul">
<li>Reframing prompts as "What if?" questions can help make them more
engaging and open-ended.</li>
<li><b>Example:</b> Instead of: <i>"Write a funny continuation where Captain Rex
and the clones babysit Luke and Leia."</i> Try: <i>"What if the entire
501st Legion had to babysit Luke and Leia for a day, but they treated
it like a high-stakes military mission? Their strategy meetings
include creating 'Operation Diaper Storm,' using clone trooper
formations for nap time, and having emergency evacuations when Leia
gets hold of a blaster."</i></li>
</ul>

<p>
<b>4. Introduce a Clear Perspective or Narrator</b>
</p>

<ul class="org-ul">
<li>Some of the best humor comes from seeing an event through the eyes of
a character with a strong personality or a unique way of looking at
things.</li>
<li><b>Example:</b> Instead of: <i>"Write a story where Grogu reads his journal
about a boat ride."</i> Try: <i>"Write a story from Grogu's journal where
he describes (in broken baby Yoda language) a disastrous boat ride.
Yoda, Anakin, Luke, and Leia all get seasick, Ahsoka tries to 'train'
the fish, and Padmé regrets everything. Meanwhile, Grogu just wants
snacks and writes about it like it's a Jedi prophecy."</i></li>
</ul>

<p>
<b>5. Add an Absurd or Over-the-Top Element</b>
</p>

<ul class="org-ul">
<li>Taking an idea to the extreme can make it even funnier.</li>
<li><b>Example:</b> Instead of: <i>"Write a story where Commander Cody has to
babysit Luke and Leia."</i> Try: <i>"Write a story where Commander Cody has
to babysit Luke and Leia, but he's so stressed that he calls in every
trooper he knows for backup. Within an hour, the Skywalker Lake House
is surrounded by AT-ATs, aerial support is patrolling for 'nap-time
threats,' and Palpatine accidentally approves a new 'Elite Babysitting
Clone Squad' after mistaking their report for a battle plan."</i></li>
</ul>

<p>
Encourage her to keep going with her hilarious and creative ideas! These
small adjustments can make the prompts even more fun and engaging. 🚀
</p>


</details>

<p>
We read through this yesterday, and she's started
telling me how she's added more detail to her
prompts. I think she takes constructive feedback
from the AI better than from me (just like using a
timer works better than me telling her it's time
to wrap up), so maybe there's some opportunity
here on using a layer of indirection to keep the
grumps from getting in the way of learning&#x2026;
</p>
</div>
</div>
<div id="outline-container-letting-a-play-with-generative-artificial-intelligence-for-fiction-and-a-primer-a-primer-on-generative-ai" class="outline-2">
<h3 id="letting-a-play-with-generative-artificial-intelligence-for-fiction-and-a-primer-a-primer-on-generative-ai">A primer on generative AI</h3>
<div class="outline-text-2" id="text-letting-a-play-with-generative-artificial-intelligence-for-fiction-and-a-primer-a-primer-on-generative-ai">
<p>
I don't want A+ to treat generative AI as some
kind of magic black box with amazing capabilities,
so I've been sprinkling in some primer information
here and there. I want her to understand roughly
how it works, how it's not actually <i>thinking</i> but
can still do a surprisingly good job of putting
things together based on patterns derived from
really large data sets in ways that are hard for
humans to fully understand.
</p>

<p>
I also explained how conversations and token
limits work. She's already getting the hang of
editing prompts to refine things instead of adding
more prompts to the conversation, although she
still prefers to keep most of her story prompts in
one conversation because the stories sometimes
refer to previous incidents in the timeline.
</p>

<p>
</p><div class="sketch-full"><a class="photoswipe" href="https://sketches.sachachua.com/filename/2025-02-27-01%20Generative%20artificial%20intelligence%20&#45;&#45;%20llm%20generative%20ai%20tech.png" data-src="https://sketches.sachachua.com/static/2025-02-27-01%20Generative%20artificial%20intelligence%20&#45;&#45;%20llm%20generative%20ai%20tech.png" data-title="2025-02-27-01 Generative artificial intelligence &#45;&#45; llm generative ai tech" data-w="2700" data-h="3617"><picture>
      <img src="https://sketches.sachachua.com/static/2025-02-27-01%20Generative%20artificial%20intelligence%20&#45;&#45;%20llm%20generative%20ai%20tech.png" width="2700" height="3617" alt="2025-02-27-01 Generative artificial intelligence &#45;&#45; llm generative ai tech" loading="lazy" style="max-height: 90vw; height: auto; width: auto" decoding="async">
      <figcaption>2025-02-27-01 Generative artificial intelligence &#45;&#45; llm generative ai tech</figcaption>
    </picture></a></div>
<p></p>

<details class="code-details" style="padding: 1em;
                 border-radius: 15px;
                 font-size: 0.9em;
                 box-shadow: 0.05em 0.1em 5px 0.01em  #00000057;">
                  <summary><strong>Text from sketch</strong></summary>
<p>
Generative artificial intelligence
</p>

<p>
How it works:
</p>

<ul class="org-ul">
<li>Tons of data: webpages, books, questions &amp; answers, even images &amp; videos</li>
<li>Computer model that predicts the next word/etc.
<ul class="org-ul">
<li>noticing the context</li>
<li>bat: ball, fly, base</li>
<li>bat: cave, wing, guano, fly</li>
<li>bat: man</li>
</ul></li>
<li>Repeat with training until it gets things mostly right</li>
<li>We finish each other's sentences/sandwiches</li>
</ul>

<p>
Result: tools that can predict words or fill in blanks
or even make images, recordings, and videos
of things that don't exist.
</p>

<p>
They don't actually think for themselves yet;
although sometimes the results can be quite interesting
</p>

<p>
Things to remember:
</p>

<ul class="org-ul">
<li>It doesn't actually know or think things.
Not everything it says is true.
Double-check when needed.</li>
<li>It usually doesn't cite or credit its sources.
Even when it seems to do so, it can be wrong.
So double-checking can be hard.</li>
<li>Use it to help you learn &amp; explore.
Don't let it substitute for your thinking &amp; learning.</li>
<li>Don't put sensitive/private info in.</li>
</ul>

<p>
Caveats: The models cost a lot of energy to create. They cost less energy to use, but still a lot in terms of carbon emissions, water, etc. The data they were trained on includes things that people didn't give them permission to use. They are changing jobs &amp; industries, but are often overhyped. Everyone's still figuring things out.
</p>

<p>
prompt,
response
context,
tokens
</p>

<p>
sachachua.com/2025-02-27-01
</p>


</details>

<p>
Other resources:
</p>

<ul class="org-ul">
<li><a href="https://www.youtube.com/watch?v=rwF-X5STYks">Generative AI explained in 2 minutes - YouTube</a>: this is probably at her level</li>
<li><a href="https://www.youtube.com/watch?v=NRmAXDWJVnU">Generative AI Explained In 5 Minutes | What Is GenAI? | Introduction To Generative AI | Simplilearn - YouTube</a>: more focused on image generation</li>
</ul>

<p>
I also showed her what <a href="https://notebooklm.google/">NotebookLM</a> could do with
audio podcast generation, so she could get a sense
of computer-generated audio. She noticed the
interactive mode, so we experimented with that for
a bit. The pauses in her speech tend to trigger
premature answers, so it works better if she
thinks about her sentence and says it confidently.
</p>
</div>
</div>
<div id="outline-container-letting-a-play-with-generative-artificial-intelligence-for-fiction-and-a-primer-going-forward" class="outline-2">
<h3 id="letting-a-play-with-generative-artificial-intelligence-for-fiction-and-a-primer-going-forward">Going forward</h3>
<div class="outline-text-2" id="text-letting-a-play-with-generative-artificial-intelligence-for-fiction-and-a-primer-going-forward">
<p>
A+ finds generating text very engaging at the
moment and I think she's learning a lot through
experiments. She'll probably have a deeper
understanding of and appreciation for fiction than
I did as a kid because she can easily change some
things and see how it feels. (What if this story
is told in third-person perspective? What if this
story is told in present tense or past tense? What
if this event happens differently; what would
happen because of that change?)
</p>

<p>
With any luck, exposure to lots of story elements,
vivid words, and dialogue will influence how she
writes. Maybe she'll eventually get to the point
where she can imagine a story and then want to
write parts of it or all of it herself to bring it
closer to her vision. So it's probably worth
supporting this and seeing where it can go.
</p>
</div>
</div>
<div><a href="https://sachachua.com/blog/2025/02/letting-a-play-with-generative-artificial-intelligence-for-fiction/index.org">View org source for this post</a></div>
<p>You can <a href="mailto:sacha@sachachua.com?subject=Comment%20on%20https%3A%2F%2Fsachachua.com%2Fblog%2F2025%2F02%2Fletting-a-play-with-generative-artificial-intelligence-for-fiction%2F&body=Name%20you%20want%20to%20be%20credited%20by%20(if%20any)%3A%20%0AMessage%3A%20%0ACan%20I%20share%20your%20comment%20so%20other%20people%20can%20learn%20from%20it%3F%20Yes%2FNo%0A">e-mail me at sacha@sachachua.com</a>.</p>]]></content>
		</entry><entry>
		<title type="html">Thinking about how I can use large language models</title>
		<link rel="alternate" type="text/html" href="https://sachachua.com/blog/2024/10/thinking-about-how-i-can-use-large-language-models/"/>
		<author><name><![CDATA[Sacha Chua]]></name></author>
		<updated>2024-10-28T17:19:20Z</updated>
    <published>2024-10-28T17:19:20Z</published>
    <category term="ai" />
<category term="geek" />
		<id>https://sachachua.com/blog/2024/10/thinking-about-how-i-can-use-large-language-models/</id>
		<content type="html"><![CDATA[<p>
I wanted to follow up on my post on <a href="https://sachachua.com/blog/2024/01/large-language-models-and-me/">large language
models and me</a> from January and do some more
thinking/learning out loud.
</p>
<div id="outline-container-org07916ae" class="outline-2">
<h3 id="org07916ae">Data</h3>
<div class="outline-text-2" id="text-org07916ae">
<p>
I have &gt;= 8000 posts in my blog, almost 4000
sketches (mostly public, many with OCR results),
and lots of text notes in my Org Mode files, many
of which are in a hierarchy and many of which are
just a random list of entries.
</p>

<p>
There's also the episodic memory aspect of things,
trying to remember using different cues. Might be
fun to figure out what I can do with &gt;= 16,000
text journal entries (usually a sentence,
sometimes longer).
</p>
</div>
</div>
<div id="outline-container-orge0eeec8" class="outline-2">
<h3 id="orge0eeec8">Vector/approximate search</h3>
<div class="outline-text-2" id="text-orge0eeec8">
<p>
I like the idea of being able to search my notes
with both exact and approximate matches. <a href="https://lgmoneda.github.io/2023/04/08/semantic-search-for-org-roam.html">Semantic
Search for Org roam | lgmoneda</a> might be a good
starting point. <a href="https://khoj.dev/">Khoj</a> has a free self-hosted option
that can be configured to use offline models and
some support for Org Mode, but it might be too big
for me to wrap my head around at this point. I'll
probably write my own thing so that I can
understand it and so that I can tailor it to the
structure (or lack thereof) of what I've got.
</p>

<p>
I don't mind starting with just the retrieval
aspect, since text generation is still a little
iffy. I'd rather be able to flip through the
titles and jump to the source information for now.
</p>

<p>
I'm partly looking for the modern equivalent of
the <a href="https://davidamerland.com/images/pdf/Remembrance-Agent-MIT-Labs-Experiment.pdf">Remembrance Agent</a>, which I enjoyed using in
Emacs before. It used a bag-of-words approach to
look at a few hundred words around your cursor and
suggest files/emails/etc. that were relevant in
another window.
</p>
</div>
</div>
<div id="outline-container-orgd1bd026" class="outline-2">
<h3 id="orgd1bd026">Episodic search</h3>
<div class="outline-text-2" id="text-orgd1bd026">
<p>
Slightly more far-off: it might be nice to be able
to find something based on more retrieval cues and
episodic memory, and to <a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC9907156/">enrich memory</a>.
</p>

<p>
Someday it would be pretty cool to have something
help me remember where I left something. Video
(<a href="https://arxiv.org/abs/2306.15850">SpotEM</a>, <a href="https://scontent-ord5-2.xx.fbcdn.net/v/t39.8562-6/10000000_539004294487577_329777465080134312_n.pdf?_nc_cat=105&amp;ccb=1-7&amp;_nc_sid=e280be&amp;_nc_ohc=SiQ9ez7VzVMQ7kNvgGIw-J1&amp;_nc_zt=14&amp;_nc_ht=scontent-ord5-2.xx&amp;_nc_gid=AmgaRbyKORCxMY9aXalFA0S&amp;oh=00_AYB8P0v5BIpBNyGkfVSheTxB3SExakQQWA8GKvJj-ul5Gw&amp;oe=67258C17">Episodic Memory Question Answering</a>) might
be excessive, but maybe I could get into the habit
of audio notes?
</p>
</div>
</div>
<div id="outline-container-orgd5256c3" class="outline-2">
<h3 id="orgd5256c3">Transcript correction</h3>
<div class="outline-text-2" id="text-orgd5256c3">
<p>
It would be good to have more conveniences for
fixing commonly-misrecognized words, although that
might also be handled with simple regex-based
replacements (maybe like <a href="https://mbork.pl/2024-10-14_mrr-replace-mode">mbork's
mrr-replace-mode</a>).
</p>
</div>
</div>
<div id="outline-container-orge7b1de9" class="outline-2">
<h3 id="orge7b1de9">Topic identification and segmentation</h3>
<div class="outline-text-2" id="text-orge7b1de9">
<p>
It would be nice to automatically break up
transcripts of braindumps or web conferences into
topics. I currently do a bit of light structuring
via <a href="https://sachachua.com/blog/2023/12/audio-braindump-workflow-tweaks-adding-org-mode-hyperlinks-to-recordings-based-on-keywords/">keywords in my audio braindumps</a>, but topic
segmentation is a well-established area, so I
should be able to figure this out once I set aside
time for it.
</p>
</div>
</div>
<div id="outline-container-org6a42c4d" class="outline-2">
<h3 id="org6a42c4d">Question-answering: not so much yet</h3>
<div class="outline-text-2" id="text-org6a42c4d">
<p>
I thought it was a little interesting how Dan
Shipper used 10 years of journal data for
retrieval-augmented text generation and
question-answering (<a href="https://psyche.co/ideas/what-i-learned-from-sharing-my-private-self-with-an-ai-journal">source</a>) and how AI can make
analyzing your thoughts and actions feel more like
a conversation, but I don't think this is quite
useful for me yet.
</p>
</div>
</div>
<div id="outline-container-org699c1c7" class="outline-2">
<h3 id="org699c1c7">Question-asking might be more useful</h3>
<div class="outline-text-2" id="text-org699c1c7">
<p>
When I'm writing, my challenge is usually
resisting going down the rabbit hole of more
tweaks and instead reining things in so that I can
finish the post. But if I do find myself wanting
to write more, I think it might potentially be
interesting to ask what kinds of follow-up
questions people might ask about something, and
then add links or more explanations.
</p>
</div>
</div>
<div><a href="https://sachachua.com/blog/2024/10/thinking-about-how-i-can-use-large-language-models/index.org">View org source for this post</a></div>
<p>You can <a href="mailto:sacha@sachachua.com?subject=Comment%20on%20https%3A%2F%2Fsachachua.com%2Fblog%2F2024%2F10%2Fthinking-about-how-i-can-use-large-language-models%2F&body=Name%20you%20want%20to%20be%20credited%20by%20(if%20any)%3A%20%0AMessage%3A%20%0ACan%20I%20share%20your%20comment%20so%20other%20people%20can%20learn%20from%20it%3F%20Yes%2FNo%0A">e-mail me at sacha@sachachua.com</a>.</p>]]></content>
		</entry><entry>
		<title type="html">Large language models and me</title>
		<link rel="alternate" type="text/html" href="https://sachachua.com/blog/2024/01/large-language-models-and-me/"/>
		<author><name><![CDATA[Sacha Chua]]></name></author>
		<updated>2024-01-18T15:05:55Z</updated>
    <published>2024-01-18T15:05:55Z</published>
    <category term="ai" />
<category term="geek" />
		<id>https://sachachua.com/blog/2024/01/large-language-models-and-me/</id>
		<content type="html"><![CDATA[<div class="tldr" id="orgf79663a">
<p>
Summary (1895 words): There's a lot of hype around large language models (LLMs) or generative pre-trained transformers (GPTs) like ChatGPT. I'm still trying to figure out how I can use them.
</p>

</div>

<p>
</p><div class="sketch-full"><a class="photoswipe" href="https://sketches.sachachua.com/filename/2024-01-18-01%20Large%20language%20models%20and%20me%20%23ai%20%23llm.png" data-src="https://sketches.sachachua.com/static/2024-01-18-01%20Large%20language%20models%20and%20me%20%23ai%20%23llm.png" data-title="2024-01-18-01 Large language models and me #ai #llm" data-w="2808" data-h="3744"><picture>
      <img src="https://sketches.sachachua.com/static/2024-01-18-01%20Large%20language%20models%20and%20me%20%23ai%20%23llm.png" width="2808" height="3744" alt="2024-01-18-01 Large language models and me #ai #llm" loading="lazy" style="max-height: 90vw; height: auto; width: auto" decoding="async">
      <figcaption>2024-01-18-01 Large language models and me #ai #llm</figcaption>
    </picture></a></div>
<p></p>

<details class="code-details" style="padding: 1em;
                 border-radius: 15px;
                 font-size: 0.9em;
                 box-shadow: 0.05em 0.1em 5px 0.01em  #00000057;">
                  <summary><strong>Text from sketch</strong></summary>
<p>
I'm a little curious about how large language models like ChatGPT might fit into my life. There's a lot of hype, and I'm not yet sure what the value might be for me. While companies rush around trying to stake their claims and strike gold, I can find my own way more slowly.
</p>

<p>
Things it might be good at:
</p>

<ul class="org-ul">
<li>text classification with vectors</li>
<li>tip of the tongue: remembering common words and concepts</li>
<li>research and summaries</li>
<li>outline braindumps</li>
<li>follow-up questions</li>
<li>figuring out what I want (mostly in contrast to what I don't want)</li>
<li>ideas about common topics</li>
<li>making up stories and poems for the kiddo</li>
</ul>

<p>
Probably medium-term, after livestreaming and vector search.
</p>

<p>
Maybe focus on API access versus ChatGPT Plus.
</p>


</details>

<div id="text-table-of-contents" role="doc-toc">
<ul>
<li><a href="https://sachachua.com/blog/feed/atom/index.xml#org447853a">Text classification with vectors</a></li>
<li><a href="https://sachachua.com/blog/feed/atom/index.xml#orgd1cbd07">Tip of the tongue</a></li>
<li><a href="https://sachachua.com/blog/feed/atom/index.xml#orgde11220">Research and summarization</a></li>
<li><a href="https://sachachua.com/blog/feed/atom/index.xml#org228db27">Outlines</a></li>
<li><a href="https://sachachua.com/blog/feed/atom/index.xml#org3e734e9">Follow-up questions and ideas</a></li>
<li><a href="https://sachachua.com/blog/feed/atom/index.xml#org931a81a">Figuring out what I want to say and how</a>
<ul>
<li><a href="https://sachachua.com/blog/feed/atom/index.xml#orga2bd65f">AI style guide</a></li>
<li><a href="https://sachachua.com/blog/feed/atom/index.xml#orga861806">Generating text</a></li>
</ul>
</li>
<li><a href="https://sachachua.com/blog/feed/atom/index.xml#org2c8b1dd">Ideas about common topics</a></li>
<li><a href="https://sachachua.com/blog/feed/atom/index.xml#orgdb8d383">Making up stories and poems for the kiddo</a></li>
<li><a href="https://sachachua.com/blog/feed/atom/index.xml#org25120e3">Wrapping up</a></li>
</ul>
</div>

<p>
It's a bit of a gold rush in the tech industry at the moment with all sorts of companies scrambling to figure out generative artificial intelligence and large language models. I feel like I don't quite line up with the personas these companies are building for. I don't want autogenerated marketing fluff for my newsletter or social media posts, and I'm still a little iffy on code. I probably need to go figure things out for myself.
</p>

<p>
I've built a couple of question-answering prototypes using retrieval-augmented generation with <a href="https://python.langchain.com/docs/use_cases/question_answering/">LangChain</a> or <a href="https://www.llamaindex.ai/">Llama Index</a> for my consulting clients, and I've started experimenting with using HuggingFace embeddings to do vector search across my blog post and sketchnote titles.
I'm also curious about how other Emacs geeks have been experimenting with large language models, such as Abhinav Tushar's EmacsConf 2023 talk on <a href="https://emacsconf.org/2023/talks/matplotllm/">simplifying data visualization with Org Babel and Matplot</a>, Andrew Hyatt's <a href="https://emacsconf.org/2023/talks/llm/">llm package for standardizing interfaces</a>, and the AI category items in my <a href="https://sachachua.com/blog/category/emacs-news">Emacs News</a>.
</p>

<p>
W- has been experimenting with <a href="https://openai.com/blog/chatgpt-plus">ChatGPT Plus</a> too. He finds that it's useful for summarizing videos and world news. The sequence of images it generated for a Vim GPT logo was hilariously off-base. Maybe I should mentally file it under entertainment instead of productivity, and anything actually useful can be a bonus.
</p>

<p>
I think that at the moment, GPTs generally do better when you keep them. Here are some quick notes:
</p>
<div id="outline-container-org447853a" class="outline-2">
<h3 id="org447853a">Text classification with vectors</h3>
<div class="outline-text-2" id="text-org447853a">
<p>
I categorize Emacs News links so that it's easy for people to find the topics they're interested in. Most of the time, a simple regular expression match is enough (ex: Org Mode, Denote, Magit). I can probably make a training data set from recent Emacs News posts so that I can use text classification libraries to suggest a category for links that aren't easily figure out with regular expressions.
</p>
</div>
</div>
<div id="outline-container-orgd1cbd07" class="outline-2">
<h3 id="orgd1cbd07">Tip of the tongue</h3>
<div class="outline-text-2" id="text-orgd1cbd07">
<p>
I think GPT is useful for figuring out the words to look for.
One of the challenges of learning more is figuring out the jargon, like learning how to use <code>M-x apropos</code> to look for things related to buffers. (Apropos, buffers; Emacs uses lots of weird words.) Even when you know the words, it can be hard to remember them: <a href="https://en.wikipedia.org/wiki/Tip_of_the_tongue">tip of the tongue</a> is a thing, and it'll <a href="https://www.nature.com/articles/s41598-018-24972-1">probably get harder as I get older</a>. (Another good reason to exercise.)
It'll be handy if I can just vaguely describe something and then get the words to look for, or use vector search to find things based on similarity rather than exact matches.
</p>
</div>
</div>
<div id="outline-container-orgde11220" class="outline-2">
<h3 id="orgde11220">Research and summarization</h3>
<div class="outline-text-2" id="text-orgde11220">
<p>
I appreciate that the web access in ChatGPT-4 and Microsoft Bing/Copilot allows me to get search results back without having to deal with all the generic SEO content, newsletter popups, and content paywalls that plague the modern web. Sometimes it will even analyze the information and put things into tables or outlines for me. Of course, it is also contributing to the problem by making it easier for people to churn out lots of generic SEO content or newsletter updates, so this feels somewhat self-defeating in the long run. We'll just have to see how it all works out.
</p>

<p>
I'm also curious about using it to summarize the videos I come across for Emacs News, although people usually set good titles and a quick skim of the transcript usually helps.
</p>
</div>
</div>
<div id="outline-container-org228db27" class="outline-2">
<h3 id="org228db27">Outlines</h3>
<div class="outline-text-2" id="text-org228db27">
<p>
I'm ambivalent about generating outlines for blog post ideas. The ones it comes up with from short prompts are pretty generic and intro-focused, and it feels easier to just start with my own outline.
</p>

<details class="code-details" style="padding: 1em;
                 border-radius: 15px;
                 font-size: 0.9em;
                 box-shadow: 0.05em 0.1em 5px 0.01em  #00000057;">
                  <summary><strong>Sample outline for a blog post idea</strong></summary>
<p>
<b><b>I. Introduction</b></b>
</p>
<ol class="org-ol">
<li>Personal Reflections
<ul class="org-ul">
<li>Express curiosity about the potential of large language models in daily life.</li>
<li>Discuss the hype around these models versus personal exploration.</li>
</ul></li>
<li>Setting the Stage
<ul class="org-ul">
<li>Briefly mention the rise of companies in this domain and public interest.</li>
</ul></li>
</ol>

<p>
<b><b>II. Understanding Large Language Models</b></b>
</p>
<ol class="org-ol">
<li>What are Large Language Models?
<ul class="org-ul">
<li>Definition and basic explanation.</li>
<li>Brief history and evolution.</li>
</ul></li>
<li>ChatGPT: A Case Study
<ul class="org-ul">
<li>Introduction to ChatGPT.</li>
<li>How it differs from traditional models.</li>
</ul></li>
</ol>

<p>
<b><b>III. Practical Applications of ChatGPT</b></b>
</p>
<ol class="org-ol">
<li>Everyday Uses
<ul class="org-ul">
<li>Text classification with vectors.</li>
<li>Memory assistance: Remembering common words and concepts.</li>
<li>Research and summaries.</li>
</ul></li>
<li>Creative Endeavors
<ul class="org-ul">
<li>Generating stories and poems.</li>
<li>Using ChatGPT for brainstorming and idea generation.</li>
</ul></li>
<li>Professional Scenarios
<ul class="org-ul">
<li>Outlining and organizing thoughts.</li>
<li>Follow-up questions and deep-dives into topics.</li>
<li>Contrasting desires and needs: Figuring out preferences.</li>
</ul></li>
</ol>

<p>
<b><b>IV. Exploring Advanced Features and Accessibility</b></b>
</p>
<ol class="org-ol">
<li>Beyond Basic Use: Advanced Features
<ul class="org-ul">
<li>Exploring vector search.</li>
<li>Potential of ChatGPT in livestreaming contexts.</li>
</ul></li>
<li>Accessibility and Options for Users
<ul class="org-ul">
<li>Comparing API access with ChatGPT Plus.</li>
<li>Discussing the implications for different types of users.</li>
</ul></li>
</ol>

<p>
<b><b>V. Conclusion</b></b>
</p>
<ol class="org-ol">
<li>Personal Reflections Revisited
<ul class="org-ul">
<li>Revisiting initial skepticism or curiosity.</li>
<li>Reflections based on the exploration in the article.</li>
</ul></li>
<li>Looking Forward
<ul class="org-ul">
<li>Potential future developments in large language models.</li>
<li>Encouraging reader interaction: Inviting questions and comments.</li>
</ul></li>
</ol>


</details>

<p>
The outlines it generates from my audio braindumps
could be an interesting way to structure a large
wall of text, if I could just get it to use more
of my own words while still correcting
misrecognized words.
</p>
</div>
</div>
<div id="outline-container-org3e734e9" class="outline-2">
<h3 id="org3e734e9">Follow-up questions and ideas</h3>
<div class="outline-text-2" id="text-org3e734e9">
<p>
I could give GPT a blog post or presentation draft and ask it to generate follow-up questions so that I can flesh ideas out further. Although usually adding more stuff isn't a problem for me&#x2013;it's more like finding a good stopping point instead of getting tempted to squeeze one more hack in&#x2026;
</p>

<p>
The kiddo sometimes needs a bit of prompting to elaborate on her writing homework. She responds well to me mind-mapping while we free-associate words, but sometimes it helps to have follow-up questions, and it works out much better when the computer's the one asking the follow-up questions instead of me.
</p>
</div>
</div>
<div id="outline-container-org931a81a" class="outline-2">
<h3 id="org931a81a">Figuring out what I want to say and how</h3>
<div class="outline-text-2" id="text-org931a81a">
<p>
Sometimes I'm not happy with the way a sentence or paragraph flows. Metaphors can be helpful. Mixed metaphors are weird. Maybe a GPT can help me find a smoother way to explain things. Getting writing suggestions seems to be fine on a very small scale (phrases or sentences).
</p>

<p>
When I ask GPT to write longer things, then things get crazy.
ChatGPT is pretty good at getting me to say "That totally doesn't sound like me, I'd better just write it myself," which seems like a common result.
</p>
</div>
<div id="outline-container-orga2bd65f" class="outline-3">
<h4 id="orga2bd65f">AI style guide</h4>
<div class="outline-text-3" id="text-orga2bd65f">
<p>
I wanted to see if I could get it to sound more like me, so I went through Tiago Forte's tutorial for <a href="https://fortelabs.com/blog/how-to-create-an-ai-style-guide-write-with-chatgpt-in-your-own-voice/">creating an AI style guide</a>. I gave it a few of my recent blog posts (<a href="https://sachachua.com/blog/2024/01/org-mode-custom-link-copy-to-clipboard/">1</a>, <a href="https://sachachua.com/blog/2024/01/yay-emacs-2024-01-12-emacsconf-2023-report-svg-animation-embark-org-mode-links/">2</a>, <a href="https://sachachua.com/blog/2024/01/using-an-emacs-lisp-macro-to-define-quick-custom-org-mode-links-to-project-files/">3</a>, and <a href="https://sachachua.com/blog/2023/12/2023-12-25-07-flow-of-ideas-writing-metaphor/">4</a>) and asked it to summarize the resulting style guide concisely. I've included the details in case you want to get an idea of the kinds of things it makes, but it seems more suited to flattery than to practical application.
</p>

<details class="code-details" style="padding: 1em;
                 border-radius: 15px;
                 font-size: 0.9em;
                 box-shadow: 0.05em 0.1em 5px 0.01em  #00000057;">
                  <summary><strong>Sample analysis for one blog post</strong></summary>
<p>
<b>Voice and Tone</b>
</p>
<ul class="org-ul">
<li><b>Formality:</b> The language is informal and conversational, combining personal anecdotes with a discussion of workflows and projects.</li>
<li><b>Authoritative vs. Friendly:</b> The tone is friendly and reflective, sharing personal experiences and thoughts in an approachable manner.</li>
<li><b>Overall Tone:</b> There is a sense of openness and exploration, with a focus on sharing personal learning and development processes.</li>
</ul>

<p>
<b>Mood</b>
</p>
<ul class="org-ul">
<li>The mood is contemplative and optimistic, reflecting a mindset of constant learning and adaptation.</li>
</ul>

<p>
<b>Sentence Structure</b>
</p>
<ul class="org-ul">
<li><b>Structure Type:</b> A mix of compound and complex sentences, with a strong narrative flow that interweaves personal insights with technical descriptions.</li>
<li><b>Length:</b> The sentences vary in length, balancing brief statements with more elaborate explanations.</li>
</ul>

<p>
<b>Transition Style</b>
</p>
<ul class="org-ul">
<li>Transitions are smooth and natural, often moving from a general idea to specific examples or from one aspect of a project to another.</li>
<li>The writer uses a blend of direct transitions and narrative progression to guide the reader through different ideas and concepts.</li>
</ul>

<p>
<b>Rhythm and Pacing</b>
</p>
<ul class="org-ul">
<li>The rhythm is consistent and engaging, with a good balance between detailed technical information and personal narrative.</li>
<li>The pacing is moderate, allowing the reader to absorb the information without feeling rushed.</li>
</ul>

<p>
<b>Signature Styles</b>
</p>
<ul class="org-ul">
<li><b>Recurring Phrases:</b> Frequent use of terms related to personal productivity, technology tools, and creative processes.</li>
<li><b>Unique Punctuation:</b> Inclusion of lists and occasional asides to provide additional context or to elaborate on a point.</li>
<li><b>Patterns/Repetitions:</b> Regular mention of personal routines and habits, combined with technical tool usage and idea development.</li>
</ul>

<p>
<b>Distinctive Writing Style Indicators</b>
</p>
<ul class="org-ul">
<li>A strong focus on personal productivity and idea management, combined with technical tool usage.</li>
<li>Frequent reflection on personal learning processes and adaptation strategies.</li>
<li>An engaging narrative style that seamlessly combines personal experiences with technical advice and insights.</li>
<li>The inclusion of potential future improvements and explorations, indicating a forward-thinking and open-ended approach to problem-solving.</li>
</ul>

<p>
In summary, this text further cements the author's distinctive style of blending personal narrative with technical content. The writing is reflective, engaging, and informative, offering insights into personal workflows and idea management. The author's approachable tone and focus on continuous learning and adaptation make complex topics accessible and relatable to the reader.
</p>


</details>

<details class="code-details" style="padding: 1em;
                 border-radius: 15px;
                 font-size: 0.9em;
                 box-shadow: 0.05em 0.1em 5px 0.01em  #00000057;">
                  <summary><strong>Expanded AI style guide combining the guides from several posts</strong></summary>
<p>
<b>Voice and Tone</b>
</p>
<ul class="org-ul">
<li><b>Formality:</b> Adopt a semi-formal language, leaning towards informal. Use a conversational style but include technical jargon where appropriate.</li>
<li><b>Authoritative vs. Friendly:</b> Aim for a friendly, informative tone. The writing should guide and assist, rather than command.</li>
<li><b>Overall Tone:</b> Maintain a helpful and instructive tone, with a focus on practical application and reader engagement.</li>
</ul>

<p>
<b>Mood</b>
</p>
<ul class="org-ul">
<li>Keep the mood pragmatic and enthusiastic, especially when discussing the efficiency and utility of tools, methods, and personal projects.</li>
</ul>

<p>
<b>Sentence Structure</b>
</p>
<ul class="org-ul">
<li><b>Structure Type:</b> Utilize a mix of simple, compound, and complex sentences.</li>
<li><b>Length:</b> Vary sentence lengths. Use brief sentences for straightforward facts and longer ones for detailed technical explanations and personal anecdotes.</li>
</ul>

<p>
<b>Transition Style</b>
</p>
<ul class="org-ul">
<li>Ensure transitions are smooth, moving from general ideas to specific examples. Use both direct transitions and subtle shifts in topic, based on the subject matter.</li>
</ul>

<p>
<b>Rhythm and Pacing</b>
</p>
<ul class="org-ul">
<li>Maintain a moderately paced rhythm. Balance shorter sentences for clear facts and longer ones for in-depth explanations.</li>
<li>Keep the narrative conversational and engaging, with a balance between technical details and personal reflections.</li>
</ul>

<p>
<b>Signature Styles</b>
</p>
<ul class="org-ul">
<li><b>Recurring Phrases:</b> Frequently use phrases like "Org Mode," "Emacs," and relevant technical terms.</li>
<li><b>Unique Punctuation:</b> Use parentheses for additional information and include code snippets where relevant.</li>
<li><b>Patterns/Repetitions:</b> Regularly follow the introduction of a concept with practical, often technical, examples.</li>
</ul>

<p>
<b>Distinctive Writing Style Indicators</b>
</p>
<ul class="org-ul">
<li>Blend personal experience with technical instruction.</li>
<li>Use specific examples, particularly code snippets, to illustrate points.</li>
<li>Combine technical jargon with a conversational tone.</li>
<li>Include practical applications and benefits of described methods or tools.</li>
<li>Integrate personal anecdotes and reflections with technical content.</li>
<li>Use interactive elements like reader questions and responses to foster a community-focused approach.</li>
</ul>

<p>
<b>Additional Elements</b>
</p>
<ul class="org-ul">
<li>Focus on problem-solving and exploring new tools or methods.</li>
<li>Include visual elements like screencasts or diagrams to enhance understanding.</li>
<li>Reflect on personal learning processes and adaptation strategies.</li>
<li>Consider potential future improvements and explorations in the subject matter.</li>
</ul>


</details>

<p>
When I asked it to summarize the style in a single paragraph, it said:
</p>

<blockquote>
<p>
Use semi-formal, conversational language with occasional technical jargon. The tone should be friendly and informative, focusing on practical applications and engaging the reader. Include a mix of sentence structures, varying lengths for clarity and detail. Transition smoothly between general ideas and specific examples, maintaining a moderate pace with a balance of technical details and personal reflections. Frequently use phrases like 'Org Mode' and 'Emacs', and incorporate parentheses for additional information and code snippets to illustrate points. Blend personal experiences with technical instruction, using specific examples, especially code, to clarify concepts. The content should emphasize problem-solving, exploring new tools/methods, and personal learning processes, with visual elements like diagrams for better understanding. Aim to reflect on potential future improvements in the subject matter, fostering a community-focused approach with interactive elements like reader questions.
</p>
</blockquote>

<p>
This feels related to <a href="https://en.wikipedia.org/wiki/Barnum_effect">the Barnum effect</a>, which is the psychological phenomenon that explains how many people feel like very general statements (ex: horoscopes) are specific to them. I'm not sure I could give this to a human and get them to write like me enough that I'd want to use the text.
</p>

<p>
I've had a few opportunities to reflect on what <span class="underline">does</span> sound like me, mostly thanks to EmacsConf. For example, I definitely skew the e-mail personality away from polished to personal. (Do other conference organizers include "aaaah!" and stress levels in their e-mails?) I tell GPT to get rid of its adjectives. Even with this style guide and additional instructions like avoiding adjectives, I haven't gotten ChatGPT to cut down on this thing I can't quite figure out how to explain. The way it writes feels like it's just a bit much.
</p>
</div>
</div>
<div id="outline-container-orga861806" class="outline-3">
<h4 id="orga861806">Generating text</h4>
<div class="outline-text-3" id="text-orga861806">
<p>
Here's what it came up with when I asked it to use the style guide and write one paragraph about how the cat's been waking me up at 5:30 AM, the kiddo wants bedtime snuggles at 11:30 PM, and I can tell when the sleep deprivation's building up thanks to the brain hiccups I get when solving a Rubik's cube. It said:
</p>

<blockquote>
<p>
Ah, the joys (and challenges) of balancing family life with personal interests and hobbies! Let me tell you, as someone who's navigated the tricky waters of being woken up by a cat at the ungodly hour of 5:30 AM and then, barely blinking away the sleep, being summoned for late-night snuggle sessions with the kiddo until 11:30 PM, I totally get the feeling of being perpetually sleep-deprived. This exhaustion hits hardest when I'm trying to solve Rubik's cubes. Normally, I'd zip through the algorithms with ease, but now, I find my brain hiccupping mid-solve, forcing me to backtrack and re-solve. It's like my mind is stuck in a loop!
</p>
</blockquote>

<p>
Which&#x2026; well&#x2026; It's reassuring to know that even though I sometimes feel self-conscious about enthusiasm! exclamation marks! geeking out about stuff! I actually write in a more restrained manner compared to how ChatGPT thinks I write.
</p>

<p>
Also, ChatGPT enthusiastically went on to write two paragraphs making up more stuff out of whole cloth, which I will tuck behind a collapsible section because this is definitely more along the lines of entertainment rather than productivity at this time.
</p>

<details class="code-details" style="padding: 1em;
                 border-radius: 15px;
                 font-size: 0.9em;
                 box-shadow: 0.05em 0.1em 5px 0.01em  #00000057;">
                  <summary><strong>More from ChatGPT</strong></summary>
<blockquote>
<p>
But, you know, this is where my geek side comes to the rescue. I've started using Org Mode in Emacs (my go-to productivity tool) to manage my day better. How? Well, for starters, I've programmed a custom routine that reminds me to take short, but effective power naps. Think <code>(setq power-nap '(15 "minutes"))</code>. This tiny snippet of code, embedded in my daily schedule, works wonders! Plus, Org Mode's flexibility allows me to seamlessly integrate family time into my daily planner, ensuring I don't miss out on those precious moments. And when it comes to problem-solving, I've begun to treat my Rubik's cube solves like mini projects. I break them down into steps and track my progress (and missteps) in Emacs. This not only helps me understand where my sleep-deprived brain is tripping up but also serves as a great way to visualize my thought process (hello, mind maps!).
</p>

<p>
Looking ahead, I'm considering exploring Emacs extensions that could further optimize my routine, maybe even one that predicts the best times for cube-solving based on my sleep patterns. It's all about finding that sweet spot where personal hobbies and family life can coexist without leaving me feeling like a zombie. Who knows, maybe I'll even code a mini-game in Emacs for my kiddo, blending playtime with my love for coding. The possibilities are endless, and that's the beauty of it. Any fellow Emacs users out there with similar challenges? How do you balance it all? Let's share some tips and tricks!
</p>
</blockquote>


</details>

<p>
So yeah. Maybe not text generation just yet.
</p>
</div>
</div>
</div>
<div id="outline-container-org2c8b1dd" class="outline-2">
<h3 id="org2c8b1dd">Ideas about common topics</h3>
<div class="outline-text-2" id="text-org2c8b1dd">
<p>
My energy can get pretty low during the afternoon because of the aforementioned 5:30 cat alarm. It can help to have something suggest a list of ideas that we can pick from, like little Minecraft build challenges.
</p>
</div>
</div>
<div id="outline-container-orgdb8d383" class="outline-2">
<h3 id="orgdb8d383">Making up stories and poems for the kiddo</h3>
<div class="outline-text-2" id="text-orgdb8d383">
<p>
It's a handy way to generate short stories and poems based on the kiddo's interests. I've been getting her to supply a prompt in either the SWBST story summary format ("Somebody&#x2026; Wanted&#x2026; But&#x2026; So&#x2026; Then") or the beginning/middle/end format so she does some of the work, and then GPT can deliver the payoff in the form of a fleshed-out story that invariably makes us giggle.
</p>
</div>
</div>
<div id="outline-container-org25120e3" class="outline-2">
<h3 id="org25120e3">Wrapping up</h3>
<div class="outline-text-2" id="text-org25120e3">
<p>
This is more of a low-priority medium-term thing for me to explore, probably after I spend some more time getting the hang of livestreaming, transcripts, and vector search. I'll keep an eye out for interesting ideas.
</p>

<p>
I think I can access the GPT 4 model (or maybe gpt-4-1106-preview) on a pay-per-use basis <a href="https://openai.com/pricing">through the API</a>, which will probably work out better than paying USD 20/month for ChatGPT Plus. I can also check out Gemini Pro's API.
</p>

<p>
A cursory skim of <a href="https://www.reddit.com/r/LocalLLaMA/">r/LocalLLaMA</a> gives me the impression that for reasonable non-toy use, local large language models require way better hardware than I have at the moment. Even people with more powerful hardware tend to focus on smaller models (maybe for coding autosuggestions or generating text for roleplaying games), and they use commercial GPTs for things where they want larger context windows or more general knowledge. Might be worth checking on this in a little while as people work on scaling models down and figuring out more things to do with open source models.
</p>

<p>
Anyway, those are my notes on this so far. Looking forward to reading more about how people are using LLMs in Emacs, considering all the things that Emacs can work with!
</p>
</div>
</div>
<div><a href="https://sachachua.com/blog/2024/01/large-language-models-and-me/index.org">View org source for this post</a></div>
<p>You can <a href="https://sachachua.com/blog/2024/01/large-language-models-and-me/#comment">view 1 comment</a> or <a href="mailto:sacha@sachachua.com?subject=Comment%20on%20https%3A%2F%2Fsachachua.com%2Fblog%2F2024%2F01%2Flarge-language-models-and-me%2F&body=Name%20you%20want%20to%20be%20credited%20by%20(if%20any)%3A%20%0AMessage%3A%20%0ACan%20I%20share%20your%20comment%20so%20other%20people%20can%20learn%20from%20it%3F%20Yes%2FNo%0A">e-mail me at sacha@sachachua.com</a>.</p>]]></content>
		</entry>
</feed>