Prompt Design to Reduce AI Token Costs When Using the Lao Language

Prompt Design to Reduce AI Token Costs When Using the Lao Language

Introduction

Because Lao uses a writing system without spaces between words, tokenizer segmentation becomes finer-grained, and even for the same content, token consumption can balloon to several times that of English or Japanese. By understanding this structure and proceeding with AI token cost optimization, you can carry out token efficiency improvements step by step: checking the pricing structure, measuring current token consumption, understanding the reasons for bloat in Step 1, simplifying prompts in Step 2, designing requests in Step 3, and selecting models and batch processing in Step 4. This article is aimed at DX managers who have introduced AI services supporting Lao and are looking for ways to address rising API usage fees, and it presents procedures that can be carried out in-house, from measurement to the application of reduction measures.

If you try reduction measures without first checking the name of the model you are using, its tokenizer, and the upper limit of its context window, the baseline for measuring effectiveness will be off, leading to mistaken judgments. Establishing the pricing structure and current consumption levels as the two foundational points is a prerequisite.

Check the pricing model and token billing unit of your AI API

Billing for commercial APIs is generally based on calculating input tokens and output tokens at separate prices. Price lists show unit prices per 1,000 tokens or per 1 million tokens, and in many cases output tokens are set at a higher unit price than input tokens, so tasks requiring longer outputs are more heavily affected by the unit price.

There are three items you should check:

Item to CheckContent
Input/output unit pricesCheck the input token unit price and output token unit price separately in the price list for each model
Cache read feesWhether there is a mechanism that charges a lower price than normal input when the same leading prefix is resent
Batch processing discountsWhether discounted pricing is set for batch processing methods that handle requests asynchronously in bulk

With OpenAI, when the same leading prefix matches for a certain number of characters or more, a cache read fee (priced lower than normal input) is automatically applied. Depending on the provider, a separate fee may be charged for cache writes, so check the mechanism in the official documentation for the model you are using. The minimum string length eligible for caching and the cache expiration period vary by model, so you need to check the minimum cache length and TTL (cache time-to-live) on the pricing page for the model you are using. Since prices are subject to change, be sure to check the latest unit prices on the official pricing page for each model before use. By grasping this unit price information in advance, you will be able to accurately estimate the actual billing amount from the token consumption measured in later sections.

Measure the current token consumption of Lao language requests

Using the actual message structure you are sending, obtain the token count either with the tokenizer corresponding to the model you are using or via the provider-certified count_tokens endpoint. There are two approaches: counting with a local tokenizer library, and querying the API directly. Either way, the condition is that you count using "the same splitting rules the model uses."

The basic approach to measurement is to measure the system instructions, user input, and expected output together. In chat-format APIs, tokens are added on top for the role (system / developer / user) delimiters and accompanying metadata, so counting only the body text in isolation will show a lower figure than the actual billed amount. Perform the measurement using the same message structure as in actual operation.

# Pseudocode (check the official documentation for exact API names and arguments)
response = client.count_tokens(
model="name of the model in use",
messages=[
{"role": "system", "content": full text of the system instructions},
{"role": "user", "content": Lao-language input text},
],
)
print(response.input_tokens)

After calling the API, check the actual measured values of input and output tokens in the usage field, and compare them with the tokenizer measurement taken beforehand. Measurement should not be done just once; gather multiple pieces of text actually used in business operations, including both short inquiries and long request texts, to get closer to the average consumption across the entire operation.

Since the billed amount differs for the same input depending on whether the cache hits or misses, measuring with the cache both enabled and disabled lets you determine under which condition you should estimate pricing. The measured input/output token values obtained here serve as the baseline for understanding the extent to which Lao-specific token bloat is occurring. By recording this baseline, you will be able to numerically compare the effects after applying subsequent reduction measures.

Step 1: Understand why Lao increases token count

Step 1: Understand why Lao increases token count

