<!--- --8<-- [start:generate] -->
!!! tip "Generate using AI"
    **:material-auto-fix: Generate** - press the **generate** button on top of the input field to let the AI generate the content based on the existing details.
<!--- --8<-- [end:generate] -->

<!--- --8<-- [start:autocomplete] -->
!!! tip "Autocomplete using AI"
    **:material-auto-fix: Autocomplete** - press `ctrl+Enter` while the cursor is in the input field to use AI to autocomplete the current content, you 
<!--- --8<-- [end:autocomplete] -->

<!--- --8<-- [start:generate_and_autocomplete] -->
!!! tip "Generate using AI"
    **:material-auto-fix: Generate** - press the **generate** button on top of the input field to let the AI generate the content based on the existing details.
    
    **:material-auto-fix: Autocomplete** - press `ctrl+Enter` while the cursor is in the input field to use AI to autocomplete the current content, you 
<!--- --8<-- [end:generate_and_autocomplete] -->

<!--- --8<-- [start:generation_templates_and_settings] -->
!!! tip "Generation settings and managing templates"
    Find out more about content generation, managing templates and how to apply randomization and specific writing styles in [Templates](/talemate/user-guide/world-editor/templates/) and [Generation settings](/talemate/user-guide/world-editor/generation-settings).
<!--- --8<-- [end:generation_templates_and_settings] -->

<!--- --8<-- [start:tracked_state] -->
!!! tip "What is a tracked state?"
    Tracked states occassionally re-inforce the state of the world or a character. This re-inforcement is kept in the context sent to the AI during generation, giving it a better understanding about the current truth of the world.

    Some examples could be, tracking a characters physical state, time of day, or the current location of a character.
<!--- --8<-- [end:tracked_state] -->

<!--- --8<-- [start:spice_collections] -->
!!! tip "What are spice collections?"
    Spice collections are used to define a set of instructions that can be applied during AI directed generation of content. They are used to add a bit of randomness or unexpectedness. 
    
    A template must explicitly support spice to be able to use a spice collection.

    Find out more about how to use spice collections in the [Generation settings](/talemate/user-guide/world-editor/generation-settings) section.
<!--- --8<-- [end:spice_collections] -->

<!--- --8<-- [start:writing_styles] -->
!!! tip "What are writing styles?"
    Writing style templates are used to define a writing style that can be applied to the generated content. They can be used to add a specific flavor or tone. 
    
    A template must explicitly support writing styles to be able to use a writing style template.

    Find out more about how to use writing styles in the [Generation settings](/talemate/user-guide/world-editor/generation-settings) section.
<!--- --8<-- [end:writing_styles] -->

<!--- --8<-- [start:what_is_a_tracked_state] -->
!!! info "What is a tracked state?"
    Tracked states occassionally re-inforce the state of the world or a character. This re-inforcement is kept in the context sent to the AI during generation, giving it a better understanding about the current truth of the world.

    Some examples could be, tracking a characters physical state, time of day, or the current location of a character.
<!--- --8<-- [end:what_is_a_tracked_state] -->

<!--- --8<-- [start:agent_long_term_memory_settings] -->
![Agent long term memory settings](/talemate/img/0.29.0/agent-long-term-memory-settings.png)

If enabled will inject relevant information into the context using relevancy through the [Memory Agent](/talemate/user-guide/agents/memory).

##### Context Retrieval Method

What method to use for long term memory selection

- `Context queries based on recent context` - will take the last 3 messages in the scene and select relevant context from them. This is the fastest method, but may not always be the most relevant.
- `Context queries generated by AI` - will generate a set of context queries based on the current scene and select relevant context from them. This is slower, but may be more relevant.
- `AI compiled questions and answers` - will use the AI to generate a set of questions and answers based on the current scene and select relevant context from them. This is the slowest, and not necessarily better than the other methods.

##### Number of queries

This settings means different things depending on the context retrieval method.

- For `Context queries based on recent context` this is the number of messages to consider.
- For `Context queries generated by AI` this is the number of queries to generate.
- For `AI compiled questions and answers` this is the number of questions to generate.

##### Answer length

The maximum response length of the generated answers. 

##### Cache

Enables the agent wide cache of the long term memory retrieval. That means any agents that share the same long term memory settings will share the same cache. This can be useful to reduce the number of queries to the memory agent.

<!--- --8<-- [end:agent_long_term_memory_settings] -->

<!--- --8<-- [start:character_change_proposals] -->
When a proposal has been generated it, if the character currently is acknowledged in the worldstate, a lightbulb :material-lightbulb-on: will appear next to the character name. 

![Character change proposal](/talemate/img/0.29.0/world-state-suggestions-1.png)

Click the name to expand the character entry and then click the :material-lightbulb-on: to view the proposal.

![Character change proposal expanded](/talemate/img/0.29.0/world-state-suggestions-2.png)

You will be taken to the world editor suggestions tab where you can view the proposal and accept or reject it. 

![Character change proposal expanded](/talemate/img/0.29.0/world-editor-suggestions-1.png)
<!--- --8<-- [end:character_change_proposals] -->