Index Ai Academy
Glossary · Phase 1 · Building with LLMs

Prefilling

Writing the first words of the model's reply yourself so it continues from there. Newer models reject it; use structured output instead.

Try it now

Keep the user message the same and change only the system prompt. Make the voice playful, or delete the format rule, and compare the replies. If a reply comes back cut off, raise max_tokens, the cap on how long a reply can be.

Learn it properly

System prompts and roles · Set behavior once, separately from the conversation. About 25 minutes.

Create a free account See what's in the lesson

Other terms from the same lesson

Never trained an AI?

Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.

Teach it to write