Stop 12 · Prompt EngineeringProjects · 1/2

AI Writing Assistant

Part of the AI Engineer Roadmap

In short

Build a tool that helps people rewrite emails, SOPs or captions in the tone they want. It's a great first LLM project because it uses system prompts, templates, streaming and a simple UI together.

A tool that helps users draft, edit or rewrite text with an LLM — a practical project that exercises prompt design, streaming responses and a real UI.

The blob works on a paper draft while a small friendly robot points at a line and offers a pencil.

Think of it like this

The helpful senior

Before you send that cover letter, you show it to a senior who's good with words. She doesn't write it for you. She tightens sentences, fixes tone and asks 'what did you actually mean here?' Your writing assistant should be that senior, not a ghost-writer.

Watch it happen

Build plan

UI
Prompts
LLM call
Stream
Test set

1/5A simple page: text box, tone dropdown (formal, friendly, concise) and a Rewrite button.

The big ideas

What you need to know

Tone and length controls

Dropdowns for tone and length make prompts predictable and the tool easy to use.

Show a diff

Highlight what changed so users learn and can reject edits they don't like.

Keep meaning

Tell the model not to add facts, numbers or claims that weren't in the original.

Protect the API key

Call the model from your backend. Never put the key in frontend JavaScript.

See it in code

Walk through the code

python
1SYSTEM = ("You are a writing coach. Improve clarity and tone. "2          "Never add facts, numbers or claims not in the original text.")3 4TEMPLATES = {5    "rewrite": "Rewrite the text in a {tone} tone. Keep it under {words} words.",6    "shorten": "Shorten the text to about half its length. Keep the key points.",7    "grammar": "Fix grammar and spelling only. Do not change the wording otherwise.",8}9 10def build(action, text, tone="friendly", words=150):11    instruction = TEMPLATES[action].format(tone=tone, words=words)12    return [13        {"role": "system", "content": SYSTEM},14        {"role": "user", "content": f"{instruction}\n<text>{text}</text>"},15    ]

1/3The system prompt sets the role and the most important rule: don't invent content.

The core of the app: one system prompt, one template per button, and a function that builds the messages.

Save yourself the pain

Common mistakes

Oops

Letting the assistant 'improve' text by adding achievements the user never had.

Do this instead

Forbid new facts in the system prompt and test with resumes and SOPs to make sure it holds.

Oops

Calling the model directly from the browser with your API key.

Do this instead

Route calls through a small backend endpoint, and add basic rate limiting.

Your mission

First milestone: one button works

~45 min

Quick check

Why should your writing assistant's API key live on the server, not in the frontend?

Go deeper

  1. 1Build a small app with editing modes (shorten, formalize, fix grammar) as distinct prompts.
  2. 2Stream the model's response to the UI instead of waiting for the full output.
  3. 3Add a system prompt that keeps the assistant's tone consistent across modes.

More projects at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge