AI Made Friendly HERE

Modern Prompt Engineering: Linguistics for Mastering AI|津本海🥦AIエージェント開発|スニフアウト

Recently, autonomous AI agents such as Claude Code and Codex have become a hot topic, and prompt engineering, which used to receive so much attention, is no longer talked about as much.

In fact, generative AI models themselves have become quite intelligent, and there is less need to worry about the fine details of how to write prompts when using the latest models. As a result, some whisper that the prompt engineering of the past is unnecessary, and it is often thought to be no longer that important.

Nevertheless, there is a significant difference in phrasing and communication between those who are good at giving instructions to AI and those who are not. Unlike the prompt engineering of the days when generative AI was still immature, the points to be aware of in modern prompt engineering have changed significantly. I would like to explain those points this time.

Is the prompt engineering of the past unnecessary?

First, I would like to talk about how the prompt engineering of the past has become unnecessary. Previously, the so-called “way of writing” was important.

It was common to see instructions like “write in Markdown format“, but even if you don’t use Markdown, LLMs are now in a situation where they can interpret text as long as it conveys meaning normally.

Also, there was a prompt engineering technique called Zero-shot CoT, which suggested that inputting the keyword “think step-by-step” would produce better output. However, recent reasoning models act by thinking for themselves before outputting, even without being told to do so during the thought process. OpenAI’s official guide also explains that such instructions for reasoning models are unnecessary. [OpenAI Official Guide]

Role prompting, which suggested giving the AI a role, was also a topic. This, too, has evolved so that even if you don’t write “you are a professional X,” the AI will provide answers suitable for the job as long as you convey the situation and what you want it to do.

There was also talk of Few-shot prompting, where you “provide a few examples,” but recently, there are more situations where you can get good output without providing examples, as long as you correctly convey the process and criteria. In fact, if you provide half-baked or biased examples, you have to be careful because the AI might be pulled by that bias.

Of course, examples are still useful for maintaining a unique writing style or output format. However, it is no longer the case that these “writing” techniques must be used every single time.

Considering these things, the necessity of the old-school prompt engineering that focused on the so-called “way of writing” has faded considerably.

So, what should we be conscious of now? From here on, I will write about that point.

Eliminating the Knowledge Gap

The most important thing is to eliminate the “knowledge gap“.

This knowledge gap refers to a state where there is a lot of information that the AI originally needs to complete a task, but that information has not been passed to the AI.

In many cases, the instructions written in the prompt or the information available in the searchable area when working with tools like Claude Code do not contain enough of the necessary information.

画像

For example, even when creating a single document, a veteran who is good at document creation refers to various pieces of information.

  • Past knowledge and tacit knowledge such as “I made a document with this design before”

  • The sense that “this diagram is best for conveying this message”

  • The location of customer information and past internal data

  • The intention or scheme of “this requester would be happy with this kind of output”

Originally, countless pieces of information such as memories and tacit knowledge that people refer to are not accessible to AI. This is one of the major reasons why the LLM does not produce the expected output even though it is already smart.

To get AI to do a good job, it is more important than anything else to provide it with the information necessary to complete the task. Rather than worrying about how to write prompts, you should ensure that the truly necessary information is sufficiently covered and in a state that the AI can reference, and then provide it properly.

For example, at my company, when a meeting is held, the minutes are automatically saved to a directory that Claude Code can access. It is a mechanism where the AI automatically proceeds with work while checking the contents of past meetings when performing related tasks.

If you try to write all the past history in a prompt every time you make a request, you will end up writing prompts every time. The idea is to make all the necessary information accessible to the AI when needed.

In this way, reducing the knowledge gap is one major point.

Eliminating the Modality Gap

Another point is the discussion of eliminating the “modality gap“. Modality is a term that represents the types of information, such as text, images, video, and audio.

Humans perceive diverse information, but when giving instructions to AI, they try to explain it in language.

For example, an image has a vast amount of information such as “number of pixels x number of pixels x RGB”. It should be difficult to perfectly reproduce the colors, composition, and texture that a person receives when looking at a painting using only words.

Or rather, it is theoretically impossible.

The same applies to audio and video; the very act of a person giving instructions in words has a limit to the amount of information that can be explained in language in the first place.

If you try to force information captured by sight or hearing into text, the information decreases because the type of information changes.

The “modality gap” referred to in this article points to this loss of information. When performing modality conversion, that is, changing the form of information representation, such loss of information occurs very frequently.

画像

