### 7.1 How do I integrate a text AI into my Celestory module?
Add an AI Request block, connect it to a Format block that composes the System Prompt (AI role, constraints, context). Connect the output of the user input to the input of the AI Request. Connect the result to a Dialogue block to display it.
### 7.2 How do I structure a good prompt for professional results?
An effective prompt includes 6 pillars: Objective/Task, Role/Persona, Context and Target, Format and Tone, Constraints (prohibitions, limits), Evaluation (success criteria). A short and precise prompt systematically outperforms a confused block of text.
### 7.3 How do I create a chatbot with conversation memory?
Create a text variable history (initially empty). At each exchange: (1) capture the input, (2) concatenate with the history via the Assignment block (History + Player: + input), (3) pass to the AI Request by injecting {{history}} into the prompt, (4) add the AI response to the history. Use a Repeat block to limit the number of exchanges.
### 7.4 What is the "temperature" of an AI model and how do I adjust it?
Temperature controls the AI's creativity. Low (near 0) = factual, strict, and predictable answers. High (> 1.0) = varied and creative answers but risk of hallucinations. For business uses, always favor a low temperature.
### 7.5 How do I choose the right AI model for my application?
- Mistral: fast, economical, Zero Data Retention (GDPR), ideal for frequent conversational exchanges.
- Gemini Flash: context of one million tokens, very fast, for consumer interfaces.
- Claude 3: excellent logical reasoning and literary quality, extensive context.
To compare models (cost, tokens, hosting): use OpenRouter.
### 7.6 How do I force the AI to answer in a specific format (JSON, HTML, Markdown)?
Add an explicit directive in the System Prompt: "Only reply with the JSON code matching the following schema" or "Format your response exclusively in Markdown, without quotes". Then use a Decode JSON block to exploit the structured data.
### 7.7 How do I create a library of reusable prompts?
Store each calibrated prompt in a dedicated Text Variable (e.g., Strategy_Consultant, AIDA_context). These variables remain available throughout the Graph and can be injected into any Format or AI Request block.
### 7.8 How do I generate an image with AI in my scenario?
Add an AI Request (Image) block and select a model (e.g., Flux Schnell 4B). Connect the Prompt (description of the desired image) and the Negative Prompt (prohibitions: blurry, low resolution, extra limbs...). The result image can be looped back into another AI Request Image block for modification (Image-to-Image).
### 7.9 How do I create an NPC whose behavior is analyzed by AI?
After a dialogue Repeat block, add a final AI Request that analyzes the conversation history and returns a unique keyword (e.g., SWORD or BOOT depending on the behavior). Use a Switch block to orient the flow towards different rewards or consequences.
---
