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

# Prompts

> Load prompts from Leicht

Prompts are essential when it comes to custom assistants. You can create a tailored voice for your brand or shape the LLM's response by using them.

Leicht uses [ramptix/preprompted-data](https://github.com/ramptix/preprompted-data) as the prompt index to download prompts on-demand — you can find prompts across various topics there.

## Use A Prompt

1. Check out the Wiki of `preprompted-data` and copy the name of your desired prompt. We'll use the name `basic` for the sake of simplicity.
2. From `leicht.prompts`, we'll import the `get_prompt()` function to fetch a prompt and cache it.

```python
from leicht.prompts import get_prompt

# Get the prompt
get_prompt("basic")

# If you wish to disable caching, add the
# no_cache option
get_prompt("basic", no_cache=True)
```

...and that's it! [2 steps](https://youtube.com/watch?v=Z_MvkyuOJgk) and we're good to go.

## Prompts With Variables

Some prompts, for instance, `awesome/character` which requires two variables, support inserting texts.

`awesome/character` requires:

* `{character}` – The character name.
* `{series}` – The series featuring the character.

We can insert them into the prompt using Leicht:

```python
get_prompt(
  "awesome/character",
  character="Walter White",
  series="Breaking Bad"
)
```

## Community Prompts

Community Prompts from [Discussions](https://github.com/ramptix/preprompted-data/discussions) can be accessed with `community/<discussion id>`.

For example, if we want to use [RapperGPT – #2](https://github.com/ramptix/preprompted-data/discussions/2) by the community:

```python
# First fetch will take a moment
get_prompt("community/2")
```

## Usage With Assistant

The `leicht.prompts` module works seamlessly with the `Assistant` API. Provide a valid prompt specification and Leicht will fetch the prompt directly.

```python
from leicht import Assistant

# Initialize an assistant
assistant = Assistant(
  "store/genz-memes",
  llm=...
)

# Watch it suffer
assistant.run("skibidi toilet")
```
