Creating Self Rewarding AI Systems

#2
by awacke1 - opened
Owner

AI Generating Its Own Data:
https://youtu.be/vKMvQqw91n4?list=PLHgX2IExbFovOnNLCnbE2-RE6cFSrC_4D&t=5

We work through problems as we think. During sleeping we also get better at resolving our problems due to unconcious latent dendritic excitement allows cortical columns to equalize signalling eachother on related topics or neurons.

This 'boot loader' can include a reward system loop that is self generating.

Examples:
Create a self-rewarding AI system that works like a markdown outline stored as memory. Give the model a plus one for each point where it's refactored a prompt that yields a better result. Try this on the self-generating, self-rewarding AI Python streamlet app.py in order to test to see if you can answer medical licensing exam questions around white blood cells. The questions for this include, what are the types of white blood cells, list all the types along with their definition.

import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.keras.preprocessing.sequence import pad_sequences
from tensorflow.keras.utils import to_categorical
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy

Define the model

model = keras.Sequential([
layers.Embedding(input_dim=10000, output_dim=128, input_length=10),
layers.Flatten(),
layers.Dense(64, activation='relu'),
layers.Dense(8, activation='softmax')
])

Compile the model

model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])

Load the data

train_data = pd.read_csv('train.csv')
test_data = pd.read_csv('test.csv')

Preprocess the data

train_sequences = train_data['text'].apply(lambda x: pad_sequences(x, max_length=10))
test_sequences = test_data['text'].apply(lambda x: pad_sequences(x, max_length=10))

Split the data into training and validation sets

train_sequences, val_sequences, train_labels, val_labels = train_test_split(train_sequences, train_data['label'], test_size=0.2, random_state=42)

Train the model

model.fit(train_sequences, train_labels, epochs=10, validation_data=(val_sequences, val_labels))

Evaluate the model

test_pred = model.predict(test_sequences)
test_accuracy = accuracy(test_labels, test_pred)
print(f'Test accuracy: {test_accuracy:.3f}')

Refactor the model

Define a new model

new_model = keras.Sequential([
layers.Embedding(input_dim=10000, output_dim

Creating an AI reward system really looks like creating a markdown online where you give yourself plus one points for each refactor of a prompt that yields a better result. Please try this self-generating, self-rewarding AI-ython Streamlix system to test, see if you can answer medical licensing exam questions around white blood cells. The questions for this would include what are the four types of white blood cells, what are their different life cycles like, and what are the inputs and outputs and the function of each blood cell for WBCs, which is white blood cells. Show this as a Python screen with application, and also please use markdown for your prompting language. the system should be able to recognize the user's input and give them points accordingly.

Prompt: What are the four types of white blood cells?
User Input Points
Monocytes, Lymphocytes, Neutrophils, Eosinophils 1
Monocytes, Lymphocytes, Neutrophils, Basophils 0.5
Monocytes, Lymphocytes, Neutrophils, Eosinophils, Basophils 0
Prompt: What is the life cycle of a neutrophil?
User Input Points
Neutrophils are produced in the bone marrow, mature in the blood, and die in the spleen 1
Neutrophils are produced in the bone marrow, mature in the blood, and live for a long time 0.5
Neutrophils are produced in the bone marrow, mature in the blood, and die in the lungs 0
Prompt: What are the inputs and outputs of a neutrophil?
User Input Points
Inputs: oxygen, nutrients, waste products 1
Outputs: fight infections, protect against toxins 0.5
Inputs: nothing, outputs: nothing 0
Prompt: What is the function of each type of white blood cell?
User Input Points
Monocytes: produce antibodies 1
Lymphocytes: recognize and destroy infected cells 1
Neutrophils: engulf and destroy foreign particles 1
Eosinophils: fight parasites 1
Basophils: release histamine in allergic reactions 0.5
Application
Please enter your answer for each prompt, and the system will give you points based on your response. Good luck!

Sign up or log in to comment