Token bloat in Lao arises from the combination of a writing system that places no spaces between words and the low frequency of Lao script characters in the tokenizer's training data. Because the same content is split into more tokens than in English or Japanese, the difference in billing amount is not a matter of language choice but a structural result of the segmentation rules.

Understand how the tokenizer splits Lao characters

In the Lao writing system, there is almost no whitespace separating words. In English, whitespace itself serves as a marker for word boundaries, allowing the tokenizer to use those boundaries to efficiently learn merges (the process of combining multiple characters into a single token). In Lao, because the character string continues without breaks, if the vocabulary merges learned by the tokenizer during training contain few combinations of Lao characters, it can only split text at the single-character level or at a similarly fine granularity.

This phenomenon also affects cases where Lao text is pre-segmented with zero-width spaces (ZWSP) before being sent to the API. While inserting ZWSPs improves the appearance of line wrapping and word boundaries, the inserted characters themselves are also processed according to the tokenizer's splitting rules, which can increase the number of input tokens. When introducing pre-segmentation, measure and compare the actual token counts before and after insertion, and adopt whichever approach is advantageous in terms of total token count.

The granularity of splitting is not uniform, as the proportion of Lao language in the training data differs by model and generation. The BPE Tokenizer Pitfall and Lao Language Translation provides a more detailed look at this splitting mechanism.

Compare the character cost difference with English and Japanese

According to reference values we measured in-house, when the same sentence is tokenized separately in Lao, English, and Japanese, there are cases where the token count for Lao reaches several times to nearly 10 times that of English. Japanese, also being a non-Latin script, has a higher token cost per character than English, but because Japanese appears relatively frequently in the training data of commercial tokenizers, it does not inflate to the same degree as Lao. This difference varies depending on the combination of corpus (the set of sentences used for comparison) and tokenizer, so these reference values cannot be directly applied to your own cost estimates.

When conducting a comparison, the following two points must be aligned:

  • Unify the tokenizer used by the models being compared (results differ between cl100k_base and o200k_base)
  • Use parallel sentences that express the same semantic content in each language for comparison

Furthermore, unless the length of the sentences being compared is matched, the difference in unit cost becomes difficult to see. Short greeting sentences and long business request sentences are split differently; with short sentences, the difference between Lao and English appears small, while with longer sentences, the difference can widen. By preparing the actual text sent in business operations in three versions—Lao, English, and Japanese—and measuring them simultaneously with the model in use, you can grasp the token cost difference as it applies to your actual business, rather than relying on reference values. These measured values can also serve as a baseline for evaluating the effects of prompt simplification and cache utilization, discussed later.

Step 2: Learn to write concise prompts

Step 2: Learn to write concise prompts

Since the number of input tokens is directly proportional to the length of the prompt, sending verbose text while retaining the splitting characteristics that tend to inflate token counts in Lao causes billing amounts to balloon in two ways. Both reducing the instructional text and reducing repeatedly sent portions are direct means of lowering billing amounts.

Remove redundant instructions and repetitive expressions

Instructional text that conveys the same content repeatedly using different phrasing compounds with Lao's splitting characteristics to push up token counts. Targets for reduction can be broadly divided into three types.

Target for ReductionSpecific ExampleCountermeasure
Formulaic preamblesIntroductory phrases such as "Please follow the instructions below"Omit, and start directly from the instruction body
Duplicate condition descriptionsWriting the same constraint twice, at the beginning and end of the textConsolidate into one location
Excessive examplesListing three or more examples of the same kindNarrow down to 1–2 representative examples

Example:

BeforeAfter
"Please translate the following text from Lao to Japanese. When translating, use polite language, and make it natural Japanese without changing the meaning or compromising the intent of the original text.""Please translate the following Lao text into polite, natural Japanese."

In the revised version, the conditions are consolidated into a single sentence, and overlapping constraint expressions such as "without changing the meaning" and "without compromising the intent" are removed. Before applying this kind of compression to production use, measure the actual token counts before and after the change using the tokenizer of the model you're using (such as tiktoken or a provider's count_tokens endpoint), and verify from the output results that no meaning has been lost. If you compress too aggressively and the instructions become ambiguous, it will lead to more output corrections, resulting in a different kind of added cost.

