Search Everything in One Place

Explore the web, images, videos, news, and more – all in one place.

News

The AI era: Designing prompts and tools to support scenario writers

©Cygames
©Cygames

Cygames held a session at CEDEC 2026 today (the 23rd) regarding the integration of AI in the game industry, specifically focusing on scenario writing. The speaker, engineer Hiroshi Tatefuku, joined Cygames in 2018 and has been a key expert in identifying the potential of AI since late 2019, working to integrate it into internal processes. Having pr...

Cygames held a session at CEDEC 2026 today (the 23rd) regarding the integration of AI in the game industry, specifically focusing on scenario writing. The speaker, engineer Hiroshi Tatefuku, joined Cygames in 2018 and has been a key expert in identifying the potential of AI since late 2019, working to integrate it into internal processes. Having previously presented at CEDEC 2024 on 'Flexible and Efficient Internal Resource Search Using AI' and at CEDEC 2025 on 'Supporting In-Game Dialogue Scripting with Large Language Models,' he took the stage this time to discuss how AI can assist scenario writers in the writing and review process.

Reviewing Scenario and Character Settings: Referencing Only Essential Information

©Cygames
©Cygames

Tatefuku recalled that when he first began introducing AI internally several years ago, a project team requested AI support for scenario writing. The reason was simple: as the game had been running for a long time, the number of characters had grown, and the details scenario writers needed to track had increased significantly. Furthermore, the sheer volume of text required placed a heavy burden on writers, leading to bottlenecks in the development process. This prompted a re-evaluation of their workflow to find improvements.

Cygames uses its proprietary scenario writing tool, 'Goehon,' across almost all projects, allowing them to enhance the tool's functionality by integrating AI. Beyond this, they determined that independent AI tools could also be utilized, and they have been using 'Dify' for prototype development and operations. Dify is an orchestration platform that allows for the creation of AI apps using no-code/low-code methods, enabling the design of AI agents and RAG pipelines connected to large LLMs and data. Given its current popularity in Japan, it also offered high accessibility.

©Cygames
©Cygames

Tatefuku outlined five major tasks related to scenario work: a tool to check for contradictions between scenarios and character settings; techniques to ensure AI accurately identifies and checks specific requirements; a tool to assist in writing dialogue for characters with unique speech patterns; a dialect review tool; and a typo detection tool. Finally, he introduced common situations encountered when developing AI apps with Dify and strategies to resolve or avoid them.

The reason for creating a tool to check for contradictions between scenarios and character settings was straightforward: the number of items to check had grown exponentially, making it difficult for human staff to handle quickly. While one might typically think of pasting character settings and scenarios into a prompt to check for issues, the manual process of copying, pasting, and managing these tasks was cumbersome and difficult to maintain.

Consequently, his development and operations support team designed a system where a scenario writer can input a scenario ID into the writing tool to immediately check for contradictions between the character settings and the scenario. While the fundamental method—inputting the scenario and character settings into a prompt for the AI to analyze—remains the same, the ability to call up previously worked-on lists and settings via IDs makes the process much easier to use and manage.

©Cygames
©Cygames

However, because existing work materials were not designed with AI in mind, improvements were necessary. The accumulated character information contained a vast amount of data intended for human reference, much of which was unnecessary for AI. The format was also HTML, which was too large to fit within the input limits of the models being used. Therefore, they extracted only the necessary information into a text format.

While some of the latest models can handle prompts exceeding 700k characters, longer prompts increase AI processing time, leading to slower response times. Furthermore, AI costs scale with the number of input characters, so longer prompts increase expenses. Additionally, long prompts introduce noise, which can lead to inaccurate AI responses. Therefore, prompts must be kept as short and clear as possible, avoiding unnecessary information.

Moving away from manually inputting settings and scenarios for every review ©Cygames
Moving away from manually inputting settings and scenarios for every review ©Cygames

The goal was to enable easy reviews by using IDs ©Cygames
The goal was to enable easy reviews by using IDs ©Cygames

To achieve this, they organized character profile items into a table format and extracted only the necessary information, trimming overly long sections. Rather than extracting this directly via a program, they saved Confluence pages as HTML, removed unnecessary parts using Python's BeautifulSoup module, and then used ChatGPT to extract only the required items. Tatefuku advised that since the task of identifying necessary items is simple, it is acceptable for the prompt to be slightly longer.

Since Cygames' character setting items were fixed across all characters, they standardized the format and used JSON to output results categorized by item. When using these in prompts, they converted the JSON to plain text, extracting only the required information to maximize model performance.

After creating this new format, they built a prototype using Dify. As mentioned, when a scenario ID is entered into the writing tool, Python code calls the tool's API to read the scenario. It then pulls the character list and settings as text, and the process of checking for contradictions begins by feeding both the scenario and character settings into the prompt. While the prototype was well-received by scenario writers, there were concerns that it might be too strict, potentially undermining the narrative flow and entertainment value. He explained that because the prototype was tested on completed scenarios, the prompt was set to be strict, and adjustments like standard checks were made later.

Shorter, clearer prompts lead to faster and more accurate responses ©Cygames
Shorter, clearer prompts lead to faster and more accurate responses ©Cygames

Existing character setting items were also cleaned up ©Cygames
Existing character setting items were also cleaned up ©Cygames

Reviews are now conducted by calling up ID-based scenarios and character lists/settings and applying them directly to the prompt ©Cygames
Reviews are now conducted by calling up ID-based scenarios and character lists/settings and applying them directly to the prompt ©Cygames

Unique speech patterns are also supported through character settings, word lists, and past history references

Even in subculture, there's always that 'chuunibyou' character who calls rain 'tears of the heavens' ©INVEN
Even in subculture, there's always that 'chuunibyou' character who calls rain 'tears of the heavens' ©INVEN

The next tool was designed to assist in writing dialogue for characters with unique speech patterns. In the Japanese subculture scene, many characters use not only specific speech patterns but also highly idiosyncratic vocabulary to express their personality. This often caused difficulties for new scenario writers or those suddenly assigned to a story featuring a character they hadn't worked with before.

Tatefuku initially considered a tool that would convert dialogue into the character's specific speech pattern, but writers requested that the AI instead support the selection of unique words the character would use. In reality, characters with unique speech patterns in Japanese subculture have their own vocabulary lists, which writers had already organized on Confluence as sets of words and meanings. However, since these lists contained about 1k words per character, searching through them manually on Confluence was difficult.

While usage examples for such characters were organized, the sheer volume made manual searching cumbersome ©Cygames
While usage examples for such characters were organized, the sheer volume made manual searching cumbersome ©Cygames

They created a tool that suggests appropriate word candidates for each phrase when a writer inputs the dialogue they want to write. Instead of converting the entire line of dialogue, the tool was designed to suggest five potential word candidates. To achieve this, they included a large volume of past dialogue and word lists in the prompt, allowing the AI to understand how the character uses words by comparing the data. The tool then identifies candidates from the list and outputs five options for each phrase in the input dialogue.

Tatefuku built this tool using Dify, setting strict prompts to ensure the AI only cites words from the provided list. This prevented the AI from inventing words and ensured the desired output. After the prototype was created, writers used it directly and provided feedback, asking for sources to be included so they could verify if the words were actually in the list. There was also a request to pull data directly from the scenario writing tool, as copying dialogue line by line was difficult. He explained that they exported the entire word list to ensure sources could be verified, and that the request to pull from the writing tool would be addressed in a version update, as Dify is capable of calling the writing tool's API.

The tool was implemented to output word candidates for a character when a writer inputs a standard sentence ©Cygames
The tool was implemented to output word candidates for a character when a writer inputs a standard sentence ©Cygames

AI dialect and typo review is highly effective; the key is context and task classification

Previously, dialect review was handled manually by writers from those regions ©Cygames
Previously, dialect review was handled manually by writers from those regions ©Cygames

The next requirement was a dialect review tool. Previously, dialect checks were handled by writers from the relevant region via Slack, which only happened once or twice a week and frequently caused bottlenecks. After researching various papers, they tested how well GPT-4o could cover dialects. While it covers most regional dialects in Japan beyond just Kansai-ben, that was insufficient because dialect review needed to account for character personality.

Theoretically, dialect review tailored to a character could be performed by including character-specific dialect information in the prompt. The key was determining what data to use. The development support team collected past dialogue from characters in already-released scenarios in addition to character settings and included them in the prompt. This made it easier to understand the context and explain why certain expressions were chosen.

Even within the same regional dialect, speech varies based on the speaker's personality ©Cygames
Even within the same regional dialect, speech varies based on the speaker's personality ©Cygames

Conversion reflecting those characteristics was necessary ©Cygames
Conversion reflecting those characteristics was necessary ©Cygames

The dialect review prompt was composed of four parts: output content and format, the dialogue to be written, 200 lines of past dialogue, and character settings. When input into the Dify tool, it outputs review results, providing different results for the same dialect based on the character's personality and explaining the reasoning behind the expressions. After testing, they enabled the tool to pull character names and dialogue directly from Confluence, feeding everything into the prompt and calling GPT-4o for the final review.

Using already-released scenarios and... ©Cygames
Using already-released scenarios and... ©Cygames

©Cygames
©Cygames

©Cygames
©Cygames

The final requirement was a typo detection tool. Cygames previously used a model called BERT, but it began to face issues with detection precision. In 2025, they began rebuilding it using new AI. The focus was on detecting not just general typos, but also issues like missing 'ra' (ra-nuki), missing 'i' (i-nuki), excessive 'sa' (sa-ire), kanji usage in auxiliary verbs, and readings not found in the Joyo Kanji table (hyogai-doku).

The typo detection tool was designed to analyze the scenario when a button is pressed in the writing tool and display the results in a separate window. To increase precision, it was built to call the AI separately for different types of checks. In particular, detecting readings not in the Joyo Kanji table required multiple passes. The results were then aggregated and displayed.

