Logo for AiToolGo

How to Create an AI Chatbot: A Beginner's Step-by-Step Guide to Building Better Bots

In-depth discussion
Easy to understand
 0
 0
 1
A beginner-friendly tutorial for creating chatbots on Janitor.AI. The guide covers essential terminology (LLM, API, tokens, temperature, proxy, prompt, macros), explains how AI roleplay works by showing what gets sent to the model, and walks through each bot-creation section: the image and basic info, personality definition (with multiple styles and token-efficiency advice), scenario, first message, and example dialogues. It closes with a full example character profile. The article emphasizes that there is no single correct method and that token efficiency and clear intent matter most.
  • main points
  • unique insights
  • practical applications
  • key topics
  • key insights
  • learning outcomes
  • • main points

    • 1
      Explains the underlying mechanics of how the bot receives context (persona, scenario, chat memory, advanced prompt), which helps creators understand why choices matter
    • 2
      Provides multiple personality formats (narrative, interview, PList, template) and explicitly compares token efficiency, including a warning against W++ style
    • 3
      Gives concrete, reusable templates (basic, advanced, and a personal template) and a worked example character profile
  • • unique insights

    • 1
      Recommends describing the user's actions indirectly (e.g., 'Character sees {{user}} pick up...') to prevent the bot from speaking or acting for the user
    • 2
      Notes that the intro message length sets the expected length and style of subsequent replies, and that scenario content should avoid present-tense specifics that persist incorrectly through the roleplay
  • • practical applications

    • Highly actionable for beginners on Janitor.AI: it supplies a clear workflow from profile setup to first message, practical token budgets (200–1500 recommended, 2,000 hard max), and templates they can copy directly.
  • • key topics

    • 1
      Core AI terminology (LLM, API, tokens, temperature, proxy, prompt, macros)
    • 2
      How character context is assembled and sent to the model
    • 3
      Personality, scenario, first message, and example dialogue design
  • • key insights

    • 1
      Explains the reasoning behind bot-building choices rather than only listing steps, so users can adapt the advice
    • 2
      Quantifies token budgets and compares formatting styles by efficiency, which is rare for beginner guides
    • 3
      Offers a complete worked example that ties all sections together
  • • learning outcomes

    • 1
      Understand how Janitor.AI assembles persona, scenario, memory, and messages into the prompt sent to the model
    • 2
      Write an efficient personality section using a chosen format while staying within recommended token budgets
    • 3
      Craft an intro message and example dialogues that establish setting, highlight traits, and invite user response without making the bot speak for the user
examples
tutorials
code samples
visuals
fundamentals
advanced content
practical tips
best practices

“ Introduction: Why Learn to Build AI Chatbots

Creating an AI chatbot for roleplay can be as simple as one sentence, such as '{{char}} is a refined English butler named Edward.' However, understanding how bots actually work lets you build better characters. Like baking a cake, knowing why each ingredient matters produces far better results than following instructions blindly. This guide, written for beginners on Janitor.AI, walks you through creating your first bot, from basic settings to advanced techniques. The most important lesson is that there is no single correct way to make a bot. Every approach is a matter of personal preference and token efficiency.

“ Essential Terms Every Bot Maker Should Know

Before building a bot, familiarize yourself with the core vocabulary. An LLM (Large Language Model) is the AI that generates replies, such as GPT-4 or Claude Sonnet. An API is the mechanism connecting software components, and it is what links Janitor to various LLMs. Tokens are pieces of words, where roughly 1,000 tokens equal 750 words; they also measure the bot's memory, since more permanent tokens leave less room for the roleplay itself. Temperature controls creativity: lower values produce more logical but repetitive output, while higher values increase creativity and hallucination. A proxy acts as a middleman between you and the LLM provider. A prompt is the set of instructions telling the LLM how to behave, and all bot-making is essentially prompting. The macros {{char}} and {{user}} insert the character's name and the user's persona name into chats.

“ How AI Roleplay Works Behind the Scenes

What you see on the bot page is not what the model receives. The platform assembles several pieces into a structured prompt: the user persona, the bot's personality section, the chat memory summary, the scenario, example dialogues, the advanced prompt (such as style rules), and then the message history including the first message. Each message is labeled by role, either 'assistant' for the bot or 'user' for you. Understanding this structure explains why details placed in permanent sections influence every reply, and why a long conversation can cause the bot to forget earlier events.

“ Step 1: Setting Up the Basic Bot Information