Standardize system prompts to reduce resending

If you construct a different system prompt each time for inquiries sent by multiple users, you end up repeatedly sending instructional text—inflated by Lao's splitting characteristics—as billable content on every single request. By separating the parts that vary by task from the parts that can remain fixed, and placing the fixed portion as a common template at the beginning, resending the same string becomes eligible for cache reads, allowing it to be processed at a lower price than normal input.

The procedure for creating a common template is as follows:

  1. Identify instructional text that is reused across multiple tasks
  2. Separate the parts that vary by task (such as Lao input text or individual conditions) and move them to the end
  3. Fix the common portion as a single template at the beginning as a prefix
  4. Check the model's documentation for the minimum character count eligible for caching, and if it's not met, increase or consolidate the fixed portion

Since requests made immediately after the cache expires incur write charges, the benefits of using a common template are more pronounced for batch processing with consecutive calls or operations concentrated in a short period of time. Be aware that forcing common templates onto infrequently used instructional text will only increase write charges incurred when the cache has expired.

Furthermore, if the content of the common template is rewritten frequently, the cache becomes invalid each time, triggering write charges anew. As a practical rule of thumb, the fixed portion should be limited to instructions that change infrequently. Mixing conditions or output format specifications that differ by task into the fixed portion dilutes the benefits of templating, so variable elements must always be kept separated at the end. When reusing a common template across multiple tasks, establishing an operational rule to replace only the variable portion at the end for each task makes it easier to maintain the benefits of templating even when personnel change.

Step 3: Reduce token consumption through request design

Step 3: Reduce token consumption through request design

Beyond simply trimming the volume of prompt text, changing the way input is passed to the API can further suppress the cost increase caused by Lao's tokenization characteristics. Both fixing the output format and compressing the input context being sent are measures that change the structure of the request itself, and they are effective against costs that cannot be reached merely by refining how sentences are written.

Fix the output format to reduce response verbosity

Since many models set a higher unit price for output tokens than for input tokens, when a model generates answers in free form, greetings, introductory explanations, and repeated conclusions get mixed in, causing more tokens than necessary to be billed. This redundancy cannot be prevented by trimming instruction text; it requires changing the structure of the request itself that is passed to the API.

The countermeasure is to use an output schema (such as JSON schema) or a response format specification feature to fix in advance the fields to be returned and their types. Because the model generates only values that conform to the specified structure, the introductory remarks and rephrased conclusions that tend to occur in free-form text do not get mixed in.

# Pseudocode (please check the official documentation for the API name and arguments)
response = client.responses.create(
model="name of the model in use",
input=[{"role": "user", "content": Lao-language input text}],
response_format={
"type": "json_schema",
"schema": {"summary": "string", "category": "string"},
},
)

When designing the schema, the key point is to list only the necessary fields and not leave any free-text field. If even one free-text field is included, the bloated descriptive text caused by Lao's tokenization characteristics will flow into it, weakening the effect of fixing the format.

The type of each field is also an important factor to consider. If a field such as a text summary is left as a string type, descriptive phrasing tends to creep in even in Lao output, so where possible, replace it with an enumerated type listing options or a boolean value, and design string fields as short items limited to key points only. After implementation, you need to measure the actual output token count before and after the change, and verify in your own environment both whether the reduction is concentrated on the targeted fields and whether any necessary information is missing. If the schema is made too strict and input arrives that cannot satisfy the required fields, resubmission due to error responses can conversely increase token consumption, so also review the distinction between required and optional fields.

Use caching and summarization to compress input context

If conversation history or documents are sent in full every time, the bloat caused by Lao's tokenization characteristics accumulates, and the input token count keeps piling up as the exchange progresses. This accumulation can be curbed through two approaches: summarizing long history before resending it, and retrieving and passing only the relevant portions.

