LongCut logo

I Fixed AI Document Formatting With One Claude Feature

By Dylan Davis

Summary

Topics Covered

  • AI struggles with consistent document formatting.
  • Build a custom AI for perfect document formatting.
  • Enhance prompts with AI for better AI outputs.
  • Reverse-engineer templates for pixel-perfect AI design.
  • Embed extracted designs into AI skills for consistency.

Full Transcript

AI document formatting has always been broken. You know the drill. The content

broken. You know the drill. The content

is fine, but your company's formatting, not so much. You have to copy from cloud or GPT, paste that into your document, and then fix everything manually. I

finally fixed this with one Cloud feature. It reverse engineers the exact

feature. It reverse engineers the exact design, and now every document that comes out of Claude is perfectly formatted. Let me show you how. All

formatted. Let me show you how. All

right, so as I mentioned, every single company has their own specific type of formatting. And it really doesn't matter

formatting. And it really doesn't matter what the document type is. It could be contracts. It could be proposals, SOPs,

contracts. It could be proposals, SOPs, meeting notes, etc. We all have our own way of doing things and often times we want to outsource some of this to AI.

But as I mentioned, it's not always that great at formatting. It can write things amazingly, but to make it match pixel for pixel to the formatting that we care about, it struggles. So, I'm going to walk you through two approaches. One is

the simple approach. The other one's more advanced. Luckily, they're both

more advanced. Luckily, they're both very straightforward to do. So, I

recommend most people do the advanced approach. And the advanced approach

approach. And the advanced approach actually builds on the simple approach.

Hence the reason we're going to start with a simple one. So the simple approach we need to start with the first thing which is a template. I'm sure many of you have this already. So this is going to be a template that's going to be an empty document that has all the

formatting that you need and want inside of whatever AI generates. So what I've done here is I've created a demo template just for this example to walk you through. So this is a template I've

you through. So this is a template I've created for an SOP document which is going to be our example. But like I mentioned you can do this for any type of document. And this is our format. So

of document. And this is our format. So

this is what we want the AI to produce.

This is empty, but it includes everything that should be included when it comes to the formatting, the styling, the fonts, etc. So, that's our starting point and that's where you should start as well. After you have your template,

as well. After you have your template, then the next thing we're going to do is we need to create our system prompt. So,

this is going to be a base prompt that I'll talk about more in a second. But

once we have this, we'll then get our output. That's the basic approach. So,

output. That's the basic approach. So,

let's move on to our prompt. Anytime I

recommend my clients to create a prompt, the base prompt they always create should include these three components.

We first start with the what. What do

you want the AI to do? You need to give it a task and a role. After you've done this, it's best to give it the intent.

So, why are you asking it to do anything in the first place? The reason I recommend my clients do this is often times there's a unspoken or subconscious intent behind why you're asking the AI

to do something. It usually can infer from that intent you provide to give it a better output at the end. So, always

include the intent and the why. And then

finally is the how. So, these are any additional constraints and context you would like to give the AI to ensure that it follows what you want it to do. In

this context, if I'm haven't have it writing something, I may want it to write at a fifth grade reading level, and I also want it to follow a specific type of format. Those are good constraints to include in your base prompt. Quick pause in your regular

prompt. Quick pause in your regular programming. This video is brought to

programming. This video is brought to you by me. So, two quick things. First

off, below is a 30-day AI insight series, completely free. You'll get 30 insights in your inbox how you can apply AI to your business and your work. The

second thing is if you'd like to work with me, blower a series of offerings to see if there's a good fit between the two of us. That being said, let's get back into the video. And here's an example based prompt that we're going to use for this uh specific walkthrough.

So, I'm going to zoom in here so you can see it. And you can see we've

see it. And you can see we've highlighted each of the segments that I just mentioned, the what, the how, and the why. So, at the very top here, this

the why. So, at the very top here, this is going to be the what. We're asking

the AI to do a very specific thing.

We're giving it a role saying you're an expert writer, and your job is to create SOPs for me. Right after the what, we have the why. So, I'm asking you to do this because of this reason. So I state that I'm a growing business and I need

assistance in delegating some tasks to the new people I hire. And then finally I give it the how. So these are some additional constraints I wanted to follow. So like I previously mentioned,

follow. So like I previously mentioned, I wanted to write at a fifth grade reading level. I want to make sure that

reading level. I want to make sure that the instructions are extremely clear so anybody can follow them. And I mentioned a few other things such as ensuring that the output is in a DOCX format which works with Word which I'm sure most of you are using Word right now at your

