DSC Weekly 21 May 2024

Announcements

  • The network infrastructure is experiencing a rapid reshaping with the explosion of multi-cloud, edge computing, and AI. A more complicated IT ecosystem calls for a more sophisticated system of tools and software to support the volume of data and applications housed within it. With organizations moving into a new era of connectivity, they must have the proper bandwidth to not hamper productivity and the ability to embrace digital transformation. Attend the Redefining Network Infrastructure Strategies Virtual Summit to hear leading experts discuss the major trends influencing network infrastructure and the approaches organizations can take to ensure networks run smoothly and efficiently even with vast amounts of data and applications.
  • As cloud use continues to expand, proper management, monitoring and security is critical to ensure organizations are gaining the most benefit. Organizations navigating digital transformation initiatives know the cloud is a major playing ground for emerging technologies related to cloud migration, cloud security and containerization. Tune into the Managing Hybrid and Multi Cloud Environments Summit to hear leading experts in the field discuss the latest strategies for monitoring complex cloud environments, preventing cyber attacks and security breaches via the cloud, and how to integrate the latest technology trends into cloud usage.

Top Stories

  • Texas Jumps the Gun on AI
    May 20, 2024
    by Dan Wilson
    The recent implementation of artificial intelligence by the Texas Education Agency (TEA) to grade the State of Texas Assessments of Academic Readiness (STAAR) tests has sparked significant debate. For show #7 of the AI Think Tank podcast, I had the pleasure of discussing this topic with Caleb Stevens, an infrastructure engineer, founder of Personality Labs, and fellow MIT cohort of mine.
  • Becoming an AI Utility Function Exercise – Part 1
    May 19, 2024
    by Bill Schmarzo
    The media (and movies) have made AI conversations confusing and too emotional. I propose a simple exercise for middle and high school students (and others who might be interested) to provide hands-on training to understand how an AI model works.
  • Deepfakes and LLMs: Free will neural network for AI safety research
    May 17, 2024
    by David Stephen
    Currently, there is nothing any AI system can do, that it is prompted to do, that it would not do, pre-guardrail or post-guardrail. This is a major problem for a dynamic host of a substantial amount of collective human intelligence. Organisms can do numerous things that they do not do.

In-Depth

  • New Book: State of the Art in GenAI & LLMs — Creative Projects, with Solutions
    May 20, 2024
    by Vincent Granville
    With 23 top projects, 96 subprojects, and 6000 lines of Python code, this vendor-neutral coursebook is a goldmine for any analytic professional or AI/ML engineer interested in developing superior GenAI or LLM enterprise apps using ground-breaking technology, in little time.
  • The role of sentiment analysis in cybersecurity
    May 20, 2024
    by Zachary Amos
    Traditional cybersecurity tools like antivirus software and firewalls have always provided a robust foundation for digital security. However, as cyberthreats change, experts must look elsewhere for stronger security outcomes. Sentiment analysis is one method cybersecurity professionals have started integrating with existing protocols.
  • How AI-enhanced data management enables more precise workflows
    May 17, 2024
    by Ovais Naseem
    By 2025, the world will generate 181 zettabytes of data (that’s like streaming Netflix continuously for 36 million years!) This data boom isn’t confined to business sectors—it permeates every facet of our lives. From healthcare and banking to financial services, businesses are bombarded with data yet unaware of how to extract consumer insights, manage data, and make informed decisions.
  • 5 biggest cybersecurity risks in edge computing
    May 17, 2024
    by Zachary Amos
    Edge computing is quickly gaining popularity because it enables low-latency, high-efficiency, real-time operations by moving storage and processing to the network’s boundary. If you are like many people, going from a centralized data center to a solution like this is promising.
  • How to develop an AI-enabled SaaS product
    May 16, 2024
    by Aria Barnes
    Cloud computing has promoted the rise of Software as a Service (SaaS) in the world of business. Software as a Service (SaaS) has become the preferred choice for enterprises of all sizes. SaaS applications provide numerous advantages over traditional software, including affordability, scalability, and ease of use.
  • DSC Weekly 14 May 2024
    May 14, 2024
    by Scott Thompson
    Read more of the top articles from the Data Science Central community.

Securing AI Development: Addressing Vulnerabilities from Hallucinated Code

Learn about current mitigation efforts, future strategies, and the importance of ethical considerations in AI-generated code reliability

Amidst Artificial Intelligence (AI) developments, the domain of software development is undergoing a significant transformation. Traditionally, developers have relied on platforms like Stack Overflow to find solutions to coding challenges. However, with the inception of Large Language Models (LLMs), developers have seen unprecedented support for their programming tasks. These models exhibit remarkable capabilities in generating code and solving complex programming problems, offering the potential to streamline development workflows.

Yet, recent discoveries have raised concerns about the reliability of the code generated by these models. The emergence of AI “hallucinations” is particularly troubling. These hallucinations occur when AI models generate false or non-existent information that convincingly mimics authenticity. Researchers at Vulcan Cyber have highlighted this issue, showing how AI-generated content, such as recommending non-existent software packages, could unintentionally facilitate cyberattacks. These vulnerabilities introduce novel threat vectors into the software supply chain, allowing hackers to infiltrate development environments by disguising malicious code as legitimate recommendations.

