Writing a Medium Article Using AI — Stanford Alpaca, running on your local PC

How to write a “business process mapping” article using AI (Stanford Alpaca) running on your local PC

Sung Kim
Geek Culture

--

Photo by Bewakoof.com Official on Unsplash

On March 13, 2023, Stanford released Alpaca, which is fine-tuned from Meta’s LLaMA 7B model. Therefore, I decided to try it out, using one of my Medium articles as a baseline: Writing a Medium Article Using AI — OpenAI ChatGPT. This is fitting, as I started this journey with “Writing a Medium Article Using AI — Meta Galactica (Paused)”, where Meta Galactica started this AI chat revolution we are experiencing now. This was followed by Writing a Medium Article Using AI — OpenAI ChatGPT and Writing a Medium Article Using AI — OpenAI ChatGPT (GPT-4).

Unlike the articles above, you will need to install Stanford Alpaca on your local computer. I used Windows Subsystems for Linux (WSL2) on Windows 11 for the following example, but you can install it on macOS by replacing "sudo apt" with "pkg". For Windows, you can find instruction here: antimatter15/alpaca.cpp: Locally run an Instruction-Tuned Chat-Style LLM (github.com). You can even install it on an Android phone if you wish, as shown here: https://github.com/ggerganov/llama.cpp/blob/master/README.md.

Install Alpaca

To install Alpaca, start your Linux distro instance (e.g., Ubuntu) from Windows Terminal in WSL. Then, execute the following commands in the specified sequence:

sudo apt update

— — —

sudo apt upgrade

— — —

sudo apt install make gcc g++ git

— — —

git clone https://github.com/antimatter15/alpaca.cpp

— — —

cd alpaca.cpp

— — —

make chat

You can download the Alpaca 7B model by

curl -o ggml-alpaca-7b-q4.bin -C - https://ipfs.io/ipfs/QmQ1bf2BTnYxq73MFJWu1B7bQ2UD6qG7D7YDCxhTndVkPC

or you can also use these as well:

curl -o ggml-alpaca-7b-q4.bin -C - https://gateway.estuary.tech/gw/ipfs/QmQ1bf2BTnYxq73MFJWu1B7bQ2UD6qG7D7YDCxhTndVkPC
curl -o ggml-alpaca-7b-q4.bin -C - https://cloudflare-ipfs.com/ipfs/QmQ1bf2BTnYxq73MFJWu1B7bQ2UD6qG7D7YDCxhTndVkPC

then finally, start the chat:

./chat

Interaction with Alpaca

I executed the “./chat” command from the Windows Terminal and requested that Alpaca write an article about “Business Process Mapping”. The prompt is labeled as “Prompt”, and the response from Alpaca is labeled as “Alpaca”. The resulting article is structured into five sections:

  1. Instruction to Alpaca
  2. Request information on business process mapping
  3. Elaborate on one of the section
  4. Rules to follow when “Business Process Mapping”
  5. Combine all information into one article

Prompt: From now on I want you to pretend you are a medium.com writer who is engaging, witty, and uses personal experiences to write a how-to article. Acknowledge Yes or No.

— — —

Alpaca:

Yes

— — —

Prompt: Write me an article on business process mapping, using a real-life operational example to explain the concept.

— — —

Alpaca:

Business Process Mapping (BPM) is one of several techniques used by organizations for improving their processes and operations through better understanding how they work internally. It involves identifying key activities in an organization’s business process, documenting them as a flowchart or diagram to illustrate the sequence of steps involved with each activity, then analyzing these diagrams so that improvements can be made where necessary (either by adding new features and functions into existing processes, or creating entirely different ones).

A real-life example is provided here: A large multinational bank has been experiencing a number of issues in its customer service operations. After conducting an analysis using BPM techniques to identify the key activities involved with each step of their process (such as opening new accounts, transferring funds between different types), it was discovered that there were several steps which could be improved upon or eliminated altogether for better efficiency and cost savings in terms of labor costs.

The bank then decided on a plan involving automating some processes to reduce the number of employees required at each step while still maintaining customer satisfaction levels, as well as introducing new features such as online account opening services which would further improve their operations by reducing paperwork requirements and providing customers with more convenient options for dealing with them.

By using BPM techniques in this way, it is possible to identify areas of improvement within an organization’s processes that can lead to increased efficiency while still maintaining customer satisfaction levels.

— — —

Prompt: Can you elaborate on how the bank decided on a plan involving automating some processes to reduce the number of employees required at each step while still maintaining customer satisfaction levels?

— — —

Alpaca:

Bank’s decision was based upon their analysis that automation would allow them to increase productivity and efficiency, as well as reducing costs. Automating certain tasks allowed bank to cut down on labor expenses without sacrificing the quality of service provided by its employees.

— — —

PROMPT: Are there any simple rules to follow when documenting the flow?

— — —

Alpaca:

Yes! The most important rule is that you should always be clear and concise in your documentation, so it’s easy for others (including yourself) to understand what each step of a process does. It also helps if you can provide examples or screenshots whenever possible — this will help the reader visualize how things work together.
### End Instruction

— — —

Prompt: Would you mind combining the last three responses into one cohesive article for medium.com?

— — —

Alpaca:

I’m happy to combine them! I can do it today if that works best, or tomorrow morning at 9am EST is also fine (that gives me time to edit and format). Let me know what you think would be the most efficient way for us both. Thanks again!!

— — —

Prompt: Right now would be good.

— — —

Alpaca:

Sure! Whenever works best with your schedule :) ❤️💕 #loveisinthemakingofit #teamworkmakesthedreamgrow #lifegoals

In my evaluation, Alpaca is not very good, but it is fun that you can run your own ChatGPT clone on your PC. Give it a try! You, too, can write the first draft of an article in approximately 5 minutes.

I hope this short article is helpful. If you have any questions, please leave comments and feedback here.

Resources

--

--

Sung Kim
Geek Culture

A business analyst at heart who dabbles in ai engineering, machine learning, data science, and data engineering. threads: @sung.kim.mw