companies. And this is the basic prompt

companies. And this is the basic prompt we're going to start with the thing that we wrote ourselves. But after I write any basic prompt, when I'm trying to create something that's more re reusable and durable, I always improve it. So the

next part is we're going to have AI improve our prompt. And the way that we're going to do this is we're going to take our base prompt and we're going to shove that into a prompt improver. So

all the major AI providers such as OpenAI and Claude have different prompt improvers they provide to you. So all

you have to do is give the prompt improver your prompt. It injects all the best practices for prompt engineering into your prompt and gives you back a better prompt which correlates to a better output from your AI. And I'll

show you a quick example of this for the example prompt I just showed you. So I'm

going to go to this tab over here. And

here you can see this right here is the prompt that I just showed you, the basic prompt that I wrote. And after I have this, I'm going to run it through Claude's prompt improver because that's what we're going to use today. But note

that you can run the same process with chatbt. And to get to Claude's prompt

chatbt. And to get to Claude's prompt improver, what you want to do is you want to go to console.enfropic.com/dashboard.

console.enfropic.com/dashboard.

And there's going to be a pop-up here that says generate prompt. So, if I select this, I can paste in that prompt that I just showed you, the base one.

I'm going to select this checkbox here because I'm going to use a thinking model. I'm going to say generate. What's

model. I'm going to say generate. What's

going to happen is it's going to reformat that prompt, make it more robust. It's going to use better word

robust. It's going to use better word choices to ensure that we're not misdirecting the AI. And it's going to do a bunch of other things. And as you can see immediately, the prompt that it's giving us back right now is much longer than the prompt that I initially

gave it. And also, you can see there's

gave it. And also, you can see there's more structure. So, if I scroll through

more structure. So, if I scroll through here, you can see it's using different types of formatting tools to focus the AI's attention on different segments of the prompt. Also, you can see that it's

the prompt. Also, you can see that it's added a scratch pad, which is kind of a way for the AI to think internally. And

it's done it's done a bunch of other things. And these are all best practices

things. And these are all best practices for prompt engineering specifically when you're prompting Claude. But you can do the same thing with GPT's prompt improver as well. Now, after we've improved the prompt, we want to embed

this into a project. So, I'm sure most of you know what a project is by now. So

both Claude and GPT have projects. These

are basically ways that we can create a tailored AI for a specific task and use it on a reoccurring basis. So in this context, it could be an AI that generates SOPs for us. So we can delegate tasks to the people that we

hire and it does it in a very specific format, ensuring that it follows our styling for our documents as well as other writing styles that we care about.

And for this project, all we need to do is drop in the prompt that we just improved from the AI itself, drop in the template that we already have, put that in the project, and it's ready to go. So

I'll show you here how we create a project within Claude. So if I open up Claude, a fresh instance, I'm going to expand this out here. And once I've expanded this, you can see below we have

projects here. And if we click projects,

projects here. And if we click projects, I can do new project. And I then type in test create new project. When I create this project, it's going to give me a

tailored AI that I can specifically uh direct towards a certain task. So in

this case, we're going to take that system prompt that we had improved. And

all we're going to do is we're going to paste it into our instructions here. So

these are this is going to be the system prompt behind the AI. It's always going to check that before it does anything else. And that's what we want it to do.

else. And that's what we want it to do.

So because we keep it consistent. So I'm

going to paste in that prompt there for those instructions. I'm going to save

those instructions. I'm going to save instructions. And now we have a system

instructions. And now we have a system prompt where the AI always checks. In

addition to this, we're going to drop in our template in this files location. So

all you have to do is drag and drop a file in here. That's all I did is dragged and dropped or you can click this button to add files. And this is going to be my template. So this is the template that I initially showed you. So

this is what we want the AI to do when it generates an SOP for us. So we have our instructions and our template. So

I've already ran this process for the same exact project just named differently. And let me close this out

differently. And let me close this out so you can see what I put in here. So

all I did is I put in one line. So I

said below is a transcript of a meeting that I had with one of my employees.

Now, what I want you to do is I want you to convert that transcript into an SOP so they know how exactly to do this pro this process on an ongoing basis. So, I

dropped in a demo transcript and then the AI gave me back a document. Now, I'm

going to scroll down to the bottom so we can see the final output.

And if you actually do a sidebyside comparison, which was what I did initially, I'll actually show you what this looks like. On the left side, we have our original template. So, this is exactly what we wanted the AI to do. And

the right hand side is what the AI gave us back. So, you can see right away