The previous typo detection tool used an older model, so they applied a new AI model ©Cygames
The previous typo detection tool used an older model, so they applied a new AI model ©Cygames

Meanwhile, typo detection also needed to consider character personality rather than just mechanical checking. They included about 10 lines of past dialogue and excluded characters like extras or those without past dialogue. In Japan, 'kaiteiru' (writing) is often shortened to 'kaiteru' by omitting the 'i'. While this isn't technically wrong, writers requested the ability to check and use it according to the situation. They set the AI to detect three cases and have been refining the prompt to specify the procedure in detail.

Another feature was detecting cases where auxiliary verbs are written in kanji. For example, in 'tabete miru' (try eating), 'miru' is an auxiliary verb. Due to the nature of Japanese typing, where one inputs the phonetic sound and converts it, kanji is sometimes inserted mechanically. In other cases, a verb might be treated as an auxiliary verb depending on the context. These aspects are currently being adjusted through various test cases.

Fine-tuning details like kanji usage in auxiliary verbs is ongoing based on feedback ©Cygames
Fine-tuning details like kanji usage in auxiliary verbs is ongoing based on feedback ©Cygames

Another task was checking for unusual kanji readings. First, they added furigana to indicate readings, checked if those readings were in the Joyo Kanji table, and flagged them if they were not. They used the latest AI to add furigana to all kanji and prepared several test examples with the help of proofreaders. They listed all possible readings for each kanji, had the AI select the appropriate one for the context, and checked the AI's capabilities. They also tested whether it could correctly read difficult sentences, breaking down the tasks of kanji knowledge and context understanding to assess model performance. Once deemed feasible, they tested it with Dify, but due to the complexity, they opted to output the results to Excel rather than using a Dify workflow.

To handle unusual kanji readings, they first had the AI check all kanji readings ©Cygames
To handle unusual kanji readings, they first had the AI check all kanji readings ©Cygames

By separating knowledge from application, they assessed model performance before building the tool in Dify ©Cygames
By separating knowledge from application, they assessed model performance before building the tool in Dify ©Cygames

The resulting typo review tool was built on AWS alongside the scenario writing tool, allowing for immediate execution and result checking. Initially, it displayed all detailed information, but following feedback about excessive noise, it was adjusted to show only detected issues and suggested corrections based on context. There was also feedback regarding the need to check if a writer intentionally used stylistic or rhetorical expressions, or if exceptional cases for kanji readings were applied. He explained that they are currently brainstorming improvements for this.

Implemented on AWS after writers requested the ability to pull data from the scenario tool ©Cygames
Implemented on AWS after writers requested the ability to pull data from the scenario tool ©Cygames

Key Points: Shortening Prompts, Data, and Dify Usage

©Cygames
©Cygames

Finally, he offered advice regarding Dify. Dify uses a 'knowledge' function to reference text, where multiple sentences are registered and searched during workflow execution. However, API errors often make keyword registration via API difficult, and transferring built knowledge to other Dify environments is impossible. Using software other than Dify would increase the effort required for app deployment.

To solve this, they hardcoded the reference sentences into Python code. The function receives the character name as an argument and returns the corresponding sentence. While this is cumbersome during initial setup, it is convenient once built because it can be processed within Dify and makes tool deployment easier.

Hardcoding into Python code to resolve Dify-specific issues ©Cygames
Hardcoding into Python code to resolve Dify-specific issues ©Cygames

Utilizing Microsoft Entra ID's Application Proxy for security ©Cygames
Utilizing Microsoft Entra ID's Application Proxy for security ©Cygames

Meanwhile, security measures to restrict access to Dify apps were also necessary. While this was easy in the cloud version of Dify, using it to call internal APIs posed a risk of external exposure. Hosting on AWS was cumbersome to manage. Therefore, they limited access at the infrastructure level using Microsoft Entra ID's Application Proxy.

Tatefuku and the Cygames development support team have been working through this process to set up AI tools and prompts for scenario writers, and they continue to strive for higher levels of perfection. He emphasized that the most important aspects are keeping prompts short and filled only with essential information to save time and costs while improving quality; analyzing the AI's role to gather optimal data; and mastering how to reference tests and set restrictions in Dify workflows. He concluded by saying, "I hope this helps support scenario writers with AI to create the best possible scenarios."

©Cygames
©Cygames

Read full story on Inven Global

Related News

More stories you might be interested in.

Exclusive - Marco Rubio tells diplomats to play down talk of American tech 'kill switch'
Reuters·23 hours ago

Exclusive - Marco Rubio tells diplomats to play down talk of American tech 'kill switch'

By Raphael Satter WASHINGTON, July 22 (Reuters) - U.S. Secretary of State Marco Rubio has asked diplomats to push back against talk of a "kill switch" in American technology products following the White House's short-lived decision to keep foreigners from America's most advanced AI models, according to a recent cable reviewed by Reuters. The talking points, which were circulated worldwide, show

Top