Ai runs on the data that you give it as an input, no data equals no Ai. Actually, the more data you give Ai, the smarter it gets. The problem we are facing is, where do we get the data, how do we transfer it to Ai, and how can we make it more affordable for larger data receivers.
Global impact
By providing inefficient data to Ai inputs, Ai will become more expensive for the everyday user. We can see the effects of it on ChatGPT by OpenAI. You have to pay for a premium membership in order to get the basic functions an Ai should be able to provide for free. Because all Ai does is, read the user input âĨ create a logical output by using data from API's or databases âĨ transmit output back to user.
SOLUTION
HetoAi addresses data issues through logical solutions. The AI network operates on the blockchain, sourcing data from various computers running the blockchain on an open-source router. This data is then converted into a logical input and sent back to the user.
Global impact
With our solution we can tackle issues regarding various data input problems using blockchain. This can have a huge impact on the Ai market, since the cost of running Ai would dramatically decreasy.
EXAMPLE
We will now create our own bot using the technology we just talked about. Let's get started!
First, we'll write some basic code that will simulate a virtual blockchain for now, when you deploy this code for real you would obviously use a main net or test net of an actual blockchain.
# Simulated data from the blockchainblockchain_data ={"question":"What is the capital of France?","answer":"The capital of France is Paris."}# Function to generate response based on user inputdefgenerate_response(user_input):if"capital of France"in user_input:return blockchain_data["answer"]else:return"I'm sorry, I don't have information on that topic."# Main function to interact with the botdefmain():print("Bot: Hi there! Ask me any question.")whileTrue: user_input =input("You: ")if user_input.lower()=='bye':print("Bot: Goodbye!")breakelse: bot_response =generate_response(user_input)print("Bot:", bot_response)if__name__=="__main__":main()
Now that we have our chatbot ready, let's give it some payload to perform a stress test and capture its capabilities.
# Function to simulate user input and test the botdefstress_test(bot):print("Stress Test: Simulating user input...") questions = ["What is the capital of France?","What is the population of New York City?","Tell me about artificial intelligence.","How tall is Mount Everest?","What is the largest ocean in the world?","Who is the president of the United States?","What year did World War II end?","What is the square root of 144?","How do I reset my password?","Can you recommend a good restaurant nearby?" ]for question in questions:print("User:", question) response =bot(question)print("Bot:", response)print()# Function to interact with the botdefbot(question):if"capital of France"in question:return"The capital of France is Paris."elif"population of New York City"in question:return"The population of New York City is approximately 8.4 million."elif"artificial intelligence"in question:return"Artificial intelligence (AI) is the simulation of human intelligence processes by machines, especially computer systems."elif"tall is Mount Everest"in question:return"The height of Mount Everest is approximately 8,848 meters."elif"largest ocean in the world"in question:return"The largest ocean in the world is the Pacific Ocean."elif"president of the United States"in question:return"The current president of the United States is Joe Biden."elif"year did World War II end"in question:return"World War II ended in 1945."elif"square root of 144"in question:return"The square root of 144 is 12."elif"reset my password"in question:return"Please contact customer support for assistance with password reset."elif"recommend a good restaurant nearby"in question:return"I'm sorry, I don't have information on that topic."else:return"I'm sorry, I don't understand your question."# Perform stress teststress_test(bot)
This will run a basic stress test on our bot, to further test our bot we can add some additional functions to our stress test.
# Function to simulate user input and test the botdefstress_test(bot):print("Stress Test: Simulating user input...") questions = ["What is the capital of France?","What is the population of New York City?","Tell me about artificial intelligence.","How tall is Mount Everest?","What is the largest ocean in the world?","Who is the president of the United States?","What year did World War II end?","What is the square root of 144?","How do I reset my password?","Can you recommend a good restaurant nearby?" ] num_questions =len(questions) correct_responses =0for question in questions:print("User:", question) response =bot(question)print("Bot:", response)if"I'm sorry, I don't understand"notin response: correct_responses +=1print() accuracy = (correct_responses / num_questions) *100print("Stress Test Results:")print(f"Total Questions: {num_questions}")print(f"Correct Responses: {correct_responses}")print(f"Accuracy: {accuracy:.2f}%")# Function to interact with the botdefbot(question):if"capital of France"in question:return"The capital of France is Paris."elif"population of New York City"in question:return"The population of New York City is approximately 8.4 million."elif"artificial intelligence"in question:return"Artificial intelligence (AI) is the simulation of human intelligence processes by machines, especially computer systems."elif"tall is Mount Everest"in question:return"The height of Mount Everest is approximately 8,848 meters."elif"largest ocean in the world"in question:return"The largest ocean in the world is the Pacific Ocean."elif"president of the United States"in question:return"The current president of the United States is Joe Biden."elif"year did World War II end"in question:return"World War II ended in 1945."elif"square root of 144"in question:return"The square root of 144 is 12."elif"reset my password"in question:return"Please contact customer support for assistance with password reset."elif"recommend a good restaurant nearby"in question:return"I'm sorry, I don't have information on that topic."else:return"I'm sorry, I don't understand your question."# Perform stress test and display statisticsstress_test(bot)
Now we can see the statistics of our stress test payload and how it performed. With this information, we can further enhance our bot, good luck!