# Usage Patterns

Optimize Fractur configuration for your use case

Fractur AI is designed to be configurable, so there probably exists a configuration that will work for your use case. Here are some examples to get you started.

### [​](https://docs.chunkr.ai/docs/use-cases/usage-patterns#highest-quality)Highest quality <a href="#highest-quality" id="highest-quality"></a>

The highest quality output is achived by using layout analysis and then generating html and markdown using a VLM on every segment type. This will take longer to process, but will yield the highest quality output. By dividing the file into segments, we can get higher quality results from the VLM and also parallelize the processing.

PythoncURL

```python
from chunkr_ai import Chunkr
from chunkr_ai.models import (
    Configuration, 
    GenerationConfig, 
    GenerationStrategy,
    SegmentProcessing
)

chunkr = Chunkr()

config = Configuration(
    high_resolution=True, # Use high resolution for all segments
    segment_processing=SegmentProcessing(
        Caption=GenerationConfig(
              html=GenerationStrategy.LLM,
              markdown=GenerationStrategy.LLM,
          ),
          Footnote=GenerationConfig(
              html=GenerationStrategy.LLM,
              markdown=GenerationStrategy.LLM,
          ),
          ListItem=GenerationConfig(
              html=GenerationStrategy.LLM,
              markdown=GenerationStrategy.LLM,
          ),
          Page=GenerationConfig(
              html=GenerationStrategy.LLM,
              markdown=GenerationStrategy.LLM,
          ),
          PageFooter=GenerationConfig(
              html=GenerationStrategy.LLM,
              markdown=GenerationStrategy.LLM,
          ),
          PageHeader=GenerationConfig(
              html=GenerationStrategy.LLM,
              markdown=GenerationStrategy.LLM,
          ),
          Picture=GenerationConfig(
              html=GenerationStrategy.LLM,
              markdown=GenerationStrategy.LLM,
          ),
          SectionHeader=GenerationConfig(
              html=GenerationStrategy.LLM,
              markdown=GenerationStrategy.LLM,
          ),
          Text=GenerationConfig(
              html=GenerationStrategy.LLM,
              markdown=GenerationStrategy.LLM,
          ),
          Title=GenerationConfig(
              html=GenerationStrategy.LLM,
              markdown=GenerationStrategy.LLM,
          )
    )
)

chunkr.upload("path/to/file", config)
```

### [​](https://docs.chunkr.ai/docs/use-cases/usage-patterns#fastest)Fastest <a href="#fastest" id="fastest"></a>

The fastest output is achived by skipping layout analysis and using no VLMs at all. That means that the output will just be the text content of the file.

PythoncURL

```python
from chunkr_ai import Chunkr
from chunkr_ai.models import (
    Configuration, 
    SegmentProcessing, 
    GenerationConfig, 
    GenerationStrategy, 
    SegmentationStrategy, 
    CroppingStrategy
)

chunkr = Chunkr()

config = Configuration(
    segment_processing=SegmentProcessing(
        Formula=GenerationConfig(
              html=GenerationStrategy.AUTO,
              markdown=GenerationStrategy.AUTO,
        ),
        Table=GenerationConfig(
              html=GenerationStrategy.AUTO,
              markdown=GenerationStrategy.AUTO,
        ),
        Picture=GenerationConfig(
            crop_image=CroppingStrategy.AUTO
        ),
    ),
    segmentation_strategy=SegmentationStrategy.PAGE
)

chunkr.upload("path/to/file", config)
```

### [​](https://docs.chunkr.ai/docs/use-cases/usage-patterns#word-level-bounding-boxes)Word Level Bounding Boxes <a href="#word-level-bounding-boxes" id="word-level-bounding-boxes"></a>

If you want to get word level bounding boxes for all text in the file. This will take longer to process but will have consistent results.

PythoncURL

```python
from chunkr_ai import Chunkr
from chunkr_ai.models import Configuration, OcrStrategy

chunkr = Chunkr()

config = Configuration(
   ocr_strategy=OcrStrategy.ALL
)

chunkr.upload("path/to/file", config)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fractur.gitbook.io/fractur/use-cases/usage-patterns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
