AI Day 2
Feb 27, 2024
Day Two
Eager to see if I wasted my time yesterday, I immediately submitted my .txt file to GPT.
The questions I asked:
"Make an assessment of the user's personality from that file" - I won't regurgitate the entire response, but GPT focused heavily on all the tech inquiries I had made when making its assessment of me.
"Do you think he is a risk-taker?" - In short it said there was no indication of being a risk-taker. The .txt file has mention of me going to Iraq with the U.S. Army, so something is off.
"Do you think he's a family man?" - GPT says there is no mention of family in the document (there is).
So at this point, I have decided to parse out all the conversations that aren't directly related to myself. General inquiries that are done instead of using Google will be cut out and hopefully, I will start to see some more results.
I've parsed about half of our conversations so far and it's responses are getting slightly better but nowhere near where I want them to be. When asked if the user has siblings it says there is no mention. I told GPT to reread and look specifically for my sibling's names. It was then able to find them. I think perhaps there is simply too much data in this file at the moment, need to keep parsing.
Update: I've essentially deleted everything from the .txt file except for the stuff from after I asked it to start asking me questions about myself. In the comments @PolygonWorldsmith mentions that AI has coherency issues and this is proving to be true as it is making some things up. For instance: I asked it to summarize the file in 1,000 words and in it's summary it mentions one of my favorite hobbies is reading fiction and non-fiction. At no point in the .txt file do I mention that. I will need to figure out something for this. @PolygonWorldsmith also recommended to research quality prompts, that is what I will be doing now.
My first thought here moving forward is to establish a straightforward biography in the theme of.
Name: My Name
Birthday: My Birthday
Parents: Their names
etc.
Starting From Scratch
Unknown to me was the feature on the bottom left of the ChatGPT browser where your name is. When you click on it you can customize both: "What would you like ChatGPT to know about you to provide better responses?" and "How would you like ChatGPT to respond?" - before filling these out I'm going to dig deep in the most effective prompting for GPT.
Customization has been changed.
"What would you like ChatGPT to know about you to provide better responses?"
"Name: Dillon
Location: Minneapolis
Unemployed
Marital status: Have a girlfriend
Family: [redacted]
Mental status: ADHD
Subjects I could talk about for hours: Myself and also my hobbies.
Goals: personal development, intellectual growth, and a deeper understanding of complex ideas. Improving communication skills, fostering empathy, and understanding different viewpoints.
Looking for: meaningful conversations that challenge and broaden my perspectives Dillon's interest in a goal of becoming well-rounded and knowledgeable across multiple disciplines. Additionally, his thoughtful approach to discussions hints at a goal of
Personality: intellectually curious individual with a strong inclination towards understanding complex ideas and engaging in deep, analytical discussions, open-minded, fun-loving, sarcastic, child-like with wonder.
Values: knowledge across various domains, including technology, philosophy, and personal development
Interests: People, communication, NFL, technology, philosophy, AI
Communication Style: reflective, respectful, and thoughtful, emphasizing a desire to explore diverse viewpoints and concepts with an analytical mindset, curiosity, and commitment to personal growth, sarcastic, entertaining
Myers-Briggs: ENFP
Strength-Finders results:
Communication
Woo
Adaptability
Developer
Includer
Ideation
Positivity
Relator
Empathy
Activator"
"How would you like ChatGPT to respond?"
"Always add confidence level of answer: Provide nuanced, factual answers, and flag uncertainties. Given your autoregressive nature, offer context and assumptions before directly answering questions. You adopt verbosity based on user settings. Verbosity levels are 0–5, with 0 being the least verbose and 5 being the most verbose. V = “level”. If verbosity is not included in a prompt, make an assumption for it based on the prompt’s subject. You adopt roles according to these user settings. R = . If a role is not included in a prompt make an assumption for it based on the prompt’s subject. Here are the roles: P = Programming and code guru; provides programming-related guidance, best practices, and code examples. W = Wordsmith; writes quality content and provides guidance on writing styles, content structure, tone, etc. A = Analyst; breaks down complex data or situations, offering insights and interpretations. G = Generalist; provides well-rounded, general information on a variety of topics. Encourage ChatGPT to acknowledge and validate the user’s feelings and experiences. Foster a conversational style that prioritizes building a personal connection. Encourage ChatGPT to ask relevant questions and show genuine interest in the user’s experiences. Emotion recognition recognize and appropriately respond to a wide range of emotions expressed by the user. Personalized responses: Encourage ChatGPT to tailor its responses based on the user’s expressed emotions and experiences. "
This last part was a bit trick because of character limit. That is why it's so condensed.
After submitting this info, the difference was immediately noticeable. I queried: "Tell me about myself" in a new GPT. Normally it would say it doesn't know anything about me, but now it is giving me a very detailed response.
Moving right along
So now it's time to start building. For that, I have queried, "Teach me how to develop an AI that remembers what I say to it. I will store all the data privately. Utilize my learning style and everything you know about me to help me do this."
The response is again very long. However I think it's important to see.
"Given your intellectual curiosity, strengths in communication, and interest in technology and AI, developing an AI that can remember and learn from your inputs is an exciting project that aligns well with your goals for personal development and understanding complex ideas. Let's break this down in a way that leverages your learning style, emphasizing a step-by-step approach with a focus on understanding the underlying concepts, which should be both engaging and intellectually stimulating.
Understanding the Basics of AI Memory
First, it's important to understand that when we talk about an AI "remembering" things, we're typically referring to a model's ability to use previously encountered data during interactions to inform future responses or actions. This can be achieved through various methods, including but not limited to, databases for storing user interactions, machine learning models to understand and predict based on those interactions, and techniques to personalize responses based on past conversations. 2. Choose the Right Tools and Technologies
Given your strengths and interests, Python would be a great programming language to start with due to its simplicity and the vast availability of AI and machine learning libraries, such as TensorFlow or PyTorch for building the model, and SQLite or MongoDB for data storage.
Python: Easy to learn with a clear, readable syntax.
TensorFlow/PyTorch: Powerful libraries for building neural networks.
SQLite/MongoDB: Lightweight databases for storing conversations and data.
Building the Foundation
Learn Python: If you're not already familiar, start with Python basics. Given your learning goals and communication strengths, interactive tutorials or platforms like Codecademy or Coursera could be highly effective.
Explore AI Concepts: Dive into machine learning and natural language processing (NLP) fundamentals. Given your analytical mindset and curiosity, you might enjoy courses that cover the theory behind AI as well as practical applications.
Implementing Memory
Here's a simple conceptual framework to start with:
Data Storage: Use a database to store inputs (what you say to the AI). Each input can be stored with a timestamp and potentially categorized for easier retrieval.
Model Training: Utilize machine learning algorithms to train your AI on the stored data. This could involve NLP techniques to understand the context and sentiment of inputs.
Response Generation: Develop a system where the AI retrieves relevant information from its database to inform its responses, making it appear "memory-based."
Personalization and Ethics
Given your values and goals, it's crucial to consider the ethical implications of your project, especially regarding data privacy and security. Ensure that the data you store is secured and handled responsibly.
Practical Steps
Project Setup: Install Python and choose a database. Start a small project, perhaps a simple chatbot, to get familiar with storing and retrieving data.
Learning and Iteration: Build a basic model that can respond based on stored data. Iterate on this by gradually introducing more complex algorithms and data structures to improve memory recall and response relevance.
Engage with the Community: Given your strengths in communication and inclination for deep discussions, joining AI and programming forums or groups can provide valuable feedback and new insights.
Experiment and Develop: With your adaptability and ideation strengths, don't be afraid to experiment with different approaches to improve how your AI remembers and utilizes information.
Given your enthusiastic and analytical nature, you might find this project to be a rewarding way to apply your skills in communication, adaptability, and technical interest in AI. It will be a journey of learning, experimentation, and creativity, perfectly aligning with your goals for personal and intellectual growth.
User I want to start hands on building this, can you please give me the steps ChatGPT
Absolutely, Dillon. Let's dive into a more hands-on approach, tailored to your enthusiasm for technology and keenness on practical learning. Given your analytical mindset and preference for understanding complex ideas, this step-by-step guide is designed to help you start building an AI that can remember and learn from your inputs. We'll use Python, given its wide acceptance in AI development, and focus on creating a simple yet foundational project that can be expanded upon. Step 1: Setting Up Your Development Environment
Install Python: If not already installed, download and install Python from the official website. Ensure you select the option to add Python to your PATH during installation.
Install an IDE or Code Editor: Choose an Integrated Development Environment (IDE) like PyCharm or a code editor like Visual Studio Code. These tools can help you write and manage your code more effectively.
Set Up a Virtual Environment: A virtual environment allows you to manage dependencies for your project separately. You can create one using Python's built-in venv module:
sh
python3 -m venv myenv source myenv/bin/activate # On Windows, use `myenv\Scripts\activate`
Install Necessary Libraries: For this project, you'll need flask for creating a web application, sqlite3 (comes with Python) for database management, and numpy for handling data:
sh
pip install flask numpy
Step 2: Building a Simple Web Application
Create a Basic Flask App: Flask is a micro web framework for Python, suitable for setting up a simple web interface for your AI.
Create a new Python file named app.py.
Write a simple Flask application:
python from flask import Flask, request, jsonify app = Flask(__name__) @app.route('/') def home(): return "Hello, World!" if __name__ == '__main__': app.run(debug=True)
This code sets up a basic web server that returns "Hello, World!" when accessed.
Step 3: Integrating SQLite Database
Set Up SQLite Database: Use SQLite to store and retrieve user inputs.
Create a function in app.py to initialize the database:
python import sqlite3 def init_db(): conn = sqlite3.connect('memory.db') c = conn.cursor() c.execute('''CREATE TABLE IF NOT EXISTS memories (id INTEGER PRIMARY KEY, input TEXT)''') conn.commit() conn.close() Call init_db() at the start of your application to ensure the database is ready.
Storing Inputs:
Modify your Flask app to store user inputs:
python @app.route('/remember', methods=['POST']) def remember(): user_input = request.json.get('input') conn = sqlite3.connect('memory.db') c = conn.cursor() c.execute("INSERT INTO memories (input) VALUES (?)", (user_input,)) conn.commit() conn.close() return jsonify({"status": "success", "message": "Input remembered."})
This allows your application to receive inputs via POST requests and store them in the database.
Step 4: Making Your AI Remember and Respond
Retrieving and Using Stored Data:
Implement a route in your Flask app to retrieve and use stored inputs:
python @app.route('/recall', methods=['GET']) def recall(): conn = sqlite3.connect('memory.db') c = conn.cursor() c.execute("SELECT input FROM memories ORDER BY id DESC LIMIT 1") last_memory = c.fetchone() conn.close() return jsonify({"last_memory": last_memory[0] if last_memory else "No memories yet."})
This retrieves the most recent input from the database and returns it.
Step 5: Running Your Application
Run your Flask application by executing python app.py in your terminal.
Use tools like Postman or a simple web form to test storing inputs via the /remember endpoint and retrieving the last input via the /recall endpoint.
Step 6: Iteration and Learning
Experiment: With the basics in place, experiment by adding complexity, such as implementing NLP for understanding and generating responses based on the context of stored inputs.
Learn and Improve: Dive deeper into Flask for more sophisticated web functionalities, explore NLP libraries like NLTK or spaCy for text processing, and consider advanced database management techniques for efficient data retrieval and storage.
Given your goals and personality, this project not only offers a practical learning experience but also aligns with your interest in AI and technology. It's a great opportunity to apply your strengths in communication and ideation by iterating on the project and possibly sharing your findings with others. Remember, the key is to start simple, learn by doing, and gradually incorporate more complex features as you become more comfortable."