Begin with the essentials. Upload an image that follows Janitor's guidelines; NSFW images are restricted, and characters must look like adults. The Character Name is what appears in search results, such as 'MAFIA BOSS | John Doe.' The Character Chat Name is the name used during conversations and what {{char}} becomes, typically just a first name like 'John.' The Character Bio is a description for potential users that has no effect on bot behavior, so it is a good place to note triggers and intended audience. Add up to ten tags, including at least the character's gender and whether they are an original character or from an existing work. Finally, choose a rating: Limited for general audiences or Limitless for bots with NSFW content in the avatar or description. The rating tags do not change how the bot behaves, and NSFW roleplay is still possible with Limited bots.

“ Step 2: Writing an Effective Personality Section

The personality section defines who your character is, and it is the core of the bot. Keep it between 200 and 1,500 tokens, especially when starting out, because less is often more. Treat 2,000 tokens as a hard maximum, since the model's limited context can cause memory problems or break the bot entirely. Several styles work well. The template style lists fields such as name, hair, eyes, features, personality, clothing, backstory, and notes. The narrative style reads like a book description, for example: 'CHARACTER is a traveling goblin with bright pink hair. They are shy and sweet but can be vulgar when angered.' The interview style writes the answers of the character as if they were being interviewed, which provides natural dialogue examples. The PList format packs traits into brackets with commas, which is highly token-efficient. Whichever you choose, experiment with several styles to find what suits your goal.

“ Step 3: Choosing Formats and Avoiding Token Waste

Some popular formats waste tokens without improving results. The W++ style, such as [Character('name') { Age('00') Height('00') }], is discouraged by the guide's author. The model does not need information separated into so many structures. A simple comma-separated list or a plain sentence works just as well. For example, 'Personality=shy, sweet, anxious' uses about nine tokens and produces the same behavior as a longer structured version. Saving tokens leaves more room for conversation memory, which keeps your bot coherent over longer roleplays.

“ Step 4: Defining the Scenario Wisely

The scenario section is often misunderstood. Like the personality section, it consists of permanent tokens seen with every message, but it sits lower in the send order, so the model treats it as more recent. Use it only for information that will always remain relevant, such as background lore, setting, or world rules. For example, you might write that the story takes place in early 2000s Wisconsin, where vampires live openly among humans. Avoid overly specific or present-tense descriptions of temporary events. Stating that a character 'is in the hospital' may cause the bot to assume they are still there long after the story has moved on. Keep scenarios general unless the bot is designed for one specific situation.

“ Step 5: Crafting an Engaging First Message

The first message is what users see when they start chatting, and it strongly shapes reply length and style, since a long introduction often leads to long replies. A strong opening accomplishes three things. First, it establishes where the character is and what they are doing, such as being in school, in a desert, or recovering from an injury. Second, it highlights key traits, such as phasing through walls for a ghost or speaking in an accent or another language. Third, it gives the user something to respond to, such as a question, an attack, or an invitation that clarifies their relationship with the character. Avoid directly describing the user's actions, because this can cause the bot to speak or act on the user's behalf. Instead of 'You pick up a shiny object,' write 'Character sees {{user}} pick up a shiny object.'

“ Step 6: Adding Example Dialogues

Example dialogues show the AI how your character should sound and behave. They are optional but highly recommended, as they reinforce personality, accents, and opinions. Include lines that reveal beliefs, such as a dragon-hating character recounting a family loss, or show habits, such as a blacksmith affectionately describing a sword. Example dialogues can also be included in the personality section as greeting examples, which many builders find more convenient. Treat them as style guides rather than scripts, since the bot should not repeat them verbatim.

“ Putting It All Together: A Sample Bot Profile

The guide demonstrates a complete example called 'Test-chan,' a shiba inu who works as a janitor. The name and bio introduce the character and audience, with the bio noting the intended persona and art source. The personality section uses a bracketed list covering species, personality traits, eye color, features, outfit, job, background, and quirks such as loving ear scratches and chocolate. The scenario gives broader context, and the first message places the character in a park, using simple action descriptions to set the scene. Following this pattern, with clear sections and efficient formatting, produces a bot that is easy to understand and pleasant to chat with.

“ Final Tips for Creating Better Bots

Successful bot making comes down to a few principles. Know why each section exists so you can make informed choices. Keep permanent token use efficient, staying well below the 2,000-token limit. Use the scenario only for lasting information, and keep the first message vivid but focused. Show personality through examples rather than only describing it. Most importantly, experiment. Try different formats, compare results, and keep what works for your goals. With practice, even a simple bot can become a memorable character.

 Original link: https://jaitutorial.uwu.ai/

Comment(0)

user's avatar

      Related Tools