In history compression, the most recent exchanges are kept as-is, while only the older portions are summarized and replaced with shorter sentences. If the summary is created in Lao, the bloat from the tokenization characteristics remains, so it is effective to create the summary in Japanese or English and keep only the necessary proper nouns or numerical values in the original Lao text. Where to place the summarization boundary varies by task, so you should measure the actual token count before and after summarization and check the output results to confirm that no necessary information has been lost through summarization.

In compression through retrieval of relevant sections, instead of sending an entire long document every time, only the portions relevant to the question are extracted via vector search and included in the request. If the granularity of chunking (the process of splitting a document into small units) is too coarse, unnecessary portions get sent and the compression effect is weakened; if it is too fine, the surrounding context gets cut off and output quality drops, so the granularity needs to be adjusted according to the length of the documents used in the business. Summarization and caching can be used together, and placing the already-summarized fixed portion in the prefix targeted for caching can further reduce billing on resend.

Step 4: Adjust cost through model selection and batch processing

Step 4: Adjust cost through model selection and batch processing

Even if the prompt or input context is compressed, if the model's capability is excessive for the task, the unit price itself remains overly high. Design changes on the sending side—such as which model handles the processing and at what timing requests are batched and sent—are also adjustment points that directly affect the billed amount.

Switch between lightweight and high-performance models based on use case

Even for the same task, assigning a lightweight model to simple processing such as summarization or classification, and a high-performance model to complex reasoning or text generation, causes the difference in token unit price to be directly reflected in the billed amount. Since the bloat of input tokens caused by Lao's tokenization characteristics occurs at the same rate regardless of whether a lightweight or high-performance model is used, shifting more processing to lower-priced models suppresses the impact of that bloat more effectively.

The criteria for branching between models are the output accuracy requirements and the type of task. Tasks with a narrow range of correct answers, such as routing routine inquiries or extracting keywords, can often achieve sufficient accuracy with a lightweight model, while tasks with low tolerance for error, such as reading contracts or translation involving nuance, require assigning a high-performance model.

When incorporating this into operations, building a mechanism that determines the task type at the entry point of the request and automatically routes it to the appropriate model can prevent variation in judgment among individual staff members. If the accuracy of this routing is low, tasks that could originally be handled by a lightweight model end up flowing to the high-performance model, and the cost-reduction effect from the unit price difference fails to materialize. LLM Model Routing Strategy: Architecture Design Balancing Cost and Accuracy covers how to design this kind of routing. When switching models, measure both the output token count and accuracy before and after the change, and confirm that the cost reduction outweighs any drop in quality.

Batch multiple requests together

If you process a large volume of Lao language translation and classification tasks one by one in real time, you end up sending the same system instructions repeatedly, and the impact of token bloat accumulates in proportion to the number of requests. For tasks that do not require an immediate response, switching to a method that bundles multiple requests into a single job and processes them asynchronously allows you to process them at a lower price than regular requests.

This applies to tasks where there is no need to receive results immediately, such as batch summarization of invoices run daily, classification of inquiry history done in bulk at month-end, or translation of Lao language documents that can be processed in a batch overnight. Conversely, it is not suited to tasks that require response speed, such as customer support chat.

When implementing this, you bundle requests into a file in a dedicated format and upload it, after checking the file size and job count limits in the documentation for the model you are using. Before submitting, check whether the tasks being bundled use the same system instructions. If you mix tasks with different instructions, the job ends up repeatedly sending redundant instruction text, which diminishes the benefit of bundling.

# Pseudocode (check the official documentation for API names and arguments)
batch_job = client.batches.create(
input_file_id=uploaded_file_id,
endpoint="/v1/responses",
completion_window="24h",
)

Since results are retrieved asynchronously, you need to incorporate a mechanism for checking job completion into your workflow. The more tasks using the same system instructions you bundle together, the more you can compress the redundant resending of the common template, keeping the overall billing increase from Lao-specific input token bloat in check. For tasks with a small number of items, the effort of managing jobs may outweigh the discount effect, so it is worth setting a rough threshold for the number of items based on your organization's operational track record to keep your judgment consistent.