Therefore, when giving firm instructions, it is important to include information that should be conveyed visually as an image, or to pass video or audio as is. Modern multimodal AI can handle such information directly.

In fact, a feature that reflects this way of thinking is “Record a skill” in Claude Cowork. This feature records a screen capture of a business process along with explanatory audio, which the AI then analyzes to create Skills. You can check the content before saving it. [Claude Official Help]

When creating a skill, if you try to explain it in text, information loss will occur. However, if you pass it as is in a video format that includes both audio and image information, you can suppress the loss of information that occurs during the process of a person putting it into text.

For example, you can convey where you clicked on the screen, and explain “why you chose that item” with audio. You can pass the operation and the judgment behind it together.

Controlling AI Discretion with Abstraction Levels

And next, what must be kept in mind as prompt engineering is controlling the AI’s discretion through the balance of abstraction levels.

What I mean is, when giving instructions, for things that are specifically decided, such as ‘I want this text and this design,’ it is important to convey them in specific detail so that your intent is communicated correctly and there is no room for interpretation.

On the other hand, for things you want the AI to think about or areas where you want to delegate decision-making, give instructions using highly abstract language. For example, things like the following:

  • The design isn’t specifically decided, but I want you to cover this information

  • I have a bulleted list of information I want to convey, but the procedure or logic for how to present it isn’t decided

For these undecided things, if you intentionally choose abstract words to give instructions, the AI will think about it and provide an output accordingly.

In other words, the higher the level of abstraction of the words used in the prompt, the more discretion you give the AI. It means conveying what you want to achieve, but not deciding the methods for doing so in too much detail.

画像

By controlling this balance between the concrete and the abstract in your word choice, you can control the AI by deciding ‘which parts to give discretion to, and which parts to have it follow instructions blindly without discretion’.

For example, when creating a document.

Please make the title ‘Next Term’s Sales Policy.’ Please use the attached sales figures and product names as they are. Since the design is not decided, please think about the structure and diagrams so that the Sales Manager can easily judge the priority of the measures.

I am giving specific instructions regarding the title and figures. On the other hand, regarding the structure and diagrams, I am only conveying the goal of making it easy to judge, giving the AI discretion.

The same applies when writing text.

Please include all the information in the bullet points below in the article. Without changing the argument, please write it so that someone who has just started using generative AI for work can understand it. I leave it to you to decide the order of explanation and what specific examples to use.

This is an instruction to keep the information to be included and the argument fixed, while having the AI think about the order of explanation and specific examples.

Conversely, if the text itself is already decided, you convey it like this.

Please use the following text as is, without paraphrasing. Please adjust only the way headings are added and where paragraphs are divided to make it easy to read.

In this case, I have not given it the discretion to paraphrase the main text. However, I have left the headings and paragraph divisions to the AI.

Even for the same request to ‘write an article,’ you change the words you use depending on how much is already decided.

Well-defined word choice

And finally, what is important is to choose well-defined vocabulary that does not leave room for unnecessary interpretation. In other words, it means choosing words with clearly defined meanings within that request.

This ‘well-defined’ concept is something to be mindful of when writing papers and the like.

AI interprets instructions literally, following the words we use. Therefore, if a prompt provided by a human leaves room for interpretation or allows for alternative meanings, the AI will generate output based on that interpretation.

For example, when we say “kiso” (foundation/basics) in Japanese, it often brings to mind something “simple.” However, its English translation, “fundamental,” does not inherently mean “simple.” It carries the meaning of an essential base required to understand something.

There are cases where university textbooks are titled “Fundamentals of…” but the content is extremely difficult. This happens because the English term “Fundamentals of…” is being forced into a Japanese translation.

Because of this, if you simply tell an AI to “explain from the basics,” it becomes ambiguous whether you are asking for a simple explanation that a beginner can understand, or if you want to understand the fundamental principles, even if they are difficult.

If you want a simple explanation, you should say, “Please explain the basics using familiar examples and defining technical terms so that someone learning this field for the first time can understand.” On the other hand, if you want to understand the principles in a fundamental way, you should say, “Please explain the essential principles required to understand this field, without omitting necessary mathematical formulas.”

画像

As shown, words always have a certain amount of room for interpretation. Eliminating that room and carefully choosing words so that your intent is conveyed clearly leads to giving instructions that convey meaning to the AI as accurately as possible.

Accurately understanding and selectively using the meaning and nuance of each individual word is extremely important in modern prompt engineering.

Originally Appeared Here

You May Also Like

About the Author:

Early Bird