> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doconda.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Template-based vs template-free document generation

> Template-based generation fills placeholders in a file with data; template-free generation composes the document from content.

**Template-based generation** starts from an already designed file (a Word document or PowerPoint deck with
placeholders such as `{{customer}}`) and fills those placeholders with data. **Template-free generation** composes the
whole document from the content and a description of the style, and decides its structure. The first gives very
predictable results; the second adapts to content whose shape changes.

## Why it matters when generating documents with AI

* A template fixes the structure: if the content a model writes has more sections or tables than expected, it
  doesn't fit.
* Without a template, the layout has to adapt to the kind of document (a contract, a letter, a report).
* Templates cost upkeep: every new document type needs its own.
* A middle path is copying the design of an existing file (fonts, colors, logo) while leaving the structure free.

## With Doconda

Doconda creates documents without a template, from a sentence or your Markdown, and adapts the layout to the kind of
document. If you pass a reference file in `sources` and say so in the request, it copies its design: a presentation is
used as the template; from other files it copies fonts, colors, margins, header and footer, logo and cover. It works
in `standard` and `best` ([Copy the design of a file](/en/guides/create#copy-the-design-of-a-file)).

## Related

* [Word styles vs direct formatting](/en/glossary/word-styles)
* [What is a document generation API](/en/glossary/document-generation-api)
* [What is PPTX](/en/glossary/pptx)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.