Profitina Laundry is a small laundry business in Surabaya. It has three outlets, in Rungkut, in Keputih and in Wiyung. The outlet in Rungkut opened first, in 2019. The outlet in Wiyung is the newest one. Every outlet washes, dries, irons and folds clothes for its customers.
A customer brings a bag of clothes to the counter. The staff weigh the clothes and write a bill. The bill says the service, the weight, the price and the date when the clothes will be ready. Most customers choose wash, dry and fold. It costs eight thousand rupiah per kilogram. Express wash and fold is ready in one day and costs twelve thousand rupiah per kilogram. Ironing only costs six thousand rupiah per kilogram.
Some things are not weighed. A suit, a dress, a jacket or a kebaya is cleaned per item. Dry cleaning a shirt costs twenty thousand rupiah. Dry cleaning a suit of two pieces costs sixty five thousand rupiah. A bed cover costs thirty five thousand rupiah, whatever its size. A blanket costs twenty five thousand rupiah. Shoes are cleaned per pair, and a helmet is cleaned per item.
The laundry opens at seven in the morning and closes at nine in the evening. On Sunday it closes at five in the afternoon. Customers can pay in cash, by bank transfer or with QRIS. A regular order is ready in two or three days. An express order is ready the next day.
Good laundry starts with sorting. White clothes are washed apart from dark clothes. New batik is washed by hand in cold water, because its color can run. Wool and silk need a gentle cycle. A stain should be treated before the wash, not after it. Hot water sets a blood stain, so blood is rinsed in cold water first. Coffee and tea stains come out with a little soap and warm water. Oil stains need a degreaser.
The staff check every pocket before a wash. They find coins, pens, receipts and sometimes a phone. A pen in a pocket can ruin a whole load of shirts. Checking pockets takes a minute and saves a lot of trouble.
When the clothes are clean, they are dried, ironed and folded. Each order goes to a rack with a label. The label shows the bill number, so the staff can find the order quickly. When the customer comes back, the staff read the bill number, take the order from the rack and hand it over.
The owner of the laundry wants to know how busy each outlet is. She counts the orders every day. Monday is usually busy, because people bring the laundry of the weekend. The days before a holiday are also busy. In the rainy season more people use the dryer service, because clothes do not dry at home.
A computer can help the laundry in many ways. It can keep the bills, remember the customers and print the labels. It can forecast how many orders will come next week. It can answer simple questions from customers, such as the price of a service or the status of an order. A program that answers questions in plain language is called a chatbot.
A language model is a program that predicts the next word. It reads a piece of text and gives a probability to every word that could come next. Then it picks one word, adds it to the text and repeats. Step by step it writes a sentence, and sentence by sentence it writes an answer.
A small language model can be built by counting. We count how often each word follows each pair of words in a large text. The counts become probabilities. This is called an n-gram model. A trigram model looks at the last two words to choose the next word. It is fast and simple, but it has a short memory and it does not understand meaning.
A large language model is a neural network with billions of numbers inside. It is trained on a huge amount of text. It learns grammar, facts and patterns of reasoning from that text. It can answer questions, summarize documents, translate between languages and write code. It can also be wrong with great confidence, so its answers must be checked.
A large language model can run on your own computer. A tool called Ollama downloads open models and serves them on your machine. A program talks to Ollama over HTTP, by sending a request with a prompt and reading the response. Because the model runs locally, the text never leaves your computer.
The prompt is the text we send to the model. A good prompt says clearly what we want, gives the facts the model needs and shows the format of the answer. A system prompt sets the role and the rules for the whole conversation. A few examples in the prompt often help more than a long explanation.
The temperature controls how random the answer is. A low temperature makes the model choose the most likely words, so the answer is safe and repetitive. A high temperature makes the model take more risks, so the answer is varied and sometimes strange. For facts and data we use a low temperature. For stories and ideas we can use a higher one.
A model can only read a limited number of tokens at once. This limit is called the context window. A long conversation must be shortened to fit in the window. We can keep the last few messages, or we can replace old messages with a short summary.
Retrieval augmented generation gives the model the right facts at the right time. First we split our notes into small chunks. Then we turn each chunk into a vector of numbers, called an embedding. When a question comes, we find the chunks whose vectors are closest to the question and put them in the prompt. The model then answers from those chunks and can cite them.
A model can also call tools. We describe a function, its name and its parameters. When the model needs a fact that it does not have, it asks us to call the function with certain arguments. Our program runs the function and sends the result back. The model then writes the final answer with the real data.
Structured output means that the model answers in a fixed format, such as JSON. We give the model a schema that lists the fields and their types. Our program then checks the answer against the schema. If the answer is not valid, we can ask again or report an error.
Safety matters for every application that uses a language model. A user may try to trick the model into ignoring its rules. This is called prompt injection. A model may leak private data, such as a phone number or an address. A good application checks what goes into the model and what comes out of it.
Testing a language model is different from testing a normal function. The same prompt can give a different answer each time. So we build a set of test cases, run the model many times and measure how often it is right. We also measure how long it takes and how many tokens it uses.
Python is a friendly language for this work. It has a clear syntax and many libraries. A function should do one thing and have a clear name. A test checks that the function gives the expected result. Good code is easy to read, easy to test and easy to change.
Surabaya is a large city in East Java. It is hot and busy, and its people are known for being direct and friendly. Many students live in Keputih, near the campus. They bring their laundry every week, and many of them choose the express service before an important day.
The staff of the laundry work in shifts. The morning shift starts at seven and the evening shift ends at nine. Each shift has a person at the counter, a person at the washing machines and a person who irons and folds. The supervisor checks the quality of every order before it goes to the rack.
A happy customer comes back. The laundry sends a message when an order is ready, and it keeps the clothes safe for thirty days. If a customer finds a problem, the staff wash the item again for free. Clear prices, clean clothes and polite service keep the customers loyal.
The weather in Surabaya changes the work of the laundry. In the dry season, from May to October, clothes dry quickly in the sun. In the rainy season, from November to April, the dryers run all day. The electricity bill is higher in the rainy season, and the owner plans for it.
The laundry keeps a record of every order. The record shows when the clothes arrived, when they were finished and when they left. From these records the owner learns how long an order takes, which services are popular and which days are busy. Data turns a guess into a plan.