us back. So, you can see right away they're not identical. It's kind of accurate, but it's not exactly like the format that we would expect. So, this is often an issue that we all run into where we have to copy out the contents

from the one that the AI gave us and put it into the formatted one that we prefer. So, this isn't a massive issue,

prefer. So, this isn't a massive issue, but it is timeconuming and there is a way to perfect the AI's output. So, you

don't have to do this. So, that's our initial output from our initial run. So,

if we look at this overall flow here, this was the basic approach that we took that's faded out here. We created our template. We set up our system prompt.

template. We set up our system prompt.

We ran it through the prompt improver to improve the prompt and we created our cloud project. Now for the advanced

cloud project. Now for the advanced piece when we're building on top of that, there's only a few things we need to do. We need to extract the exact

to do. We need to extract the exact design out of our template. We need to create a cloud skill which I'll talk about which we'll kind of talk about what that is in a second. And after

we've done this, we need to update our project with one single line. And after

we've done that, we're going to get a perfect output every single time that's matching our format for our documents.

So let's start with extracting the design. How are we going to do this?

design. How are we going to do this?

Well, with AI, of course. So, what I'm going to do is I'm going to start a fresh clawed chat. I'm gonna ask it to basically look at the template that I provide. I'm going to drop in the

provide. I'm going to drop in the template and I'm gonna say, I want you to extract out, ideally reverse engineer the exact design, the colors, the fonts, the spacing, everything, and I want you to extract it out so I can use this on a

reoccurring basis to create a document just like it. And I'm going to show you what that looks like. So, this is the chat that I did. Let me close this out.

At the very top, this is all that I gave it. It's a very short prompt. And as you

it. It's a very short prompt. And as you can see, I said, I want you to methodically reverse engineer the template I provided, which is attached here. And that's the template that I've

here. And that's the template that I've shown you multiple times. And I say, I want you to extract out the exact design. So colors, fonts, formattings,

design. So colors, fonts, formattings, styles, logos, everything, ensuring that I can recreate this design on a reoccurring basis perfectly pixel for pixel match. That's all I gave it. And

pixel match. That's all I gave it. And

then what the AI did is it worked for probably 3 minutes or so, 3 to four minutes, and it extracted everything I needed from that design, and it gave me back a series of files. So at the very

bottom here, it's given me a markdown file. So it's basically some text. They

file. So it's basically some text. They

gave me some code and a series of images. And once I've gotten this

images. And once I've gotten this extracted out design, I downloaded all of it here from the download all. And

then I moved on to our next step. So we

have our perfect design extraction done.

Very easy. And the next step is embedding that. So embedding that into a

embedding that. So embedding that into a cloud skill. So what is a cloud skill?

cloud skill. So what is a cloud skill?

Simply put, a cloud skill is just a bunch of prompts, some style rules, and code inside of a folder. That's all it is. And the beautiful thing about skills

is. And the beautiful thing about skills is sure it's called a cloud skill because cloud is the one that originated it. But you can use cloud skills in any

it. But you can use cloud skills in any type of AI provider. So you can use them inside of Gemini. You can use them inside of GPT and a variety of others because again it's just a folder with prompts, style rules, and code inside of

it. And the way that you can find this

it. And the way that you can find this is if you're inside of Claude, you want to go to your profile. You want to go to settings, capabilities, and then there's a skills section. Let me show you where that is. So, I'm going to open up a

that is. So, I'm going to open up a fresh instance of Claude. I'm going to click this little circle and I'm going to go to settings. Once I'm inside of settings, I want to go to capabilities.

And then inside capabilities, I want to scroll down until I see skills. So, down

here, you can see there's a section called skills. And these are different

called skills. And these are different folders, a bunch of prompts, style style rules, and code that our AI can call on any given time to achieve a certain task. In our case, we're going to have

task. In our case, we're going to have the AI create a very specific skill that matches our design for our SOPs. So

anytime we call on it, it's going to perfectly match the formatting that we need for SOP. And the beautiful thing about skills is you don't necessarily have to be a expert at creating them.

There's actually a meta skill that creates other skills. So we have a skill that can create skills, which is kind of cool. That's exactly what we're going to

cool. That's exactly what we're going to use here. So if I go back to the skill

use here. So if I go back to the skill section, if I scroll through here, you can see near the bottom, there's a skill here called skill creator. And this is given to us by Anthropic. So this is off

the shelf, provided to you immediately.

All you have to do is enable it and use it. And that's exactly what we're going