What are common mistakes?

What are common mistakes?

Even if you implement reduction measures, if there is a problem with the processing route or the sending method itself, the effect is offset. Measures to lower the per-token unit price and measures to reduce wasteful sending are separate countermeasures, and relying on only one will not reduce the billing amount as expected.

Mistake: processing Lao directly without translation, increasing consumption

If you pass the original Lao language text directly to the model for summarization or classification, the input token bloat caused by the segmentation characteristics of the Lao script falls on the entire task as is. If you translate it into English or Japanese first and then process it, the text being processed becomes a language for which the tokenizer has abundant training data, which may reduce the input token count. However, inserting a translation step means the translation result itself is billed as output tokens, and the quality of subsequent processing changes depending on the accuracy of the translation, so whether direct processing or processing via translation is more advantageous needs to be measured empirically for each task.

A common misjudgment is assuming that inserting a translation step always makes things cheaper. For short inquiry text, the output tokens consumed by translation can exceed the savings from direct processing, increasing the total cost. Conversely, for long document summarization, summarizing after translation may better suppress input token bloat.

The countermeasure is to prepare the same business text in two patterns—"direct processing in Lao" and "processing via translation"—and measure both input and output tokens using the count_tokens endpoint and the usage field to compare them. By dividing samples into three tiers—short boilerplate text, medium-length inquiries, and long documents—and determining which method is advantageous for each, you can route tasks without hesitation according to their type. Be sure to re-measure whenever the text volume or accuracy requirements of a task change, rather than fixing on one method permanently once decided.

Mistake: neglecting prompt templating and sending long text every time

A typical failure is sending requests where the instruction text is rewritten for each individual request, without separating the fixed instruction text from the parts that vary by task. When a staff member fine-tunes the wording every time they make a request, even instructions with the same intent no longer match exactly as strings, and they fall outside the scope of cache reads. In this state, the low-price processing enabled by caching—which is obtained by making the system prompt common—does not kick in, and the instruction text, bloated by Lao's segmentation characteristics, continues to be billed at the regular rate every time.

This failure is prone to occur in operations with multiple staff members. When one person's template is copied and used by other staff members, if they slightly alter the wording or add a note, the leading prefix changes and the cache no longer applies. The more a task relies on the same instruction text on a daily basis—such as review requests or inquiry responses—the larger the billing increase from this accumulation becomes.

The criterion for judgment is how many times the same instruction text is sent per day. Tasks with a higher send frequency incur greater losses from cache misses, making them the priority targets for fixing the template. The countermeasure is to manage the fixed-part template as a single file or piece of code, in a state that staff members cannot freely rewrite. When changes are necessary, thoroughly enforce an operational rule that only the variable part at the end is replaced, and always keep the string of the fixed part identical. Keeping a change history lets you track who rewrote the fixed part and when, which also helps in identifying the cause.

Frequently Asked Questions

Frequently Asked Questions

We will cover three points in order: a comparison of token volume when using Lao, methods for measuring existing prompts, and reduction measures for small organizations.

Q1: How much does token count differ between Lao and English?

According to publicly available measurement results, there are cases where the same content in Lao requires several times to nearly 10 times as many tokens as in English. However, this ratio varies depending on the tokenizer generation and the corpus used for comparison, so it cannot be treated as a fixed value. When estimating your own billing amount, prepare text that you actually use in your business operations, and measure the actual token counts for the Lao version and the English version using the model you are using, in order to confirm the ratio.

Q2: How can I check the token count of an existing prompt?

Measure using either the tokenizer corresponding to the model you are using, or a provider-certified endpoint, keeping the same message structure as in actual operation.

  1. Check the token count in advance using a local tokenizer
  2. Send the same configuration to the count_tokens endpoint to obtain measured values
  3. Cross-check the input and output tokens against the usage field after the API call

