EDITORCLASSBLOGLOGINOpkleOpkle, the Editor for CreatorsInfiniteExpression,In New Forms.New ContentOpkle makes an editor so anyone can build for the web without code, and share it anywhere.Blending text and screen, we build tools that make the web about imagination, not code.Building Opkle Editor: The First Build Was a Code Editordev2Building Opkle Editor: The Preview Became a Second Editordev3Building Opkle Editor: Editing Media Queries Toodev4Building Opkle Editor: Absorbing Video with CSS Animationdev5Building Opkle Editor: Designing an LLM for Making Booksdev6910111213...6 Building Opkle Editor: Designing an LLM for Making Books

With media queries, image variants, CSS animation and even image-sequence video in place, Opkle Editor was moving beyond a simple EPUB production tool toward a multimedia publishing environment. Once paragraphs, images, tables, animation and video can all be handled inside one EPUB, creators have more decisions to make. Which voice to keep, how to connect the flow of scenes, at what density images and sentences should meet, whether the tone of the whole book holds steady to the end: they have to keep judging all of it.

At this point I felt an AI helper was absolutely necessary. But bolting an ordinary chatbot next to the editor wasn't enough. An LLM for making books can't answer by looking only at one selected paragraph. It has to understand the whole chapter, the rhythm of the previous chapter, setups that will pay off later, genre-specific style, expressions the author has banned, the target readership and the full synopsis. So the AI feature couldn't be a simple API call; it had to be a separate system that projects the editor's document state into inference input.

The criteria were clear from the start. It had to handle long contexts reliably and keep the flow of a long Korean manuscript. The model's range of operation had to be pinned down by genre, style, theme, worldbuilding, prohibitions, output format and editing standards. On top of that, it needed training data and evaluation data. The LLM going into Opkle Editor had to be not a sentence generator but a long-form editing engine that maintains a book's structure, style and world.

Long-context capacity

A book is hard to handle with short inputs and short outputs. The style of one chapter connects to the rhythm of the previous one, and sentences in the second half must pick up the setups from the first. In informational writing, terms and standards set early have to hold later, and in fiction, characters' speech, their relationships and the rules of the world must stay alive throughout. So the first thing I looked at among the model conditions was the context window.

That is why I made long-context capacity a criterion. A model that answers by looking at only part of a manuscript can produce sentences quickly, but it's hard for it to take responsibility for the whole book. If it can't remember which expressions were avoided earlier, which concepts were already explained and how each character has been speaking, the results wobble. Inside the editor, the selected passage, the surrounding context, chapter-level information, a compressed book summary, style criteria and the task instructions all had to fit in at once.

What mattered here wasn't simply pushing a long string into the model. It was a question of how to arrange information within a finite context budget. In information-theoretic terms, what the model actually uses is not the whole input but the part where attention stays alive. The selected passage goes in with the highest priority, nearby context goes in as local information, and the chapter and book summaries go in as compressed representations. Fixed instructions sit in their own section, and if needed, part of the trace of recent edits is attached.

So an AI call became not a single line of prompt but an assembly of information bundles with different roles. The inference layer arranges these bundles in an order the model can understand reliably. A long context is not performance in itself; it turns into editing accuracy only when it is packed well. Even with large capacity, if the arrangement is poor, attention easily blurs.

Constraint layers

To use an LLM for book production, the structure of the instructions matters. A generic “fix it so it reads naturally” isn't enough. What genre it is, what the style is like, how much explanation the reader may be given, whether the prose should be dry or lyrical, and which expressions must never be used all have to be injected into the model continuously.

I didn't see the system prompt as just one long sentence. I saw it as constraint layers that partition the set of things the model is allowed to do: the basic role, genre rules, style conditions, worldbuilding and forbidden developments, and the purpose of the current task. Each layer applies a constraint along a different axis, and combined they form the feasible region in which the model can move.