Security researchers have conducted experiments that reveal the alarming reality of this threat. By presenting common queries from Stack Overflow to AI models like ChatGPT, they observed instances where non-existent packages were suggested. Subsequent attempts to publish these fictitious packages confirmed their presence on popular package installers, highlighting the immediate nature of the risk.

This challenge becomes more critical due to the widespread practice of code reuse in modern software development. Developers often integrate existing libraries into their projects without rigorous vetting. When combined with AI-generated recommendations, this practice becomes risky, potentially exposing software to security vulnerabilities.

As AI-driven development expands, industry experts and researchers emphasize robust security measures. Secure coding practices, stringent code reviews, and authentication of code sources are essential. Additionally, sourcing open-source artifacts from reputable vendors helps mitigate the risks associated with AI-generated content.

Understanding Hallucinated Code

Hallucinated code refers to code snippets or programming constructs generated by AI language models that appear syntactically correct but are functionally flawed or irrelevant. These “hallucinations” emerge from the models’ ability to predict and generate code based on patterns learned from vast datasets. However, due to the inherent complexity of programming tasks, these models may produce code that lacks a true understanding of context or intent.

The emergence of hallucinated code is rooted in neural language models, such as transformer-based architectures. These models, like ChatGPT, are trained on diverse code repositories, including open-source projects, Stack Overflow, and other programming resources. Through contextual learning, the model becomes adept at predicting the next token (word or character) in a sequence based on the context provided by the preceding tokens. As a result, it identifies common coding patterns, syntax rules, and idiomatic expressions.

When prompted with partial code or a description, the model generates code by completing the sequence based on learned patterns. However, despite the model’s ability to mimic syntactic structures, the generated code may need more semantic coherence or fulfill the intended functionality due to the model’s limited understanding of broader programming concepts and contextual nuances. Thus, while hallucinated code may resemble genuine code at first glance, it often exhibits flaws or inconsistencies upon closer inspection, posing challenges for developers who rely on AI-generated solutions in software development workflows. Furthermore, research has shown that various large language models, including GPT-3.5-Turbo, GPT-4, Gemini Pro, and Coral, exhibit a high tendency to generate hallucinated packages across different programming languages. This widespread occurrence of the package hallucination phenomenon requires that developers exercise caution when incorporating AI-generated code recommendations into their software development workflows.

The Impact of Hallucinated Code

Hallucinated code poses significant security risks, making it a concern for software development. One such risk is the potential for malicious code injection, where AI-generated snippets unintentionally introduce vulnerabilities that attackers can exploit. For example, an apparently harmless code snippet might execute arbitrary commands or inadvertently expose sensitive data, resulting in malicious activities.

Additionally, AI-generated code may recommend insecure API calls lacking proper authentication or authorization checks. This oversight can lead to unauthorized access, data disclosure, or even remote code execution, amplifying the risk of security breaches. Furthermore, hallucinated code might disclose sensitive information due to incorrect data handling practices. For example, a flawed database query could unintentionally expose user credentials, further exacerbating security concerns.

Beyond security implications, the economic consequences of relying on hallucinated code can be severe. Organizations that integrate AI-generated solutions into their development processes face substantial financial repercussions from security breaches. Remediation costs, legal fees, and damage to reputation can escalate quickly. Moreover, trust erosion is a significant issue that arises from the reliance on hallucinated code.

Moreover, developers may lose confidence in AI systems if they encounter frequent false positives or security vulnerabilities. This can have far-reaching implications, undermining the effectiveness of AI-driven development processes and reducing confidence in the overall software development lifecycle. Therefore, addressing the impact of hallucinated code is crucial for maintaining the integrity and security of software systems.

Current Mitigation Efforts

Current mitigation efforts against the risks associated with hallucinated code involve a multifaceted approach aimed at enhancing the security and reliability of AI-generated code recommendations. A few are briefly described below:

  • Integrating human oversight into code review processes is crucial. Human reviewers, with their nuanced understanding, identify vulnerabilities and ensure that the generated code meets security requirements.
  • Developers prioritize understanding AI limitations and incorporate domain-specific data to refine code generation processes. This approach enhances the reliability of AI-generated code by considering broader context and business logic.
  • Additionally, Testing procedures, including comprehensive test suites and boundary testing, are effective for early issue identification. This ensures that AI-generated code is thoroughly validated for functionality and security.
  • Likewise, by analyzing real cases where AI-generated code recommendations led to security vulnerabilities or other issues, developers can glean valuable insights into potential pitfalls and best practices for risk mitigation. These case studies enable organizations to learn from past experiences and proactively implement measures to safeguard against similar risks in the future.

Future Strategies for Securing AI Development

Future strategies for securing AI development encompass advanced techniques, collaboration and standards, and ethical considerations.

In terms of advanced techniques, emphasis is required on enhancing training data quality over quantity. Curating datasets to minimize hallucinations and enhance context understanding, drawing from diverse sources such as code repositories and real-world projects, is essential. Adversarial testing is another important technique that involves stress-testing AI models to reveal vulnerabilities and guide improvements through the development of robustness metrics.

Similarly, collaboration across sectors is vital for sharing insights on the risks associated with hallucinated code and developing mitigation strategies. Establishing platforms for information sharing will promote cooperation between researchers, developers, and other stakeholders. This collective effort can lead to the development of industry standards and best practices for secure AI development.

