logo

FileStore.php

Baladna El Youm10-11-2024

*/ public function get($key) { return $this->getPayload($key)['data'] ?? null; } /** * Store an item in the cache for a given number of seconds. * * @param string $key * @param mixed $value * @param int $seconds * @return bool */ public function put($key, $value, $seconds) { $this->ensureCacheDirectoryExists($path = $this->path($key)); $result = $this->files->put( $path, $this->expiration($seconds).serialize($value), true ); return $result !== false && $result > 0; } /** * Create the file cache directory if necessary. * * @param string $path * @return void */ protected function ensureCacheDirectoryExists($path) { if (! $this->files->exists(dirname($path))) { $this->files->makeDirectory(dirname($path), 0777, true, true); } } /** * Increment the value of an item in the cache.

Orange background

Try Our AI Features

Explore what Daily8 AI can do for you:

Comments

No comments yet...

Related Articles

Elon Musk isn't happy with his AI chatbot. Experts worry he's trying to make Grok 4 in his image
Elon Musk isn't happy with his AI chatbot. Experts worry he's trying to make Grok 4 in his image

Egypt Independent

time8 hours ago

  • Egypt Independent

Elon Musk isn't happy with his AI chatbot. Experts worry he's trying to make Grok 4 in his image

Musk was not pleased. 'Major fail, as this is objectively false. Grok is parroting legacy media,' Musk wrote, even though Grok cited data from government sources such as the Department of Homeland Security. Within three days, Musk promised to deliver a major Grok update that would 'rewrite the entire corpus of human knowledge,' calling on X users to send in 'divisive facts' that are 'politically incorrect, but nonetheless factually true' to help train the model. 'Far too much garbage in any foundation model trained on uncorrected data,' he wrote. On Friday, Musk announced the new model, called Grok 4, will be released just after July 4th. The exchanges, and others like it, raises concerns that the world's richest man may be trying to influence Grok to follow his own worldview – potentially leading to more errors and glitches, and surfacing important questions about bias, according to experts. AI is expected to shape the way people work, communicate and find information, and it's already impacting areas such as software development, healthcare and education. And the decisions that powerful figures like Musk make about the technology's development could be critical. Especially considering Grok is integrated into one of the world's most popular social networks – and one where the old guardrails around the spread of misinformation have been removed. While Grok may not be as popular as OpenAI's ChatGPT, its inclusion in Musk's social media platform X has put it in front of a massive digital audience. 'This is really the beginning of a long fight that is going to play out over the course of many years about whether AI systems should be required to produce factual information, or whether their makers can just simply tip the scales in the favor of their political preferences if they want to,' said David Evan Harris, an AI researcher and lecturer at UC Berkeley who previously worked on Meta's Responsible AI team. A source familiar with the situation told CNN that Musk's advisers have told him Grok 'can't just be molded' into his own point of view, and that he understands that. xAI did not respond to a request for comment. Concerns about Grok following Musk's views For months, users have questioned whether Musk has been tipping Grok to reflect his worldview. In May, the chatbot randomly brought up claims of a white genocide in South Africa in responses to completely unrelated queries. In some responses, Grok said it was 'instructed to accept as real white genocide in South Africa'. Musk was born and raised in South Africa and has a history of arguing that a 'white genocide' has been committed in the nation. A few days later, xAI said an 'unauthorized modification' in the extremely early morning hours Pacific time pushed the AI chatbot to 'provide a specific response on a political topic' that violates xAI's policies. As Musk directs his team to retrain Grok, others in the AI large language model space like Cohere co-founder Nick Frosst believe Musk is trying to create a model that pushes his own viewpoints. 'He's trying to make a model that reflects the things he believes. That will certainly make it a worse model for users, unless they happen to believe everything he believes and only care about it parroting those things,' Frosst said. What it would take to re-train Grok It's common for AI companies like OpenAI, Meta and Google to constantly update their models to improve performance, according to Frosst. But retraining a model from scratch to 'remove all the things (Musk) doesn't like' would take a lot of time and money – not to mention degrade the user experience – Frosst said. 'And that would make it almost certainly worse,' Frosst said. 'Because it would be removing a lot of data and adding in a bias.' A Grok account on X is displayed on a phone screen. Jakub Porzycki/NurPhoto/Shutterstock Another way to change a model's behavior without completely retraining it is to insert prompts and adjust what are called weights within the model's code. This process could be faster than totally retraining the model since it retains its existing knowledge base. Prompting would entail instructing a model to respond to certain queries in a specific way, whereas weights influence an AI model's decision-making process. Dan Neely, CEO of Vermillio which helps protect celebrities from AI-generated deepfakes, told CNN that xAI could adjust Grok's weights and data labels in specific areas and topics. 'They will use the weights and labeling they have previously in the places that they are seeing (as) kind of problem areas,' Neely said. 'They will simply go into doing greater level of detail around those specific areas.' Musk didn't detail the changes coming in Grok 4, but did say it will use a 'specialized coding model.' Bias in AI Musk has said his AI chatbot will be 'maximally truth seeking,' but all AI models have some bias baked in because they are influenced by humans who make choices about what goes into the training data. 'AI doesn't have all the data that it should have. When given all the data, it should ultimately be able to give a representation of what's happening,' Neely said. 'However, lots of the content that exists on the internet already has a certain bent, whether you agree with it or not.' It's possible that in the future, people will choose their AI assistant based on its worldview. But Frosst said he believes AI assistants known to have a particular perspective will be less popular and useful. 'For the most part, people don't go to a language model to have ideology repeated back to them, that doesn't really add value,' he said. 'You go to a language model to get it to do with do something for you, do a task for you.' Ultimately, Neely said he believes authoritative sources will end up rising back to the top as people seek places they can trust. But 'the journey to get there is very painful, very confusing,' Neely said and 'arguably, has some threats to democracy.'

OPEN// PM: State prioritizes industrial development, technology, innovation
OPEN// PM: State prioritizes industrial development, technology, innovation

Middle East

time9 hours ago

  • Middle East

OPEN// PM: State prioritizes industrial development, technology, innovation

TENTH OF RAMADAN, Egypt, June 28 (MENA) – Prime Minister Mostafa Madbouli affirmed that the state places industrial development, technology, and innovation at its top priorities during the current phase. He explained that the state takes such steps since these areas play important role to contribute to achieving development and economic growth, creating both direct and indirect job opportunities, reducing depending on imports, enhancing local content, boosting exports, and strengthening the competitiveness of Egyptian products abroad. These sectors also play a vital role in empowering start-ups and supporting other aspects that serve the national economy. The premier's remarks came Saturday during a tour in the 10th of Ramadan City, where he witnessed the inauguration of the first factory of BSH company, which is owned by the German "Bosch" Group, in Egypt and Africa. It is also scheduled that the premier will witness the inaugurating of the largest e-commerce logistics warehouse for "Jumia," a leading African technology and e-commerce company, located on the Suez Road. The premier was accompanied by Sherif elSherbiny, Minister of Housing, Utilities, and Urban Communities, Hazem el Ashmouny, Governor of Sharqia; Hossam Heiba, CEO of the General Authority for Investment and Free Zones; and Ibrahim el Segini, Head of the Consumer Protection Agency, along with several BSH Egypt executives. During his visit to the Jumia warehouse, Madbouli is scheduled to be accompanied by Amr Talaat, Minister of Communications and Information Technology, Ibrahim Saber Khalil, Governor of Cairo; and Abdel Latif Allama, CEO of Jumia Egypt. Madbouli explained that in line with the state's keenness to upgrade the industrial sector and its efforts to enhance private sector investments, an urgent plan has been drawn up based on the directives of President Abdel Fattah El Sisi to make use of Egypt's capabilities and resources that qualify it to become a regional and global industrial and logistical hub. (MENA) K F E/M N E

Trump cuts off US trade talks with Canada over digital tax on tech firms - International
Trump cuts off US trade talks with Canada over digital tax on tech firms - International

Al-Ahram Weekly

time11 hours ago

  • Al-Ahram Weekly

Trump cuts off US trade talks with Canada over digital tax on tech firms - International

President Donald Trump announced on Friday that he was halting trade negotiations with Canada in response to its decision to proceed with a digital services tax targeting large U.S. technology firms. Trump, in a post on his social media network, said Canada had just informed the U.S. that it was sticking to its plan to impose the digital services tax, which applies to Canadian and foreign businesses that engage with online users in Canada. The tax is set to go into effect Monday. The digital services tax will hit companies including Amazon, Google, Meta, Uber and Airbnb with a 3 percent levy on revenue from Canadian users. It will apply retroactively, leaving U.S. companies with a $2 billion U.S. bill due at the end of the month. Calling the move 'a direct and blatant attack on our country,' Trump said Washington would not continue talks while Ottawa imposed what he described as an unfair measure aimed at American companies. 'Based on this egregious Tax, we are hereby terminating ALL discussions on Trade with Canada, effective immediately. We will let Canada know the Tariff that they will be paying to do business with the United States of America within the next seven day period,' Trump said in his post. Trump's announcement was the latest swerve in the trade war he's launched since taking office for a second term in January. Progress with Canada has been a roller coaster, starting with the U.S. president poking at the nation's northern neighbor and repeatedly suggesting it would be absorbed as a U.S. state. Canadian Prime Minister Mark Carney said Friday that his country would 'continue to conduct these complex negotiations in the best interests of Canadians. It's a negotiation.' Trump later said he expects that Canada will remove the tax. 'Economically we have such power over Canada. We'd rather not use it,' Trump said in the Oval Office. "It's not going to work out well for Canada. They were foolish to do it.' When asked if Canada could do anything to restart talks, he suggested Canada could remove the tax, predicted it will but said, 'It doesn't matter to me.' Carney visited Trump in May at the White House, where he was polite but firm. Trump last week traveled to Canada for the G7 summit in Alberta, where Carney said that Canada and the U.S. had set a 30-day deadline for trade talks. Canada and the U.S. have been discussing easing a series of steep tariffs Trump imposed on goods from America's neighbor. The Republican president earlier told reporters that the U.S. was soon preparing to send letters to different countries, informing them of the new tariff rate his administration would impose on them. Trump has imposed 50 percent tariffs on steel and aluminum as well as 25 percent tariffs on autos. He is also charging a 10 percent tax on imports from most countries, though he could raise rates on July 9, after the 90-day negotiating period he set would expire. Canada and Mexico face separate tariffs of as much as 25 percent that Trump put into place under the auspices of stopping fentanyl smuggling, though some products are still protected under the 2020 U.S.-Mexico-Canada Agreement signed during Trump's first term. Addressing reporters after a private meeting with Republican senators Friday, Treasury Secretary Scott Bessent declined to comment on news that Trump had ended trade talks with Canada. 'I was in the meeting,' Bessent said before moving on to the next question. About 60 percent of U.S. crude oil imports are from Canada, and 85 percent of U.S. electricity imports as well. Canada is also the largest foreign supplier of steel, aluminum and uranium to the U.S. and has 34 critical minerals and metals that the Pentagon is eager to obtain. About 80 percent of Canada's exports go to the U.S. Daniel Beland, a political science professor at McGill University in Montreal, said it is a domestic tax issue, but it has been a source of tensions between Canada and the United States for a while because it targets U.S. tech giants. 'The Digital Services Tax Act was signed into law a year ago so the advent of this new tax has been known for a long time,' Beland said. "Yet, President Trump waited just before its implementation to create drama over it in the context of ongoing and highly uncertain trade negotiations between the two countries.' Follow us on: Facebook Instagram Whatsapp Short link:

DOWNLOAD THE APP

Get Started Now: Download the App

Ready to dive into a world of global content with local flavor? Download Daily8 app today from your preferred app store and start exploring.
app-storeplay-store