Q3: What cost-reduction measures can small businesses take?

Even with a setup where few staff are dedicated to this task, there are 4 measures that can be implemented by setting priorities.

Depending on your internal resources, proceeding in the following order allows for a manageable rollout.

  1. Turn tasks that routinely use the same instruction text into fixed templates, and make them subject to cache reads
  2. Instead of sending the full text of long conversation histories each time, summarize only the older portions before resending
  3. Consolidate translation and classification tasks that do not require immediate responses into batch processing, handling them asynchronously at discounted prices
  4. Route routine inquiries to lightweight models, reserving high-performance models only for complex processing

If there is only one dedicated staff member, a reasonable order is to start with measures 1 and 3, which have large effects and low effort, and postpone measure 4, which requires judgment regarding accuracy requirements, for later. For every measure, confirm the effect through actual measurement, and compare token counts before transitioning to fixed operation.

Summary

Summary

Token bloat in Lao is a structural phenomenon arising from the combination of a writing system that places no spaces between words and biases in the tokenizer's training data. The starting point for reduction was to measure the actual token consumption under the pricing structure of the model in use and establish a baseline value.

On that basis, redundant preambles and overlapping conditions in prompts should be trimmed, and fixed portions should be unified as a system prompt to be made subject to cache reads. In request design, output schemas should be used to prevent bloat from free-form writing, and long histories should be compressed into the input context through summarization or search-based extraction. Furthermore, by allocating tasks between lightweight models and high-performance models according to each task's accuracy requirements, and consolidating processing that does not require immediate responses into batch processing, the bloat specific to Lao can be curbed from both the unit price and the number of submissions.

Judging to process directly without going through translation, or operating in a way that neglects templating and sends long text every time, are typical failures that offset these effects, making actual measurement comparisons across methods indispensable. Start by selecting one instruction text that your company uses routinely, and begin by measuring its token count.

References

  1. developers.openai.com/ja-JP/api/docs/pricingAccessed November 27, 2026
  2. developers.openai.com/api/docs/guides/prompt-cachingAccessed November 27, 2026
  3. help-lb.openai.com/ja-jp/articles/4936856-understanding-and-counting-tokensAccessed November 27, 2026
  4. developers.openai.com/api/reference/resources/responses/methods/createAccessed November 27, 2026
  5. developers.openai.com/api/docs/guides/structured-outputsAccessed November 27, 2026
  6. developers.openai.com/api/reference/resources/vector_stores/methods/searchAccessed November 27, 2026
  7. cdn.openai.com/pdf/37dce0c6-b190-4cf6-b6b9-2651fe6af98a/エージェント構築実践ガイド.pdfAccessed November 27, 2026
  8. developers.openai.com/api/docs/guides/batchAccessed November 27, 2026
  9. developers.openai.com/api/docs/pricingAccessed November 27, 2026
  10. developers.openai.com/ja-JP/docs/pricingAccessed November 27, 2026
  11. developers.openai.com/api/docs/guides/prompt-cachingAccessed November 27, 2026
  12. developers.openai.com/api/docs/guides/advanced-usageAccessed November 27, 2026
  13. www.chusho.meti.go.jp/pamflet/hakusyo/2024/PDF/chusho/03Hakusyo_part1_chap4_web…Accessed November 27, 2026
  14. developers.openai.com/api/docs/guides/latest-modelAccessed November 27, 2026

Author & Supervisor

Chi

Chi

Majored in Information Science at the National University of Laos, where he contributed to the development of statistical software, building a practical foundation in data analysis and programming. He began his career in web and application development in 2021, and from 2023 onward gained extensive hands-on experience across both frontend and backend domains. At our company, he is responsible for the design and development of AI-powered web services, and is involved in projects that integrate natural language processing (NLP), machine learning, and generative AI and large language models (LLMs) into business systems. He has a voracious appetite for keeping up with the latest technologies and places great value on moving swiftly from technical validation to production implementation.