Finally, ethical considerations are also integral to future strategies. Ensuring that AI development adheres to ethical guidelines helps prevent misuse and promotes trust in AI systems. This involves not only securing AI-generated code but also addressing broader ethical implications in AI development.

The Bottom Line

In conclusion, the emergence of hallucinated code in AI-generated solutions presents significant challenges for software development, ranging from security risks to economic consequences and trust erosion. Current mitigation efforts focus on integrating secure AI development practices, rigorous testing, and maintaining context-awareness during code generation. Moreover, using real-world case studies and implementing proactive management strategies are essential for mitigating risks effectively.

Looking ahead, future strategies should emphasize advanced techniques, collaboration and standards, and ethical considerations to enhance the security, reliability, and moral integrity of AI-generated code in software development workflows.

‘Team Copilot Can Even be Your Project Manager,’ says Satya Nadella

“Team Copilot can Even be Your Project Manager,” says Satya Nadella

When we previously wrote how the GPT-4o desktop app was going to replace your senior employees last week, little did we know that it was happening rapidly.

At Microsoft Build, CEO Satya Nadella expressed similar emotions, where he said that Microsoft Copilot will help employees save time and be more productive and creative.

“Team Copilot can even be your project manager,” said Microsoft chief Satya Nadella, during the introduction of Microsoft Copilot’s new capabilities.

Nadella said that AI assistance at the workplace isn’t just about personal productivity anymore. He said that the updated Team Copilot takes this concept of an AI assistant to an entirely new level, transforming it into a tool for entire teams, departments, and even whole companies.

Team Copilot will expand Copilot beyond a personal assistant to help serve entire teams, departments, and organizations. https://t.co/WTlIy9Mvur #MSBuild

— Microsoft (@Microsoft) May 21, 2024

He also said that it aims to enhance collaboration and streamline project management, making it easier than ever to work together effectively.

Simply put, with Team Copilot, you’re always in control, delegating tasks and responsibilities. This assistant is seamlessly integrated into the tools you already use, such as Teams, Loop, and Planner.

This feature is similar to Google’s ‘AI Teammate,’ powered by Gemini. It significantly helps in reducing workloads by handling mundane tasks and participating in team communications, potentially transforming the employee from a helpful colleague to an overbearing overseer.

In other words, a new way to get more work done without your human manager’s help.

Additionally, Copilot helps keep projects on track by creating and assigning tasks, monitoring deadlines, and notifying team members when their input is needed.

What’s next?

Team Copilot can transform your work experience by making meetings more efficient. Copilot manages the agenda and takes collaborative notes, ensuring that discussions are focused and productive. It enhances group chats by highlighting key information, tracking action items, and addressing any unresolved issues, ensuring that everyone is on the same page.

Further, Microsoft introduced Agents, custom copilots, designed to streamline business processes. Each business operates uniquely, presenting diverse opportunities for optimisation and innovation. These enhanced functionalities within Copilot Studio, empower users to craft custom copilots that function as independent agents, operating under your guidance.

These advanced capabilities in Copilot Studio are presently accessible through the Early Access Program, enabling customers to explore their potential.

The post ‘Team Copilot Can Even be Your Project Manager,’ says Satya Nadella appeared first on AIM.

Microsoft intros a Copilot for teams

Microsoft wants to make its brand of generative AI more useful for teams — specifically teams across corporations and large enterprise organizations. This morning at its annual Build dev conference, Microsoft announced Team Copilot, the latest expansion of its Copilot family of generative AI tech. Unlike Microsoft’s previous Copilot-branded products, Team Copilot isn’t so much […]

© 2024 TechCrunch. All rights reserved. For personal use only.

Microsoft’s Copilot+ PCs, New Surface Laptops and More Pre-Build 2024 Announcements

Before Microsoft’s Build 2024 developer conference kicked off today, the company made a number of initial announcements during a special hour-long keynote event on May 20th hosted at its Redmond campus in Washington. These announcements included:

  • Copilot+ PCs.
  • Copilot and GPT-4o.
  • Recall.
  • Surface Pro 11.
  • Surface Laptop 7.
  • AI-optimized creative apps.

TechRepublic takes a closer look at all the major announcements made at the Surface and Copilot AI event on May 20, 2024.

Copilot+ PCs

The first major announcement to come from the keynote was the launch of Microsoft’s new category of personal computers: Copilot+ PCs. These PCs come with the Copilot AI built in as well as Snapdragon X Elite and Plus processors from Qualcomm capable of 40 trillion operations per second.

SEE: Microsoft Copilot Cheat Sheet: Price, Versions & Benefits

The PCs also have neural processing units designed to power new AI features in the Windows 11 operating system. For example, a Copilot+ PC will be able to make suggestions in Settings, write responses to notifications and edit files in File Explorer.

Another new feature is the Prism translation layer, which will allow software written for Intel and AMD chips to work just as well on chips made with Arm technology. This is the Microsoft equivalent of Apple’s Rosetta 2, and the company said it performs comparatively well.

