> Documentation index: https://firebase.google.com/docs/ai-logic/llms.txt

You can control the generation of responses in a variety of ways depending on
your use case and the level of control that you need.

## Prompt design

Learn about [prompt design](https://firebase.google.com/docs/ai-logic/prompt-design.md.txt) so that you can
influence the model to generate output specific to your needs.

For example, learn how to provide relevant information associated with the task
in a structured way.

## Model configuration

Set a [model configuration](https://firebase.google.com/docs/ai-logic/model-parameters.md.txt) to control how
the model generates a response. The configuration options depend on the model
and capability that you're using. Here are some examples:

- For Gemini models, you can configure parameters like
  max output tokens, the probability of repeated output tokens, etc.

- For Gemini models capable of multimodal output (like the
  Gemini Nano Banana or Gemini Live API models), you can additionally
  configure the type of applicable response (audio, text, or images) and the
  voice used in audio responses (when applicable).

- For Gemini models capable of *thinking* , you can also specify a
  [thinking-related configuration](https://firebase.google.com/docs/ai-logic/thinking.md.txt), including a
  *thinking level* and whether to include *thought summaries*.

## Safety settings

Use [safety settings](https://firebase.google.com/docs/ai-logic/safety-settings.md.txt) to adjust the likelihood
of getting responses that may be considered harmful. These settings can help you
with controlling output for possible hate speech, harassment,
sexual explicitness, and dangerous content.

For example, you can block responses that promote or enable access to harmful
goods, services, and activities.

## System instructions

Set [system instructions](https://firebase.google.com/docs/ai-logic/system-instructions.md.txt) to steer the
behavior of the model. This feature is like a "preamble" that you add before
the model gets exposed to any further instructions from the end user.

For example, you can tell the model to return responses as if it were a pirate
or to return responses in a specific format.

## Structured output using response schema

Pass a [*response schema*](https://firebase.google.com/docs/ai-logic/generate-structured-output.md.txt)
along with the prompt to specify a specific output schema. This feature is
most commonly used when
[generating JSON output](https://firebase.google.com/docs/ai-logic/generate-structured-output.md.txt#generate-json-basic),
but it can also be used for
[classification tasks](https://firebase.google.com/docs/ai-logic/generate-structured-output.md.txt#generate-enum-basic)
(like when you want the model to use specific labels or tags).