Dividing it this way makes assembly stable. A novel and a technical document can share the same basic role, with only the genre, style and worldbuilding layers swapped. In an essay it keeps the writer's distance and voice, in informational writing it prioritizes evidence and consistent terminology, and in fiction it prioritizes character speech and scene continuity. It's not replacing the whole set of constraints at once, but swapping them axis by axis.

The system prompt was not a shackle binding the model but a device for setting the boundaries of inference. It is the standard that keeps the model from arbitrarily changing genre, suddenly sounding like advertising copy, or inventing settings outside the world. Because this constraint layer goes in every time AI is called inside the editor, users get not a simple chatbot but an editing engine that understands the rules of their own book.

Supervised editorial mapping

To build a model tailored to book production, the training data also had to be different. General question-answering or short-form writing data alone isn't enough. The model had to learn why a good book is good, which style suits which genre, which structure carries a reader to the very end, which sentences are excessive and which omissions are effective.

So I gathered well-written books and analyzed why they are well regarded. I didn't simply collect sentences; I looked separately at chapter composition, openings, sentence rhythm, scene transitions, characters' speech, repetition and variation of themes, density of explanation and reader experience. A good book isn't made by chance from a few good sentences; it is the result of structure, style and reader experience fitting together consistently.

This analysis had to be turned into supervised samples. A single sample needs to contain together what is being asked, what is being looked at to make the fix, which book context is seen alongside, what the desirable result is, and why it was fixed that way. That's because editing isn't a plain copy from input to output but a mapping that includes judgment. If there is only the revised text and no rationale, the model easily mimics only the surface tone.

Quality matters most, but quantity matters too. If Korean long-form writing data is narrow, the model easily tilts toward a particular style, or makes every text into similarly flat sentences. So I had to accumulate enough samples that differ in genre, readership, intensity of style, narrative distance, information density and proportion of dialogue. If the distribution is narrow, the learned function is stable only in a narrow region. Only with this data does the direction of “an LLM for making books” come down into an actual training signal.

Feature space of good writing

What mattered in the training data wasn't only explanations that read well to people. I needed a representation that the model and the pipeline could use repeatedly with the same standard. So I didn't leave the analysis results as free-form notes but organized them into consistent structured signals. If evaluation criteria are written differently for every book, it wobbles when converting into training samples, and comparison becomes hard when building an evaluation set later.

The core of the structuring was separating meta information describing a work from style, structure, reader experience and editing judgments. Genre and readership, tone, narrative distance, sentence rhythm, vocabulary density, compositional patterns, scene transitions, character voices, world rules, strength of editing and patterns to avoid. Unless these axes are kept from blending into one lump of impressionistic review, it's impossible to trace what the model learned.

This representation was for training and inference at once. A style profile for a particular genre can be put into the constraint layer, and when a user wants to take some book's tone as a reference, that profile can be put in as a context asset. From the same structure I can build fine-tuning samples, evaluation prompts and the real-time AI input inside the editor. One analysis becomes a common coordinate system for several stages.

Unifying the data structure makes model development sturdier. You can check quality, find omissions per axis, and see whether the data is skewed toward a particular genre or style. It was the work of turning a sense of good writing from something left only as criticism people read into measurable features the model can read.

Korean long-form model

For an LLM for books, understanding long-form Korean was a separate criterion. Many models generate short sentences plausibly. But taking in a long manuscript, keeping the context before and after, holding genre and style steady, and even considering the reader's flow of understanding is on a completely different level. In Korean, the nuance at the end of a sentence, formal and informal speech levels, narrative distance, emotional restraint and the length of breath greatly change the quality of the result.

So in choosing a model I also prioritized long context and Korean comprehension. Even when given a long input it must not lose the setups from the beginning, and it must understand the role of a paragraph rather than just polishing the surface of sentences. In fiction it has to keep characters' speech and the temperature of scenes, in informational writing the flow of terms and evidence, and in essays the writer's distance and voice. Each kind of writing has different invariants to preserve.

On top of the base model, editing training signals and style instructions had to be layered. The base model handles long Korean reliably, and adjustments for the book-production task are added on top. Add the constraint layers and context packing, and the model isn't simply generating sentences; it is handling a selected passage within the structure of the entire book.