Yusuf Mehdi, Microsoft’s head of consumer marketing, said the Copilot+ devices are 58% faster than the MacBook Air with its M3 chip. The devices will be sold directly by Microsoft but also by other manufacturers, including Dell, Lenovo, Acer, HP and Asus.

Yusuf Mehdi (pictured) onstage at the Microsoft Build pre-event keynote on May 20, 2024.
Yusuf Mehdi (pictured) onstage at the Microsoft Build pre-event keynote on May 20, 2024. Image: Microsoft

Mehdi added that faster AI assistants that run directly on the device will be “the most compelling reason to upgrade your PC in a long time.”

Copilot and GPT-4o

“I’m excited to share that GPT-4o, with voice and vision capabilities, will soon be available on Copilot,” Mehdi said at the event.

OpenAI’s new model will be able to answer questions based on what is being displayed on screen. An example was shown of how the AI could walk a user through playing the sandbox video game Minecraft.

SEE: OpenAI’s Next Flagship Model Is the ‘Natively Multimodal’ GPT-4o

Recall

Recall is a new AI-powered feature that will allow Copilot+ PC owners to quickly and intuitively search through their device’s history. It runs locally, logging everything the computer has done, including web browsing, file creation and voice chats, so anything the user has come across via that PC can be called upon. Recall is incorporated with Timeline — the existing Windows feature that shows running apps and past activities — to give an easy-to-use scrollable interface.

Examples were given at the keynote of rediscovering months-old PowerPoint slides, clothes you were looking at online and conversations gone by on apps like Discord by using Recall. When it comes to security, Recall data will only be stored on the device and will not be used to train Microsoft’s AI models; users can control which data is seen and stored.

Surface Pro 11

The first of new Copilot+ PCs is the Surface Pro 11. Its Snapdragon X Elite and Plus chips, based on Arm architecture and replacing the previous iteration’s Intel Core Ultra processor, make it up to 90% faster.

Many of the apps on the Surface Pro 11, including Microsoft 365, Chrome, Spotify, Zoom and WhatsApp, run natively on ARM64 processors for improved performance. It is also compatible with a new Surface Pro Flex Keyboard, which works attached or detached. The keyboard and touchpad have been designed to be more accessibility friendly, and there is a Surface Slim Pen holder for storage and charging.

When it comes to its external features, the Surface Pro 11 has a 13-inch screen and is available in blue, beige, black and platinum. The tablet has a QHD front-facing camera and a 10 MP rear camera that can capture 4K video. It is also the first Surface device to offer an OLED display option with HDR support. The new Surface Pro launches on June 18 but is available to pre-order now, starting at $999.99.

The Surface Pro 11, one of Microsoft’s two new Copilot+ PCs, was unveiled on May 20, 2024.
The Surface Pro 11, one of Microsoft’s two new Copilot+ PCs, was unveiled on May 20, 2024. Image: Microsoft

Surface Laptop 7

The other new Copilot+ PC device launched at Monday’s event is the Surface Laptop 7, which also runs on Snapdragon X Elite and Plus chips to support the new AI features. It is more than 80% faster than the previous Surface Laptop and has almost double the battery life, with 22 hours of on-device video playback and 15 hours of web browsing.

A live demonstration took place of the Surface Laptop 7 processing images with Adobe Photoshop at the same time as an Apple MacBook Air, and the former was about twice as fast. The new laptop has also been given a new look with thinner bezels; colour options of blue, beige, black, and platinum; and either a 13.8 inch or 15-inch display. It is available to pre-order now, starting at $999.99, but won’t ship until June 18.

The Surface Laptop 7, one of Microsoft’s two new Copilot+ PCs, is more than 80% faster than its predecessor.
The Surface Laptop 7, one of Microsoft’s two new Copilot+ PCs, is more than 80% faster than its predecessor. Image: Microsoft

AI-optimized creative apps

Microsoft made a number of announcements that increased the creative capabilities of its product lineup. These were:

  • Microsoft is partnering with Adobe and other creative software companies to optimize its app suite for Copilot+ PCs. Adobe’s Photoshop, Lightroom, Firefly and Express will be available on the Surface Laptop 7 and Pro 11 devices, and Illustrator and Premiere Pro will be optimized and deployed later this summer.
  • Many creative apps, including DaVinci Resolve, CapCut, Cephable, LiquidText and djay Pro, have been developed to run natively on the ARM64 processor to boost performance with the NPU.
  • Cocreator, a text or brushstroke-to-image AI tool, will be available with Paint in Copilot+ PCs. As well as taking inputs, it can iterate on existing sketches to aid editing and the brainstorming of ideas.

You can watch the full keynote of the Surface and Copilot AI event on the Microsoft YouTube channel.

KOGO AI is Collaborating with Bhashini to Build AI Agents in Indic Languages

kogo bhashini ai agents

At Google I/O, the tech giant revealed Project Astra, which is Google’s attempt at creating a new generation of AI assistants, or agents, that go beyond just understanding natural language to actually taking actions and completing multi-step tasks.

Notably, Astra is Google’s response to OpenAI’s GPT-4o, which possesses similar agentic capabilities. Pretty soon, AI agents will execute tasks on your behalf.

These recent advancements indicate that AI agents are something tech companies have been working towards. In the not-so-distant future, your favourite applications could have an AI agent built in, with which you can converse to order food, book a cab, or even make payments on your behalf.