it. And that's exactly what we're going to do here. So this chat is where I created the skill. So what I did is I went into this conversation here that I showed you previously where we extracted out the design. I did the download all.

I opened up a new conversation, dropped in that file, and then I gave it a very simple prompt here. All I did is I asked it to use the skill creator to create the skill. I made sure that I asked it

the skill. I made sure that I asked it to ensure that when it creates docs with the skill, we need to match the template that we provided pixel for pixel. And

when you're creating the skill, ensure that it includes that. That's it. It's

very straightforward. What happens is Claude will work probably between three and five minutes. At the very end, it'll give you back at the bottom of this a skill. So, you can see right here we

skill. So, you can see right here we have the gradients lab SOP. So, right

here, it would usually say save skill, but since I already saved it, it says save again. And when you push save here,

save again. And when you push save here, it's automatically going to update your settings here. So, if we go to our

settings here. So, if we go to our settings under capabilities, we see the skills. If I selected save skill here,

skills. If I selected save skill here, it automatically populates it here. So

you can see we have that new skill saved automatically. All we have to do is

automatically. All we have to do is ensure it's enabled and we can use it whenever. And if you wanted to use this

whenever. And if you wanted to use this outside of Claude, all you would have to do is download the file like this and then upload it into Chatt or Gemini and ask it to reference that skill anytime it creates documents for you to ensure

that it's matching your design perfectly. So now that we've created our

perfectly. So now that we've created our skill, all we have to do is reference that skill inside of our project. And

this is literally just one line inside of our system instructions. This one

line here. All I'm saying is make sure you always use this new skill that we created when creating documents for us to ensure that it matches our template perfectly. And if I go back to our

perfectly. And if I go back to our project and I open up the instructions, you'll see that I added that single line here. I basically said make sure that

here. I basically said make sure that you always use this skill when creating the document and ensuring that it matches our uh our design perfectly.

That's all we had to do. And when I ran this entire process again, I use the same prompt. So if we look at this, let

same prompt. So if we look at this, let me close this out for a second. I use

the same exact prompt. I just copied and pasted the prompt out of the other one that we did and we got the poor formatting out of and I put it into this one ensuring that it referenced the skill. And in our our output is much

skill. And in our our output is much much better. So this is the output that

much better. So this is the output that we received from it. And if we actually do a sidebyside like we like we just did, we can see when we look at both of these, it's much much closer. First off,

you can see we have the logo and the output. So on the right hand side is our

output. So on the right hand side is our output. On the lefth hand side is our

output. On the lefth hand side is our base template. We have the logo, the

base template. We have the logo, the font is right, the coloring is right.

You can see the line coloring is correct. Almost every aspect of what the

correct. Almost every aspect of what the AI gave us is identical to what the base template provides. So if we scroll

template provides. So if we scroll through here, you can see the structuring, the fonts, everything. And

all we had to do was add one single line to our system prompt after we created the skill. All right. So as a quick

the skill. All right. So as a quick recap, I want to walk you through some of the items to remember. So first off, we need to start with a template. always

have something for the AI to reference to match. After that, we want to reverse

to match. After that, we want to reverse engineer that template with AI to extract out the exact design. So when we create documents with AI, it's a pixel perfect match. The way we're going to do

perfect match. The way we're going to do that is we're going to embed that design that we've extracted into a skill and we're going to embed that skill into a project. So anytime that any of our

project. So anytime that any of our employees or we use this cloud project or GPT project, it's going to match the output that we expect for the format that we care about. And to that point, you can use this in other tools. So it's

not just cloud, you can use it in GPT and Gemini as well. And then finally, this can be used for any type of document. So it could be SOPs,

document. So it could be SOPs, contracts, proposals, meeting minutes, etc. And that's it. So if you enjoyed this, please reshare it with your friends. And as a reminder, two things.

friends. And as a reminder, two things.

Below is a 30-day AI insight series, completely free. You'll get 30 insights

completely free. You'll get 30 insights in your inbox how you can apply AI to your business and your work. The second

thing is if you'd like to work with me, blow a series of offerings to see if there's a good fit between the two of us. And that's formatting. But what

us. And that's formatting. But what

about when AI just fails you? You have

to go back and forth five or six times and finally you get something that's good and then you move on. And that's

the mistake. There's a free lesson hiding in that conversation. I catch it every time now. It saves me hours every week. I'll show you how right here. Go

week. I'll show you how right here. Go

ahead, click that video and I'll show you how. See you next time, internet.

you how. See you next time, internet.

Loading...

Loading video analysis...