Evaluation also mattered in this structure. It isn't enough just to see whether the output reads naturally. The evaluation set has to be built from items like keeping genre, keeping style, keeping the world, reflecting context before and after, avoiding banned expressions, suppressing exaggerated generation and preserving Korean breathing rhythm. Model development doesn't end at training; it had to be measured repeatedly on whether it works reliably on real book-editing tasks.

State projection

For the AI helper to work properly, it has to be connected to the editor's document state. It needs to know which paragraph the user selected, which chapter that paragraph belongs to, what is around it, and what the genre and style criteria of the current book are. So an AI request became not a plain sentence but a context package built by pulling just the necessary coordinates from the document state.

The context builder's job isn't to copy the entire document as is but to project onto the subspace needed for this task: the original text of the selected passage, its chapter, close neighbors, compressed summaries of the chapter and the book, the style profile, the constraint layers, the purpose of this task and the expected output form. In a multimedia EPUB, descriptions of images, tables and animated sections can also be context, because text is not the only information.

Responses are also more stable if the change proposal and its application are separated, rather than overwriting the body directly. The model's output should keep “what to change,” “why that was judged,” and “what range will be touched” separate. Only when the user applies it are the document state and saved state updated together. AI editing too has to enter the existing document state and serialization flow.

Once this structure is in place, AI is not an external tool but an internal feature of the editor. Polishing sentences, suggesting structure, matching style, writing chapter summaries and checking overall consistency all run on the same document model. The LLM isn't a separate chat window but an inference layer that understands the selected state of the book.

Inference as composition

What was finally needed was an inference pipeline connecting the model, the data, the constraints and the editor state into one. When the user presses an AI feature, the editor reads the selection state, the context builder assembles the input, the constraint layers are attached, and the model returns a response in the agreed form. That response must be not text that straight away overwrites the screen but a transformation that can be applied to the document.

This transformation then goes back into Opkle Editor's existing structure. When the selected passage changes, the document state is updated, and the saved document representation and the editor state change together. If needed, the preview is redrawn too. Results made by AI have to pass through the same saving and review flow as results edited by hand. That way the AI feature doesn't become a special exception inside the editor.

As a result the structure was clearly completed. A model that handles long-form Korean, constraint layers that fix the rules of the book, training signals that split good writing into axes, evaluation criteria, projection of document state, structured output, and the flow of applying a document patch all meshed into one. The AI helper became not an independent sentence-generation feature but a layer of the book-production workflow.

This stage also came together successfully. Long manuscript context, genre and style constraints, structured analysis data, the cycle of training and evaluation, and integration with the editor's document state were connected into a single LLM system. Opkle Editor was now a tool for making multimedia EPUBs and at the same time had grown into an AI editing environment that manages a book's sentences, structure and worldbuilding together.

PreviousListNext
CopyrightAll design outputs and videos on this website are copyrighted by Abstract Cloud and protected under copyright law and related regulations. All content, including web, video, text, cover, and interior designs, is the property of the copyright holder. Unauthorized reproduction, distribution, creation of derivative works, or online sharing without prior consent is strictly prohibited. Violations may result in civil and criminal liability under copyright law. Legitimate purchases and copyright protection preserve creators' rights and fuel better works in return.Copyright: Abstract Cloud | CEO: Bae Changkyu
© Abstract Cloud. All Rights Reserved.
HOMEFAQTerms of ServicePrivacy PolicyRefund PolicySeller Informationhelp@opkle.app
+82 10-2747-3403
Business Name :Abstract Cloud  |  CEO :Bae ChangkyuBusiness Registration Number :249-74-00533E-commerce Registration Number :2025-Uijeongbu Songsan-0634Address :402, 108-dong, 49 Buyong-ro, Uijeongbu-si, Gyeonggi-do, Republic of KoreaAll content, designs, and source code on this website
are copyrighted by Opkle.
Opkle