Identifying early where the industry is headed, Bengaluru-based deep tech startup KOGO AI has developed a platform that helps companies build AI agents that can converse in Indic languages.

KOGO, which initially started as an AI travel app called Mappls, has now expanded its focus to enterprise AI solutions.

Known as KOGO AI Operating System (OS), it’s a low-code platform that allows companies to build an AI agent from scratch within minutes.

The agents will initially have conversational capabilities in Urdu, Hindi and English. However, another 73 languages, both Indian and global, are expected to be added soon.

For this, the Bengaluru-based startup has partnered with Bhashini, the Indian government’s initiative to break language barriers in India, and Microsoft to make the agents multilingual.

“Today, if a company, whether it’s a developer, system integrator, or large enterprise, intends to develop an AI agent from the ground up, it could take them months, depending on the complexity of the use case.

“We’ve developed an OS that allows you to utilise pre-built building blocks, enabling you to create an agent within minutes for simple use cases and efficiently tackle complex ones. Think of us as similar to Xcode, where you can come in and develop AI agents or AI applications,” KOGO AI CEO Raj K Gopalakrishnan told AIM.

Leveraging Large Action Models (LAM)

KOGO OS is powered by large action models (LAMs), which create AI agents. This likely represents the next iteration in the AI journey.

LAMs are a type of AI system that can understand human intentions and take action to accomplish tasks. Unlike LLMs, which primarily generate outputs, LAMs can execute actions by interfacing with applications, websites, and other systems.

At its core, LAM employs a hierarchical approach to action representation and execution. It decomposes complex actions into smaller sub-actions, facilitating efficient planning and execution.

“You can’t use ChatGPT to book a flight ticket, make a reservation at a hotel or initiate a refund for a cancelled transaction. But with LAMs, it is possible. So LAMs can do all these things, and it uses LLMs as a base,” Gopalakrishnan said.

The KOGO OS platform also leverages multiple small language models (SLMs), which are trained and hosted locally by the startup, and commercially available LLMs.

Even though the platform leverages LLMs now, eventually, it will be powered by the company’s proprietary models, according to Gopalakrishnan. “Currently, we are leveraging LLMs for its intelligence and knowledge wrapping, not for its data,” he said.

A Swarm of SLMs

KOGO’s platform features a graph that generates the AI agent, determining whether to utilise an SLM or query an LLM for a specific task. Moreover, it connects to the contextual data of the particular enterprise.

“We achieve this by creating a swarm of SLMs. Think of it like a school of fish, where each tiny fish handles small tasks, and, together, they work synchronously to deliver faster, domain-specific results,” Gopalakrishnan said.

When it comes to enterprise data, AI agents can handle various data formats, including vector databases, PDFs, unstructured data, and CSV files. They’re also compatible with over 600 different types of apps.

“The system ingests and understands your requirements, whether you are part of the workforce or a business, and completes the task,” he added.

Given that SLMs are smaller, more agile, and trained for specific domains, they can perform functions faster. Moreover, given they are trained on very specific data, the chances of hallucinations reduces.

Over the last few months, we have seen many smaller models popping up including Llama 3 8b. Microsoft too have released several SLMs including the most recent Phi-3, which has just 2.7 billion parameters.

The tech giant is making these models accessible to its customers through Azure because it believes such smaller models are cost-efficient and perform certain functions more effectively.

Now, SLMs are proving to be a useful tool for KOGO in developing its platform.

What AI Agents Can Do

Venture capitalist Vinod Khosla envisioned a future where internet access will primarily be through agents. He predicted that most consumer interactions online would involve agents performing tasks on their behalf and protecting them from marketers and bots.

So far, KOGO has already carried out 14 proofs of concept (PoCs), with several use cases including business intelligence and customer experience.

Moreover, around half of these PoCs are expected to go live this quarter. Gopalakrishnan also revealed that three large system integrators (SI) carry out another six to seven PoCs with their customers and also internally.

“One of the PoCs involves an apparel brand, which, for instance, processes around 200 transactions daily, totalling 700 weekly. Each transaction varies with different items and charges, and payment gateways apply different fees based on payment methods.

“Reconciling these transactions, GST charges, and gateway fees is complex and time-consuming for accounting departments. Our AI agent streamlines this entire process, reducing the time from days to minutes by handling repetitive, mundane tasks efficiently,” Gopalakrishnan said.

Going forward, as AI agents become more advanced and ubiquitous, they are expected to completely change how we interact with machines. While exciting, it’s important to carefully consider the ethical implications.

The post KOGO AI is Collaborating with Bhashini to Build AI Agents in Indic Languages appeared first on AIM.

Be Part of The AI Con USA 2024 with a Free Virtual Pass

Sponsored Content

AI Con USA June 2024

It’s not too late to grab your free pass to the virtual conference, happening June 5-6, 2024. The virtual conference gives you the opportunity to sample some of the excitement that will be happening in Las Vegas.

Included in your Free Virtual Pass:

  • 9 Keynotes from industry luminaries at Microsoft, Apple, DoorDash, S&P Global Ratings, GitHub, DecisionBrain, Indeed and more!
  • Select Industry Technical Presentations from AI and ML solutions leaders
  • Virtual Expo and Amazing Race game where you can win prizes
  • All virtual content available on-demand for up to 6 months

