System Prompts and Reasoning Effort: Two Configurable Settings for LLM Applications
This article explains two practical configuration levers for LLM applications: system prompts and reasoning effort. It covers how system prompts shape reusable roles and rules, what to include in them, how to manage them across sessions, and common pitfalls. It then explains reasoning effort tiers, how to match thinking depth to task complexity, and how to control cost and efficiency through measurement, context management, reuse, budgets, and staged rollout.
Background: Defaults May Not Fit Your Needs
LLM services usually provide a general set of default behaviors. These defaults target the broadest user base, aiming for wide coverage and stable performance. For specific engineering tasks, however, the defaults often do not fit well: responses may be too discursive, the reasoning process may be longer than necessary, and the same background may need to be repeated in every conversation.
Free quotas and rate-limit rules are determined by the service provider and may change with compute supply and business policy. Consult the provider’s announcements for specifics. When quota is limited, users can mainly control two things: make the instructions in each request more precise to reduce back-and-forth corrections, and allocate model reasoning only where it is needed to avoid paying unnecessary compute costs for simple questions.
The practices discussed in this article do not depend on a specific product. Their core is two general concepts: the system prompt and reasoning effort. Once you understand how they work, you can apply the same approach regardless of which model service or development tool you use.
1. System Prompts: Turning Roles and Rules into Reusable Files
1.1 How system prompts work
Most conversational model APIs divide messages into several roles. The system role describes the identity, rules, and output requirements the model should follow. The system prompt is placed before the user message in every request, so it continuously affects how the model responds rather than applying only to a single turn.
A common message structure looks like this (illustrative):
[{"role": "system", "content": "You are a senior C++ development engineer. Focus your answers on code and conclusions."},{"role": "user", "content": "Why does this memory allocation leak?"}]
This point is important. A system prompt is not a “reminder”; it is a front-loaded constraint for every inference. The clearer it is written, the more consistent the model’s behavior will be across different sessions.
1.2 What a good system prompt should contain
A practical system prompt usually covers the following five areas:
- Role definition: State the responsibility the model should play, such as backend engineer, game client developer, or test engineer. The more specific the role, the closer the terminology and judgment criteria will be to actual needs.
- Technology stack and environment: List language versions, frameworks, operating systems, dependencies, and similar information. This makes it more likely that code examples will be directly usable.
- Output style: Specify whether answers should lead with conclusions or proceed step by step, whether assumptions should be listed first, and whether short answers are preferred.
- Prohibitions and boundaries: Clearly state what is not allowed, such as inventing interface names. When uncertain, the model should explain and ask questions.
- Verification requirements: When code is requested, require test ideas or verification steps to reduce results that cannot run.
Below is an illustrative example:
# Project Assistant Settings## RoleYou are a C++ backend engineer familiar with C++17 and the CMake build system.## Environment- Compiler: GCC 11 or Clang 14- Build tool: CMake 3.20 or later- Code style: Follow the project's .clang-format configuration## Output Style- Give the conclusion first, then the rationale.- Show code changes as diffs and explain the impact scope.- Clearly mark uncertain interfaces or parameters as "needs verification"; do not guess.## Prohibitions- Do not output real keys or internal addresses in responses.- Do not introduce third-party dependencies that the project does not already use.
1.3 Project directories and multi-session reuse
Saving the system prompt as a text file in the project directory is a relatively reliable approach. Keeping the file in version control lets team members share the same conventions and provides a history of changes.
Under the same project, you can open multiple sessions to handle different work such as requirements analysis, code writing, and troubleshooting. Each session loads the same system prompt, keeping style and rules consistent. Some tools also support sharing part of the context or memory between sessions, but this capability depends on the specific tool. Before use, confirm where its data is stored and how it is cleaned up.
Privacy deserves special attention here. System prompts and session memory should not contain account passwords, access tokens, personal sensitive information, or unmasked business data. If configuration values must be referenced, inject them through environment variables or a secrets management service rather than writing them directly into text files.
1.4 Common pitfalls
- Writing too much: The system prompt consumes input tokens on every request. Excessive length not only increases cost but may also dilute key rules. Keep it within a few hundred words and retain only long-term conventions.
- Contradictory rules: For example, requiring both “keep answers as short as possible” and “provide a complete derivation for every conclusion.” Contradictory rules make model output unstable. Review them one by one after writing.
- Frequent changes: Every modification changes the behavior of all subsequent sessions. Stabilize the settings early in the project and then record adjustments by version.
- Using it for temporary requirements: Specific requirements for a single task should go in the user message. The system prompt should carry only long-term conventions.
2. Reasoning Effort: Choosing Thinking Depth by Task
2.1 What reasoning effort affects
Some models perform a period of internal reasoning before answering. Deeper reasoning usually improves accuracy on complex problems, but the tradeoff is also clear: increased response latency, higher compute resource consumption, and correspondingly higher billing or quota usage.
Reasoning effort lets users choose between “depth” and “speed and cost.” Higher is not always better; it should match task complexity.
2.2 Tier strategy
Below is a common tier strategy. The specific tier names and meanings should follow the documentation of the service you use.
| Tier | Suitable scenarios | Typical characteristics |
|---|---|---|
| Off or low | Translation, polishing, format conversion, simple Q&A, knowledge lookup | Fast response, low consumption, suitable for high-frequency calls |
| Medium | Single-function writing, routine code explanation, ordinary document organization | Balances speed and quality |
| High | Algorithm design, mathematical derivation, complex defect localization, multi-step solution review | Quality first, with higher latency and consumption |
2.3 Deciding whether deep reasoning is needed
Three questions can help you decide quickly:
- Does the task require multi-step derivation? For example, proofs or complexity analysis of complex algorithms. Only when multi-step derivation is needed is it worth raising the tier.
- Is the result easy to verify? If the output can be checked by compilation, tests, or a quick manual review, a low tier plus a verification step is usually more cost-effective than a high tier.
- Is the cost of an error high? For tasks involving funds, data security, or production incidents, choose a more reliable tier even if it consumes more.
In daily development, many tasks fall into the categories of “rewrite, lookup, and explain.” Using the highest tier for these tasks over the long term is often a waste of resources.
2.4 Configuration example
The following example shows how to bind task types to reasoning tiers. The field names are for illustration only and do not correspond to any specific interface:
# Illustrative: select reasoning tier by task typeTASK_REASONING_LEVEL = {"translate": "low","code_explain": "low","write_function": "medium","algorithm_design": "high","root_cause_analysis": "high",}def pick_level(task_type: str) -> str:# Use medium for unregistered task types to avoid excessive omission or consumptionreturn TASK_REASONING_LEVEL.get(task_type, "medium")def build_request(task_type: str, user_text: str, system_prompt: str) -> dict:return {"messages": [{"role": "system", "content": system_prompt},{"role": "user", "content": user_text},],"reasoning_level": pick_level(task_type),}
The advantage of this approach is that the policy is centralized and easy to adjust. Teams can put the mapping table in a configuration file and optimize it gradually based on actual usage data instead of making ad hoc judgments on every call.
3. Overall Cost and Efficiency Control
System prompts and reasoning effort are only two entry points. Complete cost control also requires the following practices.
3.1 Measurement and logging
Record first, then optimize. For each call, log the task type, input token count, output token count, reasoning tier, and latency. After one to two weeks of data, you can usually see which tasks account for most consumption and which tasks use unnecessarily high tiers.
3.2 Control context length
Long sessions continuously accumulate historical messages, and every request must resend that content. Common practices include:
- After a session exceeds a certain number of turns, compress earlier discussion into a summary and start a new session.
- Keep only file snippets relevant to the current question rather than the entire code repository.
- Preprocess long logs and extract only the key lines around errors.
3.3 Reuse and caching
For recurring questions, such as a standard library usage pattern or the common cause of a type of error, save verified answers in a knowledge base and retrieve them next time. This reduces the number of calls and avoids repeatedly consuming quota on the same question.
3.4 Budgets and alerts
If a team has a shared quota, set usage monitoring and alert thresholds. A common approach is to connect to a logging service or monitoring and alerting platform, summarize call volume daily, and notify the responsible person when a threshold is exceeded. Monitoring metrics can include daily call count, average token count, and the proportion of high-tier calls.
4. Rollout Steps
Proceeding in the following order minimizes risk and makes results easier to evaluate:
- Inventory task types: List five to ten typical categories of tasks for which the team uses LLMs daily.
- Write system prompts: Write one for each major role, keep it at a reasonable length, and place it in the project directory for version management.
- Define a reasoning tier table: Based on the three decision questions above, assign a default tier to each task type.
- Run a pilot and log data: Run for one to two weeks and collect usage and quality feedback.
- Adjust and formalize: Modify tier mappings and prompts based on the data, and form team conventions.
Each step should retain a rollback path. For example, if quality drops noticeably after a tier adjustment, you should be able to quickly restore the previous setting and record the task type that caused the problem.
5. Caveats
- Inconsistent style: When behavior varies significantly across sessions, first check whether the system prompt is loaded correctly, then check whether too much history is shared between sessions.
- Sudden cost increase: This is usually related to long context, misuse of high tiers, or runaway batch scripts. Set an input limit per request and add rate limits for batch tasks.
- Memory cross-talk: If memory is shared between sessions, separate data boundaries for different projects to avoid bringing internal information from Project A into answers for Project B.
- Result verification: Regardless of tier, content involving interfaces, parameters, or version numbers should be based on official documentation or actual runtime results. Models occasionally provide plausible names that do not exist.
Conclusion
The system prompt determines “in what role and by what rules the model speaks,” while reasoning effort determines “how much thought the model invests in a problem.” Used together, they can make daily work more stable and significantly reduce unnecessary consumption. The key is to turn experience into configuration that can be shared, modified, and measured, rather than relying on temporary verbal reminders each time.
