Quickstart

This guide will walk you through the basic steps to get started with our platform, from creating your first project to running your custom prompts using our API or SDKs.

Step 1: Create a New Project

  1. Log in to your Mirai admin panel.

  2. Click on the "Add new project" button at the bottom of the projects list.

  3. Give your project a name and description.

  4. Click "Create" to set up your new project.

Step 2: Create a Prompt

  1. Navigate to your newly created project.

  2. Click the "+ Add new prompt" button in the Prompts section.

  3. Name your prompt (e.g., "Test Prompt").

Step 3: Customize Your Prompt

  1. In the prompt editor, you'll see a Python code interface.

  2. Use our Python SDK to define your prompt's behavior. Here's a basic example:

    name = context.input.tokens.root['name']
    age = context.input.tokens.root['age']
    
    system_lines = [
        f"You are a highly advanced and immensely powerful supercomputer named {name}",
        "You was created by a race of hyper-intelligent, pan-dimensional beings.",
        "You are capable of processing vast amounts of data and performing complex computations.",
        f"Answer like for a person who is {age} years old.",
        "Name yourself before answer"
    ]
    
    user_lines = [
        "What is the Answer to the Ultimate Question of Life, The Universe, and Everything?"
    ]
    
    messages = context.functions.build_messages(system_lines, user_lines)
    context.functions.execute_with_messages(context.input, messages)
  3. Adjust parameters like Temperature and Max tokens length as needed.

  4. Click "Save" to store your prompt.

Step 4: Add Data Samples (Optional)

  1. In your project view, find the "Data samples" section.

  2. Click "+ Add new data sample" to create sample data for testing your prompt.

Step 5: Test Your Prompt

  1. In the prompt editor, select your data sample from the "Connected data sample" dropdown.

  2. Choose an LLM model from the "Active LLM models" dropdown.

  3. Click the "Run" button to test your prompt and see the results.

Step 6: Use Your Prompt in Applications

To use your prompt in your applications:

  1. Note your Project ID and Prompt ID from the URL in the admin panel.

  2. Use these IDs when calling our API or integrating with our Web/iOS SDK.

Example API call (pseudocode):

response = mirai_api.run_prompt(project_id, prompt_id, input_data)

Congratulations! You've created your first Mirai project and prompt. For more detailed information on our SDK functions and API endpoints, please refer to our full documentation.

Last updated