So don’t miss out on this free virtual event highlighting the latest in AI and machine learning. To learn more and explore the full virtual schedule, visit AI Con USA.

More On This Topic

  • AI Con USA: Navigate the Future of AI 2024
  • AI Con USA: Navigate the Future of AI
  • Virtual Presentation Tips for Data Scientists
  • 5 FREE Courses on AI with Microsoft for 2024
  • 5 Steps to Learn AI for Free in 2024
  • 2024 Tech Trends: AI Breakthroughs & Development Insights from…

WitnessAI is building guardrails for generative AI models

Generative AI makes stuff up. It can be biased. Sometimes, it spits out toxic text. So can it be “safe”? Rick Caccia, the CEO of WitnessAI, believes it can. “Securing AI models is a real problem, and it’s one that’s especially shiny for AI researchers, but it’s different from securing use,” Caccia, formerly SVP of […]

© 2024 TechCrunch. All rights reserved. For personal use only.

Meet the Duo from Hyderabad who Made it Big at Google I/O 

Google I/O 2024 wrapped up last week, featuring a range of exciting announcements. During the latter part of the keynote, Google showcased a short video highlighting the power of Gemma in building Indic LLMs.

The search giant introduced Navarasa, a Gemma 7B/2B instruction-tuned model supporting 15 Indian languages and English, developed by Telugu LLM Labs, founded by Ravi Theja Desetty and Ramsri Goutham Golla.

The model was trained on E2E Networks Limited using NVIDIA A100 GPUs which took approximately 44 hours to train the 7 billion model and 18 hours for the 2 billion model.

“When a technology is developed for a particular culture, it won’t be able to solve and understand the nuances of a country like India,” said Harsh Dhand, head of APAC research partnerships at Google.

Take your side projects seriously!
You might as well get featured in the Google I/O keynote on the main stage in California 😉
I'm excited to share that the work @ravithejads and I did in building Navarasa, an Indic instruction-finetuned model on top of Google's Gemma catering… pic.twitter.com/8B1I0p3iYl

— Ramsri Goutham Golla (@ramsri_goutham) May 15, 2024

AIM reached out to Theja and Golla to learn more about their experience. “The Google marketing team invited us to Mysore and booked a five-star hotel, reserving almost all the rooms,” shared Golla, adding that they filmed for about two or three days.

“It was an interesting experience. All those big camera rigs everywhere felt like a movie shoot, with all the big lamps and the makeup crew. They made us feel like celebrities for a day,” he said.

“Google reached out to me after seeing my blog post about Navarasa,” said Theja, adding that he had no idea that the video would be shown during the keynote. “We really didn’t expect it to be showcased at the main event of Google I/O. In fact, Ramsri slept through that day,” he chuckled.

Hyderabad-based Golla studied and worked in the US for almost eight years before returning to India in 2018. He describes himself as a builder/engineer and loves creating SaaS apps. Golla has successfully developed two AI SaaS apps, with a combined ARR of $100K. Additionally, he takes AI courses on Udemy as well as his own platform.

On the other hand, Theja works as a developer advocate engineer at Llama Index. Prior to this, he served as a senior ML engineer at Glance, where he worked on recommendation systems and GenAI applications.

What is Navarasa?

Navarasa 2.0 is a Gemma 7B/ 2B SFT (Supervised Fine-Tuned model) using Gemma 7B/ 2B base models.

The model’s generative capabilities have been enhanced to cover a total of 15 Indian languages. This expansion was achieved by translating the alpaca-cleaned-filtered dataset into six additional Indian languages: Marathi, Urdu, Konkani, Assamese, Nepali, and Sindhi.

The 15 languages supported by Navarasa 2.0 besides English are: Hindi, Telugu, Tamil, Kannada, Malayalam, Marathi, Gujarati, Bengali, Punjabi, Odia, Urdu, Konkani, Assamese, Nepali, and Sindhi.

The model is also available on IndicChat, a playground for open-source Indic LLMs. Built on Hugging Face’s HuggingChat, this platform hosts Indic AI models for users to chat and test. “Many people started using Navarasa through IndicChat, as it is hosted there with a chat interface. A considerable number of users accessed it from there,” said Golla.

Speaking of the advantage Gemma has over Llama 2 and 3, Golla said, “A fundamental difference between Llama and Gemma is that with Llama, you had to fine-tune a model for each individual language. However, with Gemma, you only need to fine-tune once and can combine all the datasets created for Llama.”

“On a higher level, the Gemma tokeniser includes tokens for most Indian languages, providing strong representations for these tokens. In contrast, the Llama3 tokeniser supports only a few languages, and its quality of support is not as robust,” said Theja.

OpenAI’s Love for India is Unmatched

OpenAI’s latest model GPT-4o has made considerable improvements when it comes to Indian languages. It supports over 50 languages and has notably optimised token usage for Indian languages, reducing Gujarati by 4.4 times, Telugu by 3.5 times, Tamil by 3.3 times, and Marathi and Hindi by 2.9 times.

