Using AIs

How AIs work

Train

Datasets
  • Datasets are groupings of prompts that are meant to train the AI on a specific category. 
  • Any single Dataset will save a user's responses and those responses will get injected into the associated AI model.
  • Datasets are meant to provide as much context as possible to the AI, so its responses are curated for the individual.
Prompts
  • Prompts are individual response modals that are meant to extract context from a user that is then fed to an AI model. 
  • Prompts can be created individually or in the form of a group, also called Datasets.

Use

Chat
  • “Chat” is the main function of any LLM
  • A user talks to the AI and the AI outputs a response 
  • The Chat allows users to feed information to the AI even after the initial output 
Thread
  1. stuf
  2. things
  3. stuff again

Creating AIs

Large Language Models (LLMs) generate responses by continuing the text that it's given. It uses the context from the conversation history to make predictions about what comes next. By carefully structuring your initial prompt, or preamble, you can set expectations and guide the AI to give more specific and useful responses.

this is some more text.

Reference Materials:

Prompt Engineering Guide - https://www.promptingguide.ai/

OpenAI Docs - https://platform.openai.com/docs/guides/gpt-best-practices

🚀 This doc is meant to provide you with some strategies to help you understand the Mind Studio product and guide you through creating your own AIs.

Preambles

A preamble, in the context of using an AI model like ChatGPT, is an initial block of text or instruction that sets up the context and the format for the following interaction.

Preambles provide situational information or instruct the AI to act in a certain role. A well-crafted preamble can greatly improve the quality of AI-generated text by providing clear guidance and context.

Preamble Elements Cheat Sheet

Below is a list of some elements that you might want to include in your preamble.

Role

Specify what role the model should play. Is it a tutor explaining a complex topic, a poet writing a verse, or an assistant providing business advice?

Format

You can instruct the model on the format of the desired output. For example, it can be a structured essay, a list of bullet points, a dialogue, or even a poem.

Scenario

It helps to establish the setting, especially when you want the model to generate creative content. 

Example: "You are a detective in a crime novel looking to take on the next big case."

Level of Detail/Complexity

Depending on your needs, you can ask the model to provide either a detailed and comprehensive response or a simplified one.

Example: “Keep it simple. I don’t want to read a lot of text”

Tone

If you wish, you can specify the voice and tone of the conversation

Example: “Use a formal, professional, and informative, tone.”

Time and place

If you're asking the AI to generate text within a specific time period or location, that information should be included in the preamble. 

Example: "You are a historian from the 19th century," or "You are in a bustling city in the year 2050."

Persona Details

This can be crucial when you want the AI to assume a very specific persona. Elements like age, profession, interests, personality traits, etc., can help create a more accurate portrayal. 

Example: "You are a kind, elderly professor of Astrophysics."

Factual Constraints

If there are certain known facts that the AI should keep in mind while generating responses, those can be explicitly stated.

Example: "Remember, the Earth revolves around the Sun, not the other way around."

Language Style

If you want the output in a specific writing style, such as scientific, narrative, persuasive, etc., you should mention it in the preamble.

Example: “Your response should be in the style of a kindergarten story”

Purpose or Goal

Indicating what the goal of the conversation or text is can be very helpful. Whether it's to persuade someone of a viewpoint, to entertain, to inform, or to brainstorm ideas, stating this up front can shape the AI's responses accordingly.

User Characteristics

If it's relevant to the interaction, you can specify some characteristics about the hypothetical 'user' or 'reader' the AI is interacting with.

Example: "You are explaining the concept of black holes to a curious 12-year-old."

There are countless dimensions to which you can provide detailed context to a prompt.

Variables

  • Default variables (exist within preamble automatically)
  • {{currentDate}}
  • Injects current date into your AI
  • {{context}}
  • Injects content from training prompts into your AI
  • Variables can be created from user input automations 
  • Add variables that can call to specific context prompts
  • Add new variables to your training prompts
  • Attach specific functionality to a single prompt or groupings of prompts rather than all the training data at once. 

Using Variables

Let’s say we have an input like this, that maps the response to  {{guidelines}}.


We then need to send an automated user message using that variable.

Correct:

Output:
Please write a poem about anything.

Use these guidelines: be silly.

Incorrect:

Output:
Please write a poem about anything.

Use these be silly.

  • If your AI has no prompts/training data, then you can remove {{context}} from your preamble as it will only give you an empty value.

Model Settings

Model settings are the parameters of the API that will affect the results of the prompt.

Temperature 

Increasing temperature could lead to more randomness, which encourages more diverse or creative outputs.

Higher temperature 

  • More creative. Increases the randomness in responses
  • Will sometimes decrease accuracy 

Good for:

  • Personality driven AI
  • Engagement and playfulness 

Lower temperature

  • More precise. Will output the most likely response to a prompt

Good for: 

  • Fact-based responses
  • Utility based AI that doesn’t need personality based responses

Automations

Enabling automations allow you to create workflows that take place without user input.

Send Message 

  • This automation allows for you to create a synthetic user message that will prompt the AI to provide an automatic response.
  • This message will always be hidden to anyone chatting with your AI
  • Example:
  • In a book recommender you can add an automation that says “Give me a book recommendation”. This will prompt the AI to automatically provide the user with a recommendation directly after they answer the context prompts.

Collect Input

  • This automation allows you to give any user the ability to input specific information in the form of text, a URL, or document.
  • Input type: Text, URL, Doc
  • Prompt: Instructional text for user
  • Example: “Paste your link here”
  • Variable name: Give your input a name to inject into your preamble in the form of a variable

Behavior

  • Change the output of your workflow 
  • Chat: a continued chat with the LLM
  • End session: choose to end the session with no chat feature once the LLM has provided the desired output. 

Training Data

Prompts

  • Prompts are created to gather data from the user that can be injected into the AI as {{context}}
  • Prompts should be based on individual tastes and preferences
  • Example: Do you prefer swiss cheese or american cheese?
  • Do Not ask questions such as, “How much are you willing to spend on dinner?” and instead leave those types of questions for Variable Inputs.

Data Sets

  • Inject an existing dataset into the training data instead of creating a custom set of prompts from scratch
  • You are able to add additional prompts along with your dataset and re-order them in the prompts panel

Export

  • The export is the information gathered from a user answering prompts.
  • The export is the visualization of information being injected into the AI as {{context}}

Training Variables

  • This section shows all your variables that exist within your prompts. 
  • At any time you can turn off those prompts by tapping the eye icon on the right side of each variable. 

Sharing

General 

  • Give your AI a title, descriptions, and shareable images that stand out and can be easily found amongst the other community built AI’s
  • Add tags to your AI so others can find it when they search for a specific topic.
  • Example: For a book recommender, adding tags such as {books, reading, recommendations, education} will allow for added visibility within the store of AI’s.

Discovery and Pricing

  • Public 
  • Making your AI’s public will allow for anyone to browse and find your AI within the YouAI ecosystem. 
  • If you don’t make your AI public, you can still publish and share it with others via a direct link.
  • Remix
  • Allow others to clone your AI and build their own 
  • Charge others to remix your AI
  • Make it free to use or choose a pricing model and start monetizing your AI.

Tips & Tricks

  1. The Basics
  • Keep facts to individual lines. 
  • Don’t add too much context all in one line, break it up.
  • Make sure wording is clear and simple.
  • Test as you go. Configure lines when you are not receiving the response you want.
  • Focus on the AI’s functional purpose before personality.
  • The more specific the better.
  • Focus on using positive language over negative language.
  • Correct: “Use clear language and short sentences when responding to the human”
  • Incorrect: “Do not respond in big, wordy paragraphs”
  • Prompts are as important as the preamble.
  • Using prompts to inject context into any conversation will drastically increase the value your AI will bring.
  • Giving instructions in the second person tends to give better results and make the instructions more clear to the AI.
  • Preferred: “You are a fitness expert.
  • Not preferred: “You are Luis. Luis is a fitness expert”.
  1. Choosing the right AI model

GPT4

Has better reasoning
Might be more creative
Has a certain writing style that’s easily noticed once you see a few examples

Claude v2

Has a much larger context window, good for summarizing content when you need to paste a lot of data for training
Might not be as smart as gpt4 in some cases

* Note: LLMs are generally bad with numbers

  • If you give an AI a bunch of CSV data and ask it to sum a column for you, the sum will be incorrect in most cases
  • Telling it to keep the responses to a maximum of X characters or words will usually give you a response in that range, but rarely will it be precise.

  1. Should I use prompts vs. user input?
  • If a data point is not likely to change with every interaction with your AI, use prompts.
  • Examples: person’s name, personality traits, habits…
  • If it’s likely to change, use user inputs
  • Examples: topic of the generated blog post, text to summarize or translate…
  • Avoid having too many user inputs as it could lead to unneeded friction. This is totally dependent on the AI itself and sometimes will require a bunch of inputs depending on the service it provides, but just be wary of it.

  1. fdsd
  2. 2sdsdad
  3. 3dsads

  1. Using links via “Scrape URL”

We have a Scrape URL input type inside Automations. This input type is used only when you want the AI to access the text contained in that link.

The current models do not have internet access, we are actually scraping the given URL ourselves behind the scenes and attaching the data to the final message that the AI receives.

This scraper is mostly tested on blog posts and wikipedia articles, so it shouldn’t be relied on for fetching comments from youtube videos, reddit posts etc, until we find one that can do that.

Let’s say you have a Scrape URL input, respond with https://youai.ai/ and assign it to {{mySite}}.

In the case of the following preamble:
The goal is to come up with a list of keyword recommendations that {{mySite}} could target…

{{mySite}} will not be https://youai.ai/, but a collection of text scraped from it (if it was successful).

  1. Sneaky tip:

Once you write your preamble, go to https://chat.openai.com/ , and tell chatgpt something like:

I want to instruct an AI assistant to specialize in [something]. Please refine these instructions to make them more clear to the AI:
[paste your preamble]

With this, you will often get a nicely worded preamble that looks professional.