“One of the biggest updates GPT-4o got is a brand new tokeniser and an extended vocabulary size of 2,00,019 tokens as compared to 1,00,277 tokens in GPT-4. This means we have much better support for many new languages and yes some of them are Indian,” said Abhishek Upperwal, founder of Socket AI labs, which recently launched Pragna-1B, India’s first open-source multilingual model.

Love for Indian languages!! @openai has made GPT4-o up to 4.4x more efficient for languages like Gujarati, Telugu, Tamil, Marathi, hindi, and Urdu!
less tokens = cheaper cost and faster output!! #bharat https://t.co/CpvCkjI0iA pic.twitter.com/Xwpi8ECL41

— Andrew Gao (@itsandrewgao) May 13, 2024

“OpenAI is paying attention to Indic languages! My mom has been struggling to learn English from Telugu – now I can make a simple wrapper using the new GPT-4o model,” wrote a user on X.

“OpenAI has done well even for Indic languages in terms of tokenisation efficiency and cost etc,” said Golla. He added that in the past, he had to switch between Anthropic and OpenAI for his SaaS app development, as Anthropic was deemed more efficient with Indic languages compared to GPT-4.

Theja had a different perspective, saying that during the Spring Update, OpenAI didn’t demonstrate how GPT-4o would sound in Indian languages. “If you’ve tried the audio feature in the app for Indian languages, it doesn’t sound good at all. I can’t even understand what it’s saying,” he said.

Indian AI startup Sarvam AI is currently working on an Indic Voice LLM, while Hanooman and Krutrim do not include a voice modality yet. However, they are expected to add this feature soon.

The post Meet the Duo from Hyderabad who Made it Big at Google I/O appeared first on AIM.

A Guide to Working with SQLite Databases in Python

sqlite
Image by Author

SQLite is a lightweight, serverless relational database management system (RDBMS) that is widely used due to its simplicity and ease of embedding within applications.

So whether you're building a small application, managing data locally, or prototyping a project, SQLite provides a convenient solution for storing and querying structured data. In this tutorial, you’ll learn how to work with SQLite databases from Python using the built-in sqlite3 module.

Particularly, you’ll learn how to connect to an SQLite database from Python and perform basic CRUD operations. Let’s get started.

Setting Up the Environment

As a first step create a dedicated virtual environment for your project (in the project directory) and activate it. You can do it using the built-in venv module like so:

$ python3 -m venv v1  $ source v1/bin/activate  

In this tutorial, we’ll use Faker to generate synthetic records. So install it using pip:

$ pip3 install Faker  

The sqlite3 module is built into the Python standard library, so you don't have to install it. So if you’ve installed Faker and are using a recent version of Python, you’re good to go!

Connecting to an SQLite Database

In the project directory, create a Python script and get started. As a first step to interact with the database, we should establish a connection with the database.

To connect to a sample database example.db, you can use the connect() function from the sqlite3 module like so:

conn = sqlite3.connect(‘example.db’)

If the database already exists, then it connects to it. Else it creates the database in the working directory.

After connecting to the database, we’ll create a database cursor that will help us run queries. The cursor object has methods to execute queries and fetch the results of the query. It works very similarly to a file handler.

sqlite
Database Cursor | Image by Author

It’s often helpful to use the connection as a context manager in a with statement like so:

import sqlite3    # Connect to the db  with sqlite3.connect('example.db') as conn:      # create db cursor      # run queries      # commit changes  

This way you don’t have to worry about closing the connection object. The connection is automatically closed when the execution exits the with block. We’ll explicitly close the cursor objects in this tutorial, though.

Creating Database Tables

Now let’s create a customers table with the required fields in the database. To do so, we first create a cursor object. We then run a CREATE TABLE statement, and pass in the query string to the execute() method called on the cursor object:

import sqlite3    # Connect to the db  with sqlite3.connect('example.db') as conn:  	cursor = conn.cursor()    	# Create customers table  	cursor.execute('''      	CREATE TABLE IF NOT EXISTS customers (          	id INTEGER PRIMARY KEY,          	first_name TEXT NOT NULL,          	last_name TEXT NOT NULL,          	email TEXT UNIQUE NOT NULL,          	phone TEXT,          	num_orders INTEGER      	);  	''')  	conn.commit()  	print("Customers table created successfully.")  	cursor.close()  

When you run the script, you should see the following output:

Output >>>  Customers table created successfully.  

Performing CRUD Operations

Let’s perform some basic CRUD operations on the database table. If you’d like you may create separate scripts for each operation.

Inserting Records

Now we’ll insert some records into the customers table. We’ll use Faker to generate synthetic records. To keep the outputs readable, I’ve inserted only 10 records. But you may insert as many records as you’d like.

import sqlite3  import random  from faker import Faker    # Initialize Faker object  fake = Faker()  Faker.seed(24)    # Connect to the db  with sqlite3.connect('example.db') as conn:  	cursor = conn.cursor()    	# Insert customer records  	num_records = 10  	for _ in range(num_records):      	    first_name = fake.first_name()      	    last_name = fake.last_name()      	    email = fake.email()      	    phone = fake.phone_number()      	    num_orders = random.randint(0,100)        	cursor.execute('''          	INSERT INTO customers (first_name, last_name, email, phone, num_orders)          	VALUES (?, ?, ?, ?, ?)      	''', (first_name, last_name, email, phone, num_orders))  	print(f"{num_records} customer records inserted successfully.")  	conn.commit()  	cursor.close()  

Notice how we use parameterized queries: instead of hardcoding the values into the INSERT statement, we use ? placeholders and pass in a tuple of values.

Running the script should give:

Output >>>  10 customer records inserted successfully.  

Reading and Updating Records

Now that we’ve inserted records into the table, let’s run a query to read in all the records. Notice how we use the execute() method to run queries and the fetchall() method on the cursor to retrieve the results of the query.

Because we’ve stored the results of the previous query in `all_customers`, let’s also run an UPDATE query to update the num_orders corresponding to the id 1. Here’s the code snippet:

import sqlite3    # Connect to the db  with sqlite3.connect('example.db') as conn:  	cursor = conn.cursor()    	# Fetch and display all customers  	cursor.execute('SELECT id, first_name, last_name, email, num_orders FROM customers')  	all_customers = cursor.fetchall()  	print("All Customers:")  	for customer in all_customers:      	    print(customer)    	# Update num_orders for a specific customer  	if all_customers:      	    customer_id = all_customers[0][0]  # Take the ID of the first customer      	    new_num_orders = all_customers[0][4] + 1  # Increment num_orders by 1      	cursor.execute('''          	UPDATE customers          	SET num_orders = ?          	WHERE id = ?      	''', (new_num_orders, customer_id))      	print(f"Orders updated for customer ID {customer_id}: now has {new_num_orders} orders.")        	conn.commit()  	cursor.close()  

This outputs both the records and the message after the update query:

Output >>>    All Customers:  (1, 'Jennifer', 'Franco', 'jefferyjackson@example.org', 54)  (2, 'Grace', 'King', 'erinhorne@example.org', 43)  (3, 'Lori', 'Braun', 'joseph43@example.org', 99)  (4, 'Wendy', 'Hubbard', 'christophertaylor@example.com', 11)  (5, 'Morgan', 'Wright', 'arthur75@example.com', 4)  (6, 'Juan', 'Watson', 'matthewmeadows@example.net', 51)  (7, 'Randy', 'Smith', 'kmcguire@example.org', 32)  (8, 'Jimmy', 'Johnson', 'vwilliams@example.com', 64)  (9, 'Gina', 'Ellison', 'awong@example.net', 85)  (10, 'Cory', 'Joyce', 'samanthamurray@example.org', 41)  Orders updated for customer ID 1: now has 55 orders.  

Deleting Records

To delete a customer with a specific customer ID, let’s run a DELETE statement as shown:

import sqlite3    # Specify the customer ID of the customer to delete  cid_to_delete = 3      with sqlite3.connect('example.db') as conn:  	cursor = conn.cursor()    	# Execute DELETE statement to remove the customer with the specified ID  	cursor.execute('''      	DELETE FROM customers      	WHERE id = ?  	''', (cid_to_delete,))            	conn.commit()          f"Customer with ID {cid_to_delete} deleted successfully.")  	cursor.close()            

This outputs:

Customer with ID 3 deleted successfully.  

Filtering Records Using the WHERE Clause

sqlite
Image by Author

Let’s say we want to fetch records of customers who’ve made fewer than 10 orders, say to run targeted campaigns and the like. For this, we run a SELECT query with the WHERE clause specifying the condition for filtering (in this case the number of orders). Here's how you can achieve this:

import sqlite3    # Define the threshold for the number of orders  order_threshold = 10    with sqlite3.connect('example.db') as conn:  	cursor = conn.cursor()    	# Fetch customers with less than 10 orders  	cursor.execute('''      	SELECT id, first_name, last_name, email, num_orders      	FROM customers      	WHERE num_orders < ?  	''', (order_threshold,))    	# Fetch all matching customers  	filtered_customers = cursor.fetchall()    	# Display filtered customers  	if filtered_customers:      	    print("Customers with less than 10 orders:")      	    for customer in filtered_customers:          	        print(customer)  	else:      	    print("No customers found with less than 10 orders.")  

And here’s the output:

Output >>>  Customers with less than 10 orders:  (5, 'Morgan', 'Wright', 'arthur75@example.com', 4)  

Wrapping Up

And that’s a wrap! This was a guide to getting started with SQLite with Python. I hope you found it helpful. You can find all the code on GitHub. In the next part, we’ll look at running joins and subqueries, managing transactions in SQLite, and more. Until then, happy coding!

If you’re interested in learning how database indexes work, read How To Speed Up SQL Queries Using Indexes [Python Edition].

Bala Priya C is a developer and technical writer from India. She likes working at the intersection of math, programming, data science, and content creation. Her areas of interest and expertise include DevOps, data science, and natural language processing. She enjoys reading, writing, coding, and coffee! Currently, she's working on learning and sharing her knowledge with the developer community by authoring tutorials, how-to guides, opinion pieces, and more. Bala also creates engaging resource overviews and coding tutorials.

More On This Topic

  • Working with Python APIs For Data Science Project
  • A Comprehensive Guide to Pinecone Vector Databases
  • Working With Sparse Features In Machine Learning Models
  • How to Ace Data Science Interview by Working on Portfolio Projects
  • Want to Join a Bank? Everything Data Scientists Need to Know About…
  • Working with Big